function emailThisPage(rUrl) {
		
    var target = document.location;

  	var win = window.open(''+rUrl+'/email_with_us.php?sendurl=' + target, 'notice', 'width=600,height=500,location=no,toolbar=no,status=no,resizable=no,scrollbars=yes');
  	win.focus();
}

function bookmarksite(){
	var titleVar = document.title;
	
	var urlVar = document.location;
	
	// firefox
	if (window.sidebar) {
		window.sidebar.addPanel(titleVar, urlVar, "");
	}
	// opera
	else if(window.opera && window.print) { 
		var elem = document.createElement('a');
		elem.setAttribute('href',urlVar);
		elem.setAttribute('title',titleVar);
		elem.setAttribute('rel','sidebar');
		elem.click();
	} 
	// ie
	else  {
		window.external.AddFavorite(urlVar,titleVar)
	}	
}

function firefoxAlert(pageurl) {
	
	if(navigator.appName=="Microsoft Internet Explorer") {
		
		pageurl.style.behavior='url(#default#homepage)';pageurl.setHomePage('http://www.Automotive-Accessories-Parts.Com');
	}
	else {
		alert('To set Automotive-Accessories-Parts.Com as your home page in Firefox, click and drag the button to the "Home" icon in your browser.');
	}
	return false;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function openwin (file,Iwidth,Iheight) {
      var newWin1=window.open(file,'nWin2','x=0,y=0,toolbar=no,location=no,directories=no,status=no,scrollbars=yes, copyhistory=no,width='+Iwidth+',height='+Iheight+',screenX=0,screenY=0,left=20,top=20');
}

function chktrim(inputString) {
     if (typeof inputString != "string") { return inputString; }
     var retValue = inputString;
     var ch = retValue.substring(0, 1);
     while (ch == " ") { 
       retValue = retValue.substring(1, retValue.length);
       ch = retValue.substring(0, 1);
     } 
     ch = retValue.substring(retValue.length-1, retValue.length);
     while (ch == " ") { 
        retValue = retValue.substring(0, retValue.length-1);
        ch = retValue.substring(retValue.length-1, retValue.length);
     }
     while (retValue.indexOf("  ") != -1) { 
        retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); // Again, there are two spaces in each of the strings
     }
     return retValue; 
} 
function chkLen1() {
	
	document.form1.chrlen.value=document.form1.detail_req.value.length;
    if (document.form1.detail_req.value.length>1000) {
    	alert("your text exceed 1000 characters");
        document.form1.detail_req.focus();
        return false;
	}
}
function sellValid(id1) {
	if (id1.DOB_Month.value.length ==0) {
        alert("Enter Date of Birth ");
        id1.DOB_Month.focus();
        return false;
    }
    if (id1.dob_day.value.length ==0) {
        alert("Enter Date of Birth ");
        id1.dob_day.focus();
        return false;
    }
    if (id1.dob_year.value.length ==0) {
        alert("Enter Date of Birth ");
        id1.dob_year.focus();
        return false;
    }
   	if (chktrim(id1.man_comp.value).length==0) {
      	alert("Enter Manufacturing Company");
	  	id1.man_comp.focus();
      	return false;
   	}
   	if (chktrim(id1.model.value).length==0) {
      	alert("Enter Vehicle Model");
	  	id1.model.focus();
      	return false;
   	}
   	if (chktrim(id1.version.value).length==0) {
      	alert("Enter Vehicle Version");
	  	id1.version.focus();
      	return false;
   	}
   	if (chktrim(id1.rest_no.value).length==0) {
      	alert("Enter Registration No");
	  	id1.rest_no.focus();
      	return false;
   	}
   	
  	if (chktrim(id1.rest_place.value).length==0) {
      	alert("Enter Registration place");
	  	id1.rest_place.focus();
      	return false;
   	}
   	if (chktrim(id1.exp_price.value).length==0) {
      	alert("Enter Expected Price");
	  	id1.exp_price.focus();
      	return false;
   	}
   	if (chktrim(id1.color.value).length==0) {
      	alert("Enter Color");
	  	id1.color.focus();
      	return false;
   	}
   	
   	if (chktrim(id1.sell_info.value).length<10 || chktrim(id1.sell_info.value).length>1000){
    	if (id1.sell_info.value.length>1000){
    		alert("Your Details [ maximum 1000 characters ] ");
		}
		else {
    		alert("Please enter your  Details [ minimum 10 characters ] ");
		}
        id1.sell_info.focus();
        return (false);
	}
	if (chktrim(id1.your_name.value).length==0) {
      	alert("Enter Your Name");
	  	id1.your_name.focus();
      	return false;
   	}
 	if (chktrim(id1.email.value).length == 0) {
      	alert("E-mail address can't be left blank");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('@') == -1) {
      	alert("Error in e-mail address");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('.') == -1) {
      	alert("Error in e-mail address");
      	id1.email.focus();
      	return false;
   	}

	if (id1.email.value.indexOf('@') != id1.email.value.lastIndexOf('@')) {
      	alert("Please Specify One E-mail address only");
      	id1.email.focus();
      	return false;
   	}
   	if (chktrim(id1.your_name.value).length==0) {
      	alert("Enter Your Name");
	  	id1.your_name.focus();
      	return false;
   	}   	
   	if (chktrim(id1.address.value).length==0) {
      	alert("Enter Your address");
	  	id1.address.focus();
      	return false;
   	}
   	if (chktrim(id1.city.value).length==0) {
      	alert("Enter Your city");
	  	id1.city.focus();
      	return false;
   	}
   	if (chktrim(id1.state.value).length==0) {
      	alert("Enter Your state");
	  	id1.state.focus();
      	return false;
   	}
	if (id1.country.options[id1.country.selectedIndex].value=="")  {
      	alert("Select your Country");
      	id1.country.focus();
      	return false;
   	}
   	if (chktrim(id1.state.value).length==0) {
      	alert("Enter Your state");
	  	id1.state.focus();
      	return false;
   	}
   	if (chktrim(id1.mobile.value).length==0) {
      	alert("Enter Your mobile");
	  	id1.mobile.focus();
      	return false;
   	}
}

