<!--
<!-- HIDING FROM OTHER BROWSERS
function checkblank(fnm,Disp) {
		if (fnm.value.length == 0) {
			alert("Kindly Fill the "+Disp+".");
			fnm.focus();
			return false;
		}
		if (fnm.value.length != 0) {
			var ctr=0;
			var str = fnm.value;
			var strfocus= fnm;
			var ctr1 = 0;
			for (var i = 0; i < fnm.value.length; i++) 
			{
				
				var ch = fnm.value.substring(i, i + 1);
				//alert(str.charCodeAt(i));
				if (str.charAt(i) != " ") {
					ctr = ctr+1;
				}
				
			}
			if (ctr ==0) {
				alert('Kindly fill the valid '+Disp+'.');
				strfocus.select();
				strfocus.focus();
				return false;
			}
	   }
	   return true;
}
expires = new Date();
expires.setTime (expires.getTime() + 24 * 60 * 60 * 150 * 1000);
function set(){
if ( (document.dataform.Enquire_Product.value == "") && (document.dataform.quantity.value == "") && (document.dataform.Description.value == "") &&  (document.dataform.S_name.value == "") &&  (document.dataform.S_email.value == "") &&  (document.dataform.S_phone.value == "") &&  (document.dataform.S_address.value == "") &&  (document.dataform.S_country.value == "") )
{
    alert ("Please fill in all the compulsory fields");
    return (false);
}


if (!checkblank(document.dataform.Enquire_Product,"Product Name")) {
	return false;
}

if (!checkblank(document.dataform.quantity,"Estimated Quantity")) {
	return false;
}

if (!checkblank(document.dataform.S_name,"Name")) {
	return false;
}

if (!checkblank(document.dataform.S_address,"Address")) {
	return false;
}


if (!checkblank(document.dataform.Description,"Description")) {
	return false;
}

if(document.dataform.S_email.value.indexOf(" ") >= 0)
{
	alert("Please enter your email-id without any white space character.");
	document.dataform.S_email.focus();
	return (false);
}
if ( (document.dataform.S_email.value.indexOf("@") == -1) || (document.dataform.S_email.value.indexOf(".") == -1) )
{
	alert("Please enter a valid email-id"); 
	document.dataform.S_email.focus();
	return (false);
}

BeforeAtRate = document.dataform.S_email.value.substring(0,document.dataform.S_email.value.indexOf("@"));
AfterAtRate = document.dataform.S_email.value.substring(document.dataform.S_email.value.indexOf("@")+1,document.dataform.S_email.value.length);
if (AfterAtRate.indexOf(".") == -1)
{
	alert("Please enter a valid email-id"); 
	document.dataform.S_email.focus();
	return (false);
}
middle = AfterAtRate.substring(0, AfterAtRate.indexOf("."));
last = AfterAtRate.substring(AfterAtRate.indexOf(".") + 1,AfterAtRate.length);
if (BeforeAtRate.length == 0 || middle.length == 0 || last.length == 0)
{
	alert("Please enter a valid email-id"); 
	document.dataform.S_email.focus();
	return (false);
}
if (middle.indexOf(",") != -1 || last.indexOf(",") != -1 || middle.indexOf(",") != -1 || BeforeAtRate.indexOf(",") != -1){
	alert("Please enter a valid email-id"); 
	document.dataform.S_email.focus();
	return (false);
}


if (!checkblank(document.dataform.S_phone_country_code,"Country Code in Phone No")) {
	return false;
}
if (!checkblank(document.dataform.S_phone_area_code,"Area Code in Phone No")) {
	return false;
}
if (!checkblank(document.dataform.S_phone,"Phone")) {
	return false;
}



if (document.dataform.S_country.selectedIndex == 0) {
	alert("Kindly Select Country."); 
	document.dataform.S_country.focus();
	return (false);
}


newCookie = document.dataform.S_name.value;
newCookie +="|"+document.dataform.S_email.value;
newCookie +="|"+document.dataform.S_phone.value;
newCookie +="|"+document.dataform.S_country.options[document.dataform.S_country.selectedIndex].value;
//set cookies for new fields
newCookie1 = document.dataform.S_phone_country_code.value;
newCookie1 += "|"+document.dataform.S_phone_area_code.value;
setCookie("newImeshID",newCookie);
setCookie("newImeshID1",newCookie1);	//set cookies for new fields
return true;
}
function get(){

if( (cookie = getCookie("newImeshID1")) > ""){
	Valuesnew = cookie.split("|");
	if (Valuesnew.length >= 4){
		if (document.dataform.S_phone_country_code.value.length == 0)			document.dataform.S_phone_country_code.value = Valuesnew[0];
		if (document.dataform.S_phone_area_code.value.length == 0)			document.dataform.S_phone_area_code.value = Valuesnew[1];
	}
}

if( (cookie = getCookie("newImeshID")) > ""){
	Values = cookie.split("|");
	if (Values.length >= 4){
		if (document.dataform.S_name.value.length == 0)			document.dataform.S_name.value = Values[0];
		if (document.dataform.S_email.value.length == 0)		document.dataform.S_email.value = Values[1];
		if (document.dataform.S_phone.value.length == 0)		document.dataform.S_phone.value=Values[2];
		//if (document.dataform.S_country.value.length == 0)	document.dataform.S_country.value=Values[3];
		for (i=0;i<iFldCnt;i++) {
			if (document.dataform.S_country.options[i].value.toUpperCase() == Values[3].toUpperCase()) {
				break;
			}
		}
       
		if (i == iFldCnt) {
			if (document.dataform.S_country.selectedIndex == 0)		document.dataform.S_country.selectedIndex=0;
		}else {
			if (document.dataform.S_country.selectedIndex == 0)		document.dataform.S_country.selectedIndex=i;
		}
	
	}
}
return true;
}
function setCookie(name, value){
		if (value.length > 0)
		document.cookie = name + "=" + escape(value)+ ";"+"expires=" + expires.toGMTString()+";"
	
}
function getCookie(Name) {
          var search = Name + "="
          if (document.cookie.length > 0) { // if there are any cookies
                    offset = document.cookie.indexOf(search) 
                    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 "";
}
function get_ccode() {
	document.dataform.S_fax_country_code.value = document.dataform.S_phone_country_code.value;
}
function get_acode() {
	document.dataform.S_fax_area_code.value = document.dataform.S_phone_area_code.value;
}
// STOP HIDING FROM OTHER BROWSERS -->
//Getting parameter name from url starts
var is_input = document.URL.indexOf('?');
var code = '';
if (is_input != -1)
{
	addr_str = document.URL.substring(is_input+1, document.URL.length);
	strarr = addr_str.split("&");
	var param_nam = unescape((strarr[0].split("="))[0]);
	if(param_nam == "code")
	{
		code = unescape((strarr[0].split("="))[1]);
		code = code.replace(/\+/g," ");
	}
}
//Getting parameter name from url ends
//-->
