<!-- 
function hideDiv() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById("scroller").direction="left";
document.getElementById('hideShow').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideShow.visibility = 'visible'; 
} 
else { // IE 4 

document.all.hideShow.style.visibility = 'visible'; 
} 
} 
} 

function showDiv() { 
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('scroller').direction='right';
document.getElementById('hideShow').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideShow.visibility = 'visible'; 
} 
else { // IE 4 
document.all.hideShow.style.visibility = 'visible'; 
} 
} 
} 



//validation JS//

function mediakit() 
{
 params  = 'width=500px';
 params += ', height=260px';
 params += ', top=300, left=400';


 newwin=window.open("form.php",'windowname4', params);
 if (window.focus) {newwin.focus()}
 return false;
}
function focus_on_userid()
{
document.reg_form.login.focus()
}


function hideDiv(div)
{
	document.getElementById(div).style.display = 'none';

}
function trim(value) 
{
	
	//function to trim any leading, following and inner spaces
	var temp = value;
	var obj = /^(\s*)([\W\w]*)(\b\s*$)/;
	if (obj.test(temp)) { temp = temp.replace(obj, '$2'); }
	var obj = /  /g;
	while (temp.match(obj)) { temp = temp.replace(obj, " "); }
	return temp;
}

function LTrim( value )
{
	var re = /\s*((\S+\s*)*)/;
	return value.replace(re, "$1");
}

// Removes ending whitespaces
function RTrim( value )
{
	var re = /((\s*\S+)*)\s*/;
	return value.replace(re, "$1");
}

// Removes leading and ending whitespaces
function trim( value ) 
{
	return LTrim(RTrim(value));
}


function checkdata(str,str1)
{
	if (eval("document.reg_form."+str1+".value"+".length") > parseInt(str))
	{
		alert("The number of characters exceeds the limit of "+str);
		eval("document.reg_form."+str1+".focus()"); 
	}
}
function ValidateNo(NumStr, String)
{
	for(var Idx=0; Idx<NumStr.length; Idx++)
	{
		var Char = NumStr.charAt(Idx);
		var Match = false;

		for(var Idx1=0; Idx1<String.length; Idx1++)
		{
			if(Char == String.charAt (Idx1))
				Match = true;
		}

		if (!Match) 
			return false;
	}
	return true;
}

function validation()
{

	
	/*if (document.reg_form.cphone.value == "")
	{
		document.getElementById('dphone').style.display='block';
		document.reg_form.cphone.focus()
		return false;
	}
		
		
	if(!ValidateNo(document.reg_form.cphone.value,"0123456789+- "))
	{
		document.getElementById('dphone').style.display='block';
		document.reg_form.cphone.focus();
		document.reg_form.cphone.value =""
		return false;
	} */
	if(document.reg_form.name.value=="")
	{
		document.getElementById('dname').style.display='block';
		
		document.reg_form.name.focus();
		return false;
	}
	
	var mail = document.reg_form.email.value;
	if(document.reg_form.email.value=="")
	{
		document.getElementById('demail').style.display='block';
		document.reg_form.email.focus();
		return false;
	}

	if ((mail.length == mail.lastIndexOf('.')+1) || (mail.indexOf('@') != mail.lastIndexOf('@')))
	{
		document.getElementById('demail').style.display='block';
		document.reg_form.email.focus();
		return false;
	}

	if(mail.indexOf('@')==-1 || mail.indexOf('.')==-1 ||  mail.indexOf('@',0)==0 || mail.indexOf('.',0)<1 || mail.indexOf('@.')!= -1 || mail.indexOf('.@')!=-1 || mail.indexOf('..')!=-1)
	{
		document.getElementById('demail').style.display='block';
		document.reg_form.email.focus();
		return false;
	}
	if(document.reg_form.phone.value=="")
	{
		document.getElementById('dphone').style.display='block';
		document.reg_form.phone.focus();
		return false;
	}
	if(!ValidateNo(document.reg_form.phone.value,"0123456789+- "))
	{
		document.getElementById('dvphone').style.display='block';
		document.reg_form.phone.focus();
		document.reg_form.phone.value =""
		return false;
	}
	if(!ValidateNo(document.reg_form.email.value,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@._-"))
	{
		document.getElementById('demail').style.display='block';
		document.reg_form.email.focus();
		document.reg_form.email.value=""
		return false;
	}
	

	
}
function login_validation()
{
		if(document.frmlogin.userid.value=="")
		{
			
			document.getElementById('login').style.display='block';
				document.frmlogin.userid.focus();
				return false;
		}
		if(document.frmlogin.pass.value=="")
		{
			
			document.getElementById('pass').style.display='block';
				document.frmlogin.pass.focus();
				return false;
		}

}

//-->