function toggle_link(elm,show){
	var di = document.getElementById(elm);
	if(show=='1'){
		di.style.color = '#ff0000';
	}else{
		di.style.color = '#12749d';
	}
}
/*function toggle_link(elm){
	var di = document.getElementById(elm);
	if (di.style.color == '#ffffff') {
			di.style.color = '#12749d';
	} else {
			di.style.color = '#ffffff';
	}
}*/
function checksend(elm){
	if(elm.name.value=="" || elm.name.value==null){
		elm.name.focus();
		alert("Your name cannot blank.");
		return false;
	}
	if(elm.email.value=="" || elm.email.value==null){
		elm.email.focus();
		alert("E-mail cannot blank.");
		return false;
	}
	if(echeck(elm.email.value)==false){
		elm.email.focus();
		return false;
	}
	if(elm.subject.value=="" || elm.subject.value==null){
		elm.subject.focus();
		alert("Subject cannot blank.");
		return false;
	}
	if(elm.message.value=="" || elm.message.value==null){
		elm.message.focus();
		alert("Message cannot blank.");
		return false;
	}
	if(elm.scode.value=="" || elm.scode.value==null){
		elm.scode.focus();
		alert("Please type Security Code.");
		return false;
	}
	return true;
}
function echeck(str) {
		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID")
		   return false
		}
		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}
		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}
		if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }
		if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
 		return true					
}
