<!--
<!-- 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 (!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(document.dataform.S_email.value == 0)
	{
		alert("Please enter a valid email-id");
		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_ccode,"Country 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);
	}
	if (!checkblank(document.dataform.Description,"Description")) {
		return false;
	}
	if (!checkblank(document.dataform.captcha_text,"text as shown in image")) {
		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_ccode.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_ccode.value.length == 0) document.dataform.S_ccode.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 >= 9)
		{
			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[7];
			for (i=0;i<iFldCnt;i++) 
			{
				if (document.dataform.S_country.options[i].value.toUpperCase() == Values[7].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;
			}
		
			if (document.dataform.S_organization.value.length == 0) document.dataform.S_organization.value=Values[8];
		}
		// Referrer and selfurl
// 		if (document.referrer&&document.referrer!="")
// 		{
// 			document.dataform.referer.value = document.referrer;
// 		}
// 		document.dataform.self_url.value = document.location.href;
		//
			
	}
	return true;
}
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 url1="/cgi/get_captcha.cgi?cref="+ran_num+"&style=2";
// 	var url="http://www.media4trade.com/captchaserver?cRef="+ran_num+"&style=2";
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 -->
//-->