function buyValid(id1) {
	if (chktrim(id1.newOld[0].checked) == false && chktrim(id1.newOld[1].checked) == false) {
      	alert("Enter Type of Vehicle");
	  	id1.newOld[0].focus();
      	return false;
   	}
   	if (chktrim(id1.your_name.value).length==0) {
      	alert("Enter Your Name");
	  	id1.your_name.focus();
      	return false;
   	}
 	if (chktrim(id1.email.value).length == 0) {
      	alert("E-mail address can't be left blank");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('@') == -1) {
      	alert("Error in e-mail address");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('.') == -1) {
      	alert("Error in e-mail address");
      	id1.email.focus();
      	return false;
   	}

	if (id1.email.value.indexOf('@') != id1.email.value.lastIndexOf('@')) {
      	alert("Please Specify One E-mail address only");
      	id1.email.focus();
      	return false;
   	}
   	if (chktrim(id1.your_name.value).length==0) {
      	alert("Enter Your Name");
	  	id1.your_name.focus();
      	return false;
   	}   	
   	if (chktrim(id1.address.value).length==0) {
      	alert("Enter Your address");
	  	id1.address.focus();
      	return false;
   	}
   	if (chktrim(id1.city.value).length==0) {
      	alert("Enter Your city");
	  	id1.city.focus();
      	return false;
   	}
   	if (chktrim(id1.state.value).length==0) {
      	alert("Enter Your state");
	  	id1.state.focus();
      	return false;
   	}
	if (id1.country.options[id1.country.selectedIndex].value=="")  {
      	alert("Select your Country");
      	id1.country.focus();
      	return false;
   	}
   	if (chktrim(id1.state.value).length==0) {
      	alert("Enter Your state");
	  	id1.state.focus();
      	return false;
   	}
   	if (chktrim(id1.mobile.value).length==0) {
      	alert("Enter Your mobile");
	  	id1.mobile.focus();
      	return false;
   	}
	}
	

