function validatesearchframe() {
	url=window.location.href;
  	var qparts = url.split("?");
  	if (qparts.length == 0)
 	{
		document.getElementById('frame1').src="#.html";
  	}
  	var query = qparts[1];
	document.getElementById('frame1').src="http://search.atomz.com/search/?" + query;		
}
function starttimer(a)
{
	if(a == 'techlead') {
		document.getElementById('truly').style.visibility='visible';
		document.getElementById('truly').style.position='relative';
		document.getElementById('truly').style.width='100%';
		document.getElementById('focused').style.visibility='hidden';
		document.getElementById('focused').style.position='absolute';
		document.getElementById('focused').style.width='200px';
		document.getElementById('stable').style.visibility='hidden';
		document.getElementById('stable').style.position='absolute';
		document.getElementById('stable').style.width='200px';
		document.getElementById('techlead').style.visibility='hidden';
		document.getElementById('techlead').style.position='absolute';
		document.getElementById('techlead').style.width='200px';
		timer=setTimeout("starttimer('truly')",8000);
	}
	if(a == 'truly') {
		document.getElementById('truly').style.visibility='hidden';
		document.getElementById('truly').style.position='absolute';
		document.getElementById('truly').style.width='200px';
		document.getElementById('focused').style.visibility='visible';
		document.getElementById('focused').style.position='relative';
		document.getElementById('focused').style.width='100%';
		document.getElementById('stable').style.visibility='hidden';
		document.getElementById('stable').style.position='absolute';
		document.getElementById('stable').style.width='200px';
		document.getElementById('techlead').style.visibility='hidden';
		document.getElementById('techlead').style.position='absolute';
		document.getElementById('techlead').style.width='200px';
		timer=setTimeout("starttimer('focused')",8000);
	}
	if(a == 'focused') {
		document.getElementById('truly').style.visibility='hidden';
		document.getElementById('truly').style.position='absolute';
		document.getElementById('truly').style.width='200px';
		document.getElementById('focused').style.visibility='hidden';
		document.getElementById('focused').style.position='absolute';
		document.getElementById('focused').style.width='200px';
		document.getElementById('stable').style.visibility='visible';
		document.getElementById('stable').style.position='relative';
		document.getElementById('stable').style.width='100%';
		document.getElementById('techlead').style.visibility='hidden';
		document.getElementById('techlead').style.position='absolute';
		document.getElementById('techlead').style.width='200px';
		timer=setTimeout("starttimer('stable')",8000);
	}
	if(a == 'stable') {
		document.getElementById('truly').style.visibility='hidden';
		document.getElementById('truly').style.position='absolute';
		document.getElementById('truly').style.width='200px';
		document.getElementById('focused').style.visibility='hidden';
		document.getElementById('focused').style.position='absolute';
		document.getElementById('focused').style.width='200px';
		document.getElementById('stable').style.visibility='hidden';
		document.getElementById('stable').style.position='absolute';
		document.getElementById('stable').style.width='200px';
		document.getElementById('techlead').style.visibility='visible';
		document.getElementById('techlead').style.position='relative';
		document.getElementById('techlead').style.width='100%';
		timer=setTimeout("starttimer('techlead')",8000);
	}
}

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					
	}
 
