	expires = new Date();
	expires.setTime (expires.getTime() + 24 * 60 * 60 * 150 * 1000);


	var d = new Date();
	var epoch_time =(d.getTime()-d.getMilliseconds())/1000;
	var randomnumber=Math.floor(Math.random()*9999);
	var randomnumber1=Math.floor(Math.random()*9999);
	var ran_num=randomnumber+"."+epoch_time+"."+randomnumber1;
	var url="/cgi/get_captcha.cgi?cref="+ran_num+"&style=2";




	function setCookie(name, value) {
		if (value.length > 0) {
			document.cookie = name + "=" + escape(value)+ ";"+"expires=" + expires.toGMTString() + ";" + "path=/;" ;
                 }
	}

	function getCookie(Name) {
		var search = Name + "="
		if (document.cookie.length > 0) { // if there are any cookies
			offset = document.cookie.indexOf(search)
			//alert("Offset:"+offset);
			if (offset != -1) { // if cookie exists
				offset += search.length
				// set index of beginning of value
				end = document.cookie.indexOf(";", offset)
				// set index of end of cookie value
				if (end == -1) end = document.cookie.length
				return unescape(document.cookie.substring(offset, end))
			}
		}
		return "";
	}  // end getCookie

	function checkFeedback()
{
	if (document.dataform.realname.value == "")
	{
		alert("Please Enter Your Name");
		document.dataform.realname.focus();
		return false;
	}

	if (document.dataform.email.value == "")
	{
		alert("Please Enter Your EMail");
		document.dataform.email.focus();
		return false;
	}

	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.dataform.email.value))) {
		alert("Invalid Email ID. Kindly enter the correct ID.");
		document.dataform.email.focus();
		return (false);
	}

 	if (document.dataform.feedback.value == "")
	{
		alert("Please Enter Your Feedback");
		document.dataform.feedback.focus();
		return false;
	}


}

function checkgetsource()
{
	if (document.dataform.realname.value == "")
	{
		alert("Please Enter Your Name");
		document.dataform.realname.focus();
		return false;
	}

	if (document.dataform.email.value == "")
	{
		alert("Please Enter Your EMail");
		document.dataform.email.focus();
		return false;
	}

	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.dataform.email.value))) {
		alert("Invalid Email ID. Kindly enter the correct ID.");
		document.dataform.email.focus();
		return (false);
	}
	if(document.dataform.address.value == "" ) {
		alert("Kindly enter your Address.");
		document.dataform.address.focus();
		return false;
	}


	if (document.dataform.S_city.value == "")
	{
		alert("Please Enter Your City");
		document.dataform.S_city.focus();
		return false;
	}

	if (document.dataform.S_country.selectedIndex == 0)  {
			alert ("Kindly select your country name.");
			document.dataform.S_country.focus();
			return false;
	}

	if (document.dataform.phone_country_code.value.length == 0)  {
			alert ("Kindly enter your country code.");
			document.dataform.phone_country_code.focus();
			return false;
	}
	if(!(/^\d+$/.test(document.dataform.phone_country_code.value))){
			alert("Kindly enter correct country code.");
			document.dataform.phone_country_code.focus();
			return false;
			}

	if (document.dataform.phone.value.length == 0)  {
		alert ("Kindly enter your phone number.");
		document.dataform.phone.focus();
		return false;
	}
	if(!(/^\d+$/.test(document.dataform.phone.value))){
			alert("Kindly enter correct phone number.");
			document.dataform.phone.focus();
			return false;
			}



	if (document.dataform.Enquiry_Details.value == "")
	{
		alert("Please Enter Your Requirements");
		document.dataform.Enquiry_Details.focus();
		return false;
	}


	if (document.dataform.S_captcha_text.value.length == 0)  {
		alert ("Kindly enter the code as appearing in the Image.");
		document.dataform.S_captcha_text.focus();
		return false;
	}


       var newIILCookie ;   
		newIILCookie = document.dataform.realname.value;
		newIILCookie +="|"+document.dataform.email.value;
		newIILCookie +="|"+document.dataform.S_phone.value;
		newIILCookie +="|"+document.dataform.S_streetaddress.value;
		newIILCookie +="|"+document.dataform.S_city.value;
		newIILCookie +="|"+document.dataform.S_pin.value;
		newIILCookie +="|"+document.dataform.S_state.value;
		newIILCookie +="|"+document.dataform.S_ccode.value;
		newIILCookie +="|"+document.dataform.lastname.value;

	 //	newIILCookie +="|"+document.dataform.S_organization.value;
		newIILCookie +="|";
		
		//setCookie("newImeshID",newIILCookie);

		newACCookie = document.dataform.S_ccode.value;
		newACCookie +="|"+document.dataform.S_acode.value;
		newACCookie +="|";
		//setCookie("newACCodeID",newACCookie);

		// Expire desc cookie if exists
		if( (desccookie = getCookie("NewDescCookie")) > "") {
document.cookie = "NewDescCookie" + "=" + "" + ";" + "path=/;" ;
		}	

		if (document.dataform.S_city.value == "City/State" ) document.dataform.S_city.value = "";
		if (document.dataform.S_pin.value == "Zip/Pin" ) document.dataform.S_pin.value = "";
	

}

function getMyCookie() {
	var cookie;
		if( (cookie = getCookie("newImeshID")) > "") {
		var	Values = cookie.split("|");
			if (Values.length >= 8) {
				if (document.dataform.realname.value.length == 0)     document.dataform.realname.value = Values[0];
				if (document.dataform.email.value.length == 0)    document.dataform.email.value = Values[1];
				if (document.dataform.S_phone.value.length == 0)   document.dataform.S_phone.value = Values[2];
				if (document.dataform.S_streetaddress.value.length == 0) document.dataform.S_streetaddress.value=Values[3];
				if (document.dataform.S_city.value.length == 0 || document.dataform.S_city.value == "City/State")  document.dataform.S_city.value=Values[4];
				if (document.dataform.S_pin.value.length == 0 || document.dataform.S_pin.value == "Zip/Pin")   document.dataform.S_pin.value=Values[5];
				if (document.dataform.S_state.value.length == 0) document.dataform.S_state.value=Values[6];
				if (document.dataform.S_ccode.value.length == 0) document.dataform.S_ccode.value=Values[7];
				if (document.dataform.lastname.value.length == 0) document.dataform.lastname.value=Values[8];
			}
		}

		if( (nextcookie = getCookie("newACCodeID")) > "") {
			NextValues = nextcookie.split("|");
			if (NextValues.length >= 3){
				if (document.dataform.S_ccode.value.length == 0)     document.dataform.S_ccode.value = NextValues[0];
				if (document.dataform.S_acode.value.length == 0)     document.dataform.S_acode.value = NextValues[1];
			}
		}

		if( (desccookie = getCookie("NewDescCookie")) > "") {
			document.dataform.Description.value = desccookie;
		}

		return true;
	}  // end get

browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
condition = !(( (browserName.indexOf("Explorer") >=0 ) && (browserVer < 4) ) ||  ((browserName.indexOf("Netscape") >=0 ) && (browserVer < 2) ) ) ;
if (condition == true  )
    CanAnimate = true;
else
    CanAnimate = false;

function openchild(thisurl){
if ( CanAnimate ){
        msgWindow=window.open( thisurl ,'subwindow','toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,menubar=no,resizable=yes,width=535,height=360,left=0,top=0');
        msgWindow.focus();
        //msgWindow.location.href = thisurl;
}
else {
        msgWindow=window.open( thisurl,'subwindow','toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,menubar=no,resizable=yes,width=535,height=360,left=0,top=0');
}
}