function financeValid(id1) {
	if (chktrim(id1.your_name.value).length==0) {
      	alert("Enter Your Name");
	  	id1.your_name.focus();
      	return false;
   	}
   	if (id1.DOB_Month.value.length ==0) {
        alert("Enter Date of Birth ");
        id1.DOB_Month.focus();
        return false;
    }
    if (id1.dob_day.value.length ==0) {
        alert("Enter Date of Birth ");
        id1.dob_day.focus();
        return false;
    }
    if (id1.dob_year.value.length ==0) {
        alert("Enter Date of Birth ");
        id1.dob_year.focus();
        return false;
    }
   	if (chktrim(id1.address.value).length==0) {
      	alert("Enter Your Address");
	  	id1.address.focus();
      	return false;
   	}
   	if (chktrim(id1.state.value).length==0) {
      	alert("Enter Your State");
	  	id1.state.focus();
      	return false;
   	}
   	if (chktrim(id1.city.value).length==0) {
      	alert("Enter Your City");
	  	id1.city.focus();
      	return false;
   	}
   	
   	if (chktrim(id1.newOld[0].checked) == false && chktrim(id1.newOld[1].checked) == false) {
      	alert("Enter New/Old Vehicle");
	  	id1.newOld[0].focus();
      	return false;
   	}
   	if (chktrim(id1.mon_income.value).length==0) {
      	alert("Enter Your Monthly Income");
	  	id1.mon_income.focus();
      	return false;
   	}
   	if (chktrim(id1.finance_period.value).length==0) {
      	alert("Enter Period of Finance");
	  	id1.finance_period.focus();
      	return false;
   	}
   	if (chktrim(id1.finance_amount.value).length==0) {
      	alert("Enter Finance Amount");
	  	id1.finance_amount.focus();
      	return false;
   	}
   	if (chktrim(id1.down_payment.value).length==0) {
      	alert("Enter Your Down Payment");
	  	id1.down_payment.focus();
      	return false;
   	}
   	if (chktrim(id1.policy_start.value).length==0) {
      	alert("Enter Your Down Payment");
	  	id1.policy_start.focus();
      	return false;
   	}
   
   	if (chktrim(id1.comment.value).length<10 || chktrim(id1.comment.value).length>1000){
    	if (id1.comment.value.length>1000){
    		alert("Your Details [ maximum 1000 characters ] ");
		}
		else {
    		alert("Please enter your  Details [ minimum 10 characters ] ");
		}
        id1.comment.focus();
        return (false);
	}
}
function enquiryValid(id1) {

   	if (chktrim(id1.subject.value).length==0) {
      	alert("Enter Subject/Inquiry For");
	  	id1.subject.focus();
      	return false;
   	}
   	
	if (chktrim(id1.detail_req.value).length<10 || chktrim(id1.detail_req.value).length>1000){
    	if (id1.detail_req.value.length>1000){
    		alert("Your Requirement Details [ maximum 1000 characters ] ");
		}
		else {
    		alert("Please enter your Requirement Details [ minimum 10 characters ] ");
		}
        id1.detail_req.focus();
        return (false);
	}
	if (chktrim(id1.your_name.value).length==0) {
      	alert("Enter your name");
	  	id1.your_name.focus();
      	return false;
   	}
   	if (chktrim(id1.email.value).length == 0) {
      	alert("E-mail address can't be left blank");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('@') == -1) {
      	alert("Error in e-mail address");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('.') == -1) {
      	alert("Error in e-mail address");
      	id1.email.focus();
      	return false;
   	}

	if (id1.email.value.indexOf('@') != id1.email.value.lastIndexOf('@')) {
      	alert("Please Specify One E-mail address only");
      	id1.email.focus();
      	return false;
   	}   	
	if (id1.country.options[id1.country.selectedIndex].value=="")  {
      	alert("Select your Country");
      	id1.country.focus();
      	return false;
   	}
	
	 if (chktrim(id1.state.value).length ==0) {
      	alert("Enter state name");
      	id1.state.focus();
      	return false;
   	}
   	if (chktrim(id1.addess.value).length ==0) {
      	alert("Enter Address");
      	id1.address.focus();
      	return false;
   	} 

	if (id1.ph_ccode.value.length ==0) {
        alert("Enter Phone Number - Country Code");
        id1.ph_ccode.focus();
        return false;
     }
     if (!parseInt(id1.ph_acode.value)) {
        alert("Incorrect Phone - Area Code");
        id1.ph_acode.focus();
        return false;
     }
     if (chktrim(id1.ph_number.value).length ==0) {
        alert("Enter Phone Number");
        id1.ph_number.focus();
        return false;
     }   
	 
}
function inquiryNow() {
    var pp=1;
    dml=document.form2;
    len=dml.elements.length;
    var i=0;
    for(i=0; i<len; i++) {

       if (document.form2.elements[i].type == "checkbox" && document.form2.elements[i].checked==true) {
          pp=2;
       }
    }
    if (pp==1) {
      alert("You have not selected any party.\n\nPlease select the parties && then proceed");
    }
    else {
      document.form2.target="";
      document.form2.submit();
    }
}
function checkAll(val) {

   	dml=document.form2;
   	len=dml.elements.length;
   	var i=0;
   	for (i=0; i<len; i++) {
     	if (dml.elements[i].type == "checkbox") {
        	if (val == 1) { 
           		dml.elements[i].checked=true;
        	} 
			else {
           		dml.elements[i].checked=false;
        	}
     	}   
   	}
}