function isNumberKey(evt) {
 
    var charCode = (evt.which) ? evt.which : event.keyCode

	if (charCode > 31 && (charCode < 48 || charCode > 57)) {
		alert("Numbers only");
    	return false;
	} else {
		return true;
	}	
}
function validatedemorequest() {
	var name = document.info.txtname.value;
	var company = document.info.txtcompany.value;
	var email = document.info.txtemailid.value;
	var phone = document.info.txtphonenumber.value;
	var questions = document.info.tarquestions.value;
	
	if(name == "") {
		alert("Please enter Name");
		return;
	}
	if(company == "") {
		alert("Please enter Company");
		return;
	}
	if(email == "") {
		alert("Please enter Email Address");
		return;
	}
	if (echeck(email)==false){
		email="";
		document.info.txtemailid.focus();
		return false;
	}
	if(questions == "") {
		alert("Please enter Question");
		return;
	}
	
	document.info.action="http://www.taarruni.com/Support/VSG/Senddemorequest.asp";
	document.info.method="post";
	document.info.submit();
}
function validateinfo() {

	var yournamea = document.info.Yourname.value;
	var designationa = document.info.Designation.value;
	var companynamea = document.info.Companyname.value;
	var companyaddressa = document.info.Companyaddress.value;
	var zipcodea = document.info.Zipcode.value;
	var citya = document.info.City.value;
	var countrya = document.info.Country.value;
	var emailida = document.info.Emailid.value;
	var telephonenoa = document.info.Telephoneno.value;
	var faxa = document.info.Fax.value;
	var mobilenumbera = document.info.Mobilenumber.value;
	var queriesa = document.info.Queries.value;

	if(yournamea == "") {
		alert("Please enter your Name");
		return false;
	}
	if(isNaN(yournamea) == false) {
		alert("your Name should not be Numbers");
		return false;
	}	
	if(designationa == "") {
		alert("Please enter your Designation");
		return false;
	}
	if(isNaN(designationa) == false) {
		alert("Designation should not be Numbers");
		return false;
	}
	if(companynamea == "") {
		alert("Please enter your Company Name");
		return false;
	}
	if(isNaN(companynamea) == false) {
		alert("Company Name should not be Numbers");
		return false;
	}	
	if(companyaddressa == "") {
		alert("Please enter your Company Address");
		return false;
	}
	if(isNaN(companyaddressa) == false) {
		alert("Company Address should not be Numbers");
		return false;
	}	
	if(zipcodea == "") {
		alert("Please enter ZIP Code");
		return false;
	}
	if(zipcodea.length < 6) {
		alert("Zipcode should be 6 digits");
		return false;
	}	
	if(citya == "") {
		alert("Please enter City");
		return false;
	}
	if(isNaN(citya) == false) {
		alert("City should not be Numbers");
		return false;
	}
	if(emailida == "") {
		alert("Please enter your E-mail ID");
		return false;
	}
	if (echeck(emailida)==false){
		emailida="";
		document.info.Emailid.focus();
		return false;
	}
	
	if(mobilenumbera.length > 0 && mobilenumbera.length < 10) {
		alert("Mobile Number should be 10 digits");
		return false;
	}	
	if(queriesa == "") {
		alert("Please enter any Queries");
		return false;
	}	
	
	document.info.action="http://www.taarruni.com/Support/VSG/Sendform.asp";
	document.info.method="post";
	document.info.submit();
}
function isZipcode(evt) {
 
    var charCode = (evt.which) ? evt.which : event.keyCode

	if(document.info.Zipcode.value.length==6) {
            			return false;
	}
	if (charCode > 31 && (charCode < 48 || charCode > 57)) {
		alert("Numbers only");
    	return false;
	} else {
		return true;
	}
}

function isMobilenumber(evt) {
 
    var charCode = (evt.which) ? evt.which : event.keyCode

	if(document.info.Mobilenumber.value.length==10) {
            			return false;
	}
	if (charCode > 31 && (charCode < 48 || charCode > 57)) {
		alert("Numbers only");
    	return false;
	} else {
		return true;
	}
}
function validatelink(a) {
	document.getElementById(a).style.background="#999999";	
}
function linkout(a) {
	document.getElementById(a).style.background="";			
}
function validatemover(a,b) {
	document.getElementById(a).style.backgroundImage="url(images/Subbuttons_hover.jpg)";
	document.getElementById(b).style.color="#000000";
}
function validatemout(a,b) {
	document.getElementById(a).style.backgroundImage="url(images/Subbuttons.jpg)";	
	document.getElementById(b).style.color="#FFFFFF";
}
function validatemoversub(a,b) {
	document.getElementById(a).style.backgroundImage="url(images/Subbuttons_sub_hover.jpg)";
	document.getElementById(b).style.color="#000000";
}
function validatemoutsub(a,b) {
	document.getElementById(a).style.backgroundImage="url(images/Subbuttons_sub.jpg)";	
	document.getElementById(b).style.color="#000000";
}
function validatemenulink(linkvalue) {
	if(true) {
		location.href = linkvalue;
		return;
    }
}
function validateselect() {
	if(true) {
		window.open(document.getElementById('Associate2').value,'mywindow'); 
		return;
	}
}