function feedbackValid(id1) {
   	if (chktrim(id1.your_name.value).length==0) {
      	alert("Enter your name");
	  	id1.your_name.focus();
      	return false;
   	}
   	if (chktrim(id1.email.value).length == 0) {
      	alert("E-mail address can't be left blank");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('@') == -1) {
      	alert("Error in e-mail address");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('.') == -1) {
      	alert("Error in e-mail address");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('@') != id1.email.value.lastIndexOf('@')) {
      	alert("Please Specify One E-mail address only");
      	id1.email.focus();
      	return false;
   	}   	
	if (chktrim(id1.comment.value).length<10 || chktrim(id1.comment.value).length>1000){
    	if (id1.comment.value.length>1000){
    		alert("Your Comments [ maximum 1000 characters ] ");
		}
		else {
    		alert("Please enter your Comments [ minimum 10 characters ] ");
		}
        id1.comment.focus();
        return (false);
	}
	   	
}

function comments_Valid(id1) {
   	if (chktrim(id1.your_name.value).length==0) {
      	alert("Enter your name");
	  	id1.your_name.focus();
      	return false;
   	}
	
   	if (chktrim(id1.email.value).length == 0) {
      	alert("E-mail address can't be left blank");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('@') == -1) {
      	alert("Error in e-mail address");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('.') == -1) {
      	alert("Error in e-mail address");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('@') != id1.email.value.lastIndexOf('@')) {
      	alert("Please Specify One E-mail address only");
      	id1.email.focus();
      	return false;
   	}   	
	if (chktrim(id1.message.value).length<10 || chktrim(id1.message.value).length>1000){
    	if (id1.message.value.length>1000){
    		alert("Your Message [ maximum 1000 characters ] ");
		}
		else {
    		alert("Please enter your Message [ minimum 10 characters ] ");
		}
        id1.message.focus();
        return (false);
	}
	   	
}



function listingValid(id1) {
   	if (chktrim(id1.comp_name.value).length==0) {
      	alert("Enter Company / Organization Name ");
	  	id1.comp_name.focus();
      	return false;
   	}
	
   	if (id1.busType.options[id1.busType.selectedIndex].value=="")  {
      	alert("Select Nature of Business  ");
      	id1.busType.focus();
      	return false;
   	}
	if (chktrim(id1.product_desc.value).length<10 || chktrim(id1.product_desc.value).length>1000){
    	if (id1.product_desc.value.length>1000){
    		alert("Enter your product(s) details [ maximum 1000 characters ] ");
		}
		else {
    		alert("Enter your product(s) details [ minimum 10 characters ] ");
		}
        id1.product_desc.focus();
        return (false);
	}
   	
   	if (chktrim(id1.your_name.value).length==0) {
      	alert("Enter Your Name ");
	  	id1.your_name.focus();
      	return false;
   	}   	    	 	
   	if (chktrim(id1.email.value).length == 0) {
      	alert("E-mail address can't be left blank");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('@') == -1) {
      	alert("Error in e-mail address");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('.') == -1) {
      	alert("Error in e-mail address");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('@') != id1.email.value.lastIndexOf('@')) {
      	alert("Please Specify One E-mail address only");
      	id1.email.focus();
      	return false;
   	}   	
   	
   	if (chktrim(id1.address.value).length ==0) {
      	alert("Enter Street Address");
      	id1.address.focus();
      	return false;
   	}
   	if (id1.country.options[id1.country.selectedIndex].value=="")  {
      	alert("Select your Country");
      	id1.country.focus();
      	return false;
   	}
	if (!parseInt(id1.ph_ccode.value)) {
        alert("Enter Phone Number - Country Code");
        id1.ph_ccode.focus();
        return false;
     }
     if (!parseInt(id1.ph_acode.value)) {
        alert("Incorrect Phone - Area Code");
        id1.ph_acode.focus();
        return false;
     }
      if (!parseInt(id1.ph_number.value)) {
        alert("Incorrect Phone Number");
        id1.ph_number.focus();
        return false;
     }
}

function bannerValid(id1) {
   	if (chktrim(id1.comp_name.value).length==0) {
      	alert("Enter Company / Organization Name ");
	  	id1.comp_name.focus();
      	return false;
   	}
   	if (chktrim(id1.your_name.value).length==0) {
      	alert("Enter Your Name ");
	  	id1.your_name.focus();
      	return false;
   	}   	    	 	
   	if (chktrim(id1.email.value).length == 0) {
      	alert("E-mail address can't be left blank");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('@') == -1) {
      	alert("Error in e-mail address");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('.') == -1) {
      	alert("Error in e-mail address");
      	id1.email.focus();
      	return false;
   	}
   	if (id1.email.value.indexOf('@') != id1.email.value.lastIndexOf('@')) {
      	alert("Please Specify One E-mail address only");
      	id1.email.focus();
      	return false;
   	}   	
   	
   	if (chktrim(id1.address.value).length ==0) {
      	alert("Enter Address");
      	id1.address.focus();
      	return false;
   	}
   	if (id1.country.options[id1.country.selectedIndex].value=="")  {
      	alert("Select your Country");
      	id1.country.focus();
      	return false;
   	}
	if (id1.ph_ccode.value.length ==0) {
        alert("Enter Phone Number - Country Code");
        id1.ph_ccode.focus();
        return false;
     }
     if (!parseInt(id1.ph_acode.value)) {
        alert("Incorrect Phone - Area Code");
        id1.ph_acode.focus();
        return false;
     }
     if (chktrim(id1.ph_number.value).length ==0) {
        alert("Enter Phone Number");
        id1.ph_number.focus();
        return false;
     }   
	if (chktrim(id1.detail_req.value).length<10 || chktrim(id1.detail_req.value).length>1000){
    	if (id1.product_desc.value.length>1000){
    		alert("Enter your requirement(s) details [ maximum 1000 characters ] ");
		}
		else {
    		alert("Enter your requirement(s) details [ minimum 10 characters ] ");
		}
        id1.detail_req.focus();
        return (false);
	}
     
}

function validSrchSK() {
   	if (chktrim(document.form12.sk.value).length==0) {
      	alert("Enter Product Keyword(s)");
	  	document.form12.sk.focus();
      	return false;
   	}
   	if (document.form12.busTy.options[document.form12.busTy.selectedIndex].value=="")  {   	
      	alert("Select Product Business Catetory Type ");
      	document.form12.busTy.focus();
      	return false;
   	}   	
   	
}

function chkLen1() {
	document.form1.chrlen.value=document.form1.detail_req.value.length;
    if (document.form1.detail_req.value.length>1000) {
    	alert("your text exceed 1000 characters");
        document.form1.detail_req.focus();
        return false;
	}
}
function chkLen2() {
	document.form1.chrlen.value=document.form1.catgDetl.value.length;
}
function translator(pattern) {
	var open_in_same_window = 1;

	var my_location = unescape(document.location.toString());
	var new_location ='';
	var new_pattern = '';
	if (my_location.indexOf('translate_c?') != -1) {
		/// From google...
		var indexof_u = my_location.indexOf('u=');
		if (indexof_u == -1) {
			new_location = document.location;
		}
		else {
			var subs = my_location.substring(indexof_u, my_location.length);
			var ss = subs.split('&');
			new_location = ss[0].substring(2, ss[0].length);
		}
	}
	else {
		new_location = document.location;
	}

	indexof_p = pattern.indexOf('|');

	var isen = '';
	if (indexof_p == -1) {
		indexof_p1 = pattern.indexOf('><');
		if (indexof_p1 == -1) {
			new_pattern = pattern;
			if (pattern == 'en') {
				isen = 1;
			}
		}
		else {
			var psplit =pattern.split('><');
			new_pattern = psplit[0]+'|'+psplit[1];
			if (psplit[1] == 'en') {
				isen = 1;
			}
		}
	}
	else {
		var psplit = pattern.split('|');
		new_pattern = psplit[0]+'|'+psplit[1];
		if (psplit[1] == 'en') {
			isen = 1;
		}
	}

	var thisurl = '';
	if (isen == 1) {
		thisurl = new_location;
	}
	else {
		thisurl = 'http://translate.google.com/translate_c?langpair=' + new_pattern + "&u=" + new_location;
	}

	if (open_in_same_window == 1) {
		window.location.href = thisurl;
	}
	else {
		if (CanAnimate ){
			msgWindow=window.open('' ,'subwindow','toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0');
			msgWindow.focus();
			msgWindow.location.href = thisurl;
		}
		else {
			msgWindow=window.open(thisurl,'subwindow','toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0');
		}
	}
}

function validAddCatg(id1) {
   	if (chktrim(id1.catgName.value).length==0) {
      	alert("Enter Category/Product Name ");
	  	id1.catgName.focus();
      	return false;
   	}
   	if (chktrim(id1.flnm.value).length==0) {
      	alert("Enter File  Name ");
	  	id1.flnm.focus();
      	return false;
   	} 	 	
}   	

function translator(pattern) {
	var open_in_same_window = 1;

	var my_location = unescape(document.location.toString());
	var new_location ='';
	var new_pattern = '';
	if (my_location.indexOf('translate_c?') != -1) {
		/// From google...
		var indexof_u = my_location.indexOf('u=');
		if (indexof_u == -1) {
			new_location = document.location;
		}
		else {
			var subs = my_location.substring(indexof_u, my_location.length);
			var ss = subs.split('&');
			new_location = ss[0].substring(2, ss[0].length);
		}
	}
	else {
		new_location = document.location;
	}

	indexof_p = pattern.indexOf('|');

	var isen = '';
	if (indexof_p == -1) {
		indexof_p1 = pattern.indexOf('><');
		if (indexof_p1 == -1) {
			new_pattern = pattern;
			if (pattern == 'en') {
				isen = 1;
			}
		}
		else {
			var psplit =pattern.split('><');
			new_pattern = psplit[0]+'|'+psplit[1];
			if (psplit[1] == 'en') {
				isen = 1;
			}
		}
	}
	else {
		var psplit = pattern.split('|');
		new_pattern = psplit[0]+'|'+psplit[1];
		if (psplit[1] == 'en') {
			isen = 1;
		}
	}

	var thisurl = '';
	if (isen == 1) {
		thisurl = new_location;
	}
	else {
		thisurl = 'http://translate.google.com/translate_c?langpair=' + new_pattern + "&u=" + new_location;
	}

	if (open_in_same_window == 1) {
		window.location.href = thisurl;
	}
	else {
		if (CanAnimate ){
			msgWindow=window.open('' ,'subwindow','toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0');
			msgWindow.focus();
			msgWindow.location.href = thisurl;
		}
		else {
			msgWindow=window.open(thisurl,'subwindow','toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0');
		}
	}
}
function validSponCatg(id1) {
   	if (chktrim(id1.catgName.value).length==0) {
      	alert("Enter Category/Product Name ");
	  	id1.catgName.focus();
      	return false;
   	}
	if (id1.pageTy.options[id1.pageTy.selectedIndex].value=="Y" && chktrim(id1.file_name.value).length==0) {
      	alert("Enter File  Name ");
	  	id1.file_name.focus();
      	return false;
   	}
	if (id1.pageTy.options[id1.pageTy.selectedIndex].value=="" && chktrim(id1.file_name.value).length>0) {
      	alert("Select Page Create Y/N ");
	  	id1.pageTy.focus();
      	return false;
   	}   	 	 	
} 

function inquiry_form_submit(mem_slno,busty,catgID) {

	window.location='/inquiry.htm?msl='+mem_slno+'&busty='+busty+'&c='+catgID+'';
}

function site_url(mem_slno) {
  popupWin = window.open('/show-website.php?mem_slno='+mem_slno+'','newwin','menubar=yes,toolbar=yes,location=yes,directories=yes,titlebar=yes,status=yes,scrollbars=yes,resizable=yes');
}
function tradelead_link(site_ty, tl_slno) {
	if (site_ty=="EI") {
		url_1 = 'http://www.exportersindia.com/trade/trade-search.php?pty_ids='+tl_slno+'&id=detail&opp=offer';
	}
	else {
		url_1 = 'http://www.indianyellowpages.com/trade-leads/trade-search.php?pty_ids='+tl_slno+'&id=detail&opp=offer';		
	}
  	popupWin = window.open(url_1, 'newwin', 'menubar=yes,toolbar=yes,location=yes,directories=yes,titlebar=yes,status=yes,scrollbars=yes,resizable=yes');	
}

if (document.images)
{
  home=new Image;
  home.src="/images/home.gif";
  homeOver=new Image;
  homeOver.src="/images/homeOver.gif";

  contactus=new Image;
  contactus.src="/images/contactus.gif";
  contactusOver=new Image;
  contactusOver.src="/images/contactusOver.gif";

  inquiry=new Image;
  inquiry.src="/images/inquiry.gif";
  inquiryOver=new Image;
  inquiryOver.src="/images/inquiryOver.gif";

  feedback=new Image;
  feedback.src="/images/feedback.gif";
  feedbackOver=new Image;
  feedbackOver.src="/images/feedbackOver.gif";

  sitemap=new Image;
  sitemap.src="/images/sitemap.gif";
  sitemapOver=new Image;
  sitemapOver.src="/images/sitemapOver.gif";
}


function mOver(picName)
{
	if (document.images) {
		pic=eval(picName + "Over.src")
		document[picName].src=pic;
	}
}

function mOut(picName)
{
	if(document.images)
	{
		pic=eval(picName + ".src");
		document[picName].src=pic;
	}
}
