/* ##################### */ function checkLoginOnFocus() { if(document.getElementById("username").value == "User Name") document.getElementById("username").value = ""; if(document.getElementById("password").value == "******") document.getElementById("password").value = ""; } function checkLoginOnBlur() { if(document.getElementById("username").value == "") document.getElementById("username").value = "User Name"; if(document.getElementById("password").value == "") document.getElementById("password").value = "******"; } function clearValues(theForm) //empty all field in a form { for(var i=0;i0) { while(strVar.charAt(0)==" ") strVar=strVar.substring(1,strVar.length); while(strVar.charAt(strVar.length-1)==" ") strVar=strVar.substring(0,strVar.length-1); } return strVar; } function isNotAlphabets(str){ for (var i = 0; i < str.length; i++) { var ch = str.substring(i, i + 1); if((ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch)) { return true; } } return false; } function isNotNumeric(str){ for (var i = 0; i < str.length; i++) { var ch = str.substring(i, i + 1); if((ch < '0' || '9' < ch)) { if(ch == "-" || ch == ".") continue; return true; } } return false; } /*To check the Login ID of the User*/ function isNotID(str){ for (var i = 0; i < str.length; i++) { var ch = str.substring(i, i + 1); if((ch < '0' || '9' < ch) && ((ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch))) { if(ch == "_") continue; return true; } } return false; } function isValidEmail(emailid){ var l=emailid.length; if(l==0) { return false; } if(l!=0) { var a=emailid.indexOf('@'); var d=emailid.lastIndexOf('.'); var str1=emailid.substr(0,a); var str2=emailid.substr(a+1,d-a-1); var str3=emailid.substr(d+1,l); var len1=str1.length; var len2=str2.length; var len3=str3.length; if(a<0 || d<2) { alert ("Check for missing '@' or '.' "); return false; } else if (a>d) { alert ("Invalid email. Please enter correct email address"); return false; } if (len1<=1 || len2<=1 || len3 <=1) { alert ("Invalid email. Please enter correct email address"); return false; } } return true; } /*Used in All Cp Modules*/ function checkAll(checked) { for(var i=0;i0) msg = msg + 'Do You Like to remove ' + total +' records ?'; else { alert("Please check the items to remove !"); return false; } if(msg.length >0) { var flag; flag = confirm(msg + " \n If Yes Press \"OK\" else Press \"Cancel\"."); if(flag == true) return true; } } return false; } /*######### Delete in the CP folder files*/ function deleteAlert(theForm) { var records = theForm.records.value; var total = 0; var msg = ""; if(records>0) { for(i=0; i0) msg = msg + 'Do You Like to remove ' + total +' records ?'; else { alert("Please check the items to remove !"); return false; } if(msg.length >0) { var flag; flag = confirm(msg + " If Yes Press \"OK\" else Press \"Cancel\"."); if(flag == true) return true; } } //alert("You can not delete items"); return false; } //################### function bookmark() { window.external.AddFavorite(url,title); } // JavaScript Document function changecolor(row) { row.className='blue'; } function restorecolor(row) { row.className='white'; } var pop=''; function openwin(nm,width,height) { var name=nm; if (pop && !pop.closed) { pop.close(); } pop=eval("window.open('"+name+"','NewWIN','chrome[4],toolbar=no,left=5,top=5,width="+width+",height="+height+",directories=no,menubar=no,SCROLLBARS=yes,left=2,right=2')"); if (!pop.opener) popUpWin.opener = self; } function closewin() { window.close(); } function checkPassword(chk) { if(chk.userName.value.length==0) { alert("Please Select a User"); chk.userName.focus(); return false; } if(chk.npass.value.length==0) { alert("Please type new password"); chk.npass.focus(); return false; } if(chk.rpass.value.length==0) { alert("Please Re-Type the new password"); chk.rpass.focus(); return false; } if(chk.npass.value!=chk.rpass.value) { alert("New password and Re-Type password does not match"); chk.npass.value=""; chk.rpass.value=""; chk.npass.focus(); return false; } } function checkpass(form1) { if(form1.username.value.length==0) { alert ("Please Enter Username!!!"); form1.username.focus(); return false; } if(form1.username.value.length<4) { alert ("Please Enter Atleast 4 Characters in Login ID!!!"); form1.login.focus(); return false; } if(form1.password.value.length==0) { alert ("Please Enter Valid Password !!!"); form1.password.focus(); return false; } if(form1.password.value.length<4) { alert ("Please Enter Atleast 4 Characters in Password!!!"); form1.password.focus(); return false; } return true; } function addUser(chk) { if(chk.userName.value.length==0) { alert("Please type a user name"); chk.userName.focus(); return false; } if(chk.npass.value.length==0) { alert("Password field can not be left blank"); chk.npass.focus(); return false; } if(chk.rpass.value.length==0) { alert("Re-Type Password field can not be left blank"); chk.rpass.focus(); return false; } if(chk.npass.value!=chk.rpass.value) { alert("Password and Re-Type password does not match"); chk.npass.value=""; chk.rpass.value=""; chk.npass.focus(); return false; } } function checkLogin(chk) { if(chk.userName.value.length==0) { alert("User Name can not be left blank"); chk.userName.focus(); return false; } if(chk.password.value.length==0) { alert("Password can not be left blank"); chk.password.focus(); return false; } } function autoAlertCheck(theForm){ //Email var email = theForm.email.value; var name = theForm.name.value; if(name.length == 0) { alert("Please enter Name"); theForm.name.focus(); return false; } if(name.length < 3) { alert("Please Atleast THREE (3) characters."); theForm.name.focus(); return false; } if(email.length == 0) { alert("Please enter Email ID"); theForm.email.focus(); return false; } if(isValidEmail(email) == 0) { theForm.email.focus(); return false; } return true; } function validEmail(str) { mailRE = new RegExp( ); mailRE.compile( '^[\._a-z0-9-]+@[\.a-z0-9-]+[\.]{1}[a-z]{2,4}$', 'gi' ); return (mailRE.test(str)); } function deleteAlert2(theForm) { var records = theForm.records.value; var total = 0; var msg = ""; if(records>0) { for(i=0; i0) msg = msg + 'Do You Like to remove ' + total +' records ?'; else { alert("Please check the items to remove !"); return false; } if(msg.length >0) { var flag; flag = confirm(msg + " If Yes Press \"OK\" else Press \"Cancel\"."); if(flag == true) return true; } } //alert("You can not delete items"); return false; } function checkpass1(form) { if(form2.searchtxt.value.length==0) { alert ("Search Text Should not be Empty!!!"); form2.searchtxt.focus(); return false; } if(form2.searchtxt.value.length<3) { alert ("Please!\n\nEnter Atleast 3 Characters!!!"); form2.searchtxt.focus(); return false; } return true; } function MM_openBrWindow(theURL,winName,features) { //v2.0 alert(theURL) window.open(theURL,winName,features); } /* CONVERT DATA INTO STANDARD CASE START*/ var first_nmchk = "Y"; var first_subchk = "Y"; function chk_case(f_name){ var str = ""; var matchstr = ""; var chk_value = "N"; var modified1 = "N"; var b_str = eval("document.catForm."+f_name+".value"); var abbr = ["MP3","LCD","USB","DVD","TV","ATV","LED","PC","CD","PVC","TFT","FM","HDD","GSM","DVR","DC","CCTV","HP","PP","3D","EVA","CDMA","CCD","PU","RC","CRT","VCD","PE","RF","ID","AC","TFT-LCD","PDA","BBQ","VGA","UV","PDP","PCB","PET","MP4","GPS","UPS","OEM","AB","CNC","PTFE","CPU","IC","LV","EEC","IR","SIM","IQF","TL","NZ","IP","EL","OLED","SD","SMD","MF","TN","PCI","ADSL","RO","CD-R","PCMCIA","LG","PS","MOP","HDPE","LPG","LAN","CE","CMOS","ATX","MPEG4","PVA","VAIO","HMS","NYA","AV","HD","ATI","IBM","PTC","PIN","PS2","ECG","AAA","4WD","PCS","DDR","PA","RCA","ABS","AA","DIY","LDPE","MMC","UFO","IPOD","MDF","CDR","MTB","DIVX","HDTV"]; var prep = ["of","for","and","or","with","in","the"]; var reg = new RegExp("") if(first_nmchk == "Y"){ // first_nmchk = "N"; keyValue = eval("document.catForm."+f_name+".value"); if(keyValue.search(/[A-Z]/)!=-1 && keyValue.search(/[a-z]/)==-1 ) { modified1 = "Y"; keyValue = keyValue.toLowerCase(); } if(keyValue.search(/\b[a-z]+[A-Z]/)!=-1) { keyValue = keyValue.toLowerCase(); } for(i=0;keyValue.length > i;i++){ if(i ==0) str = keyValue.charAt(i).toUpperCase(); else if(keyValue.charAt(i) == "{" ||keyValue.charAt(i) == "}" ||keyValue.charAt(i) == "(" ||keyValue.charAt(i) == ")" ||keyValue.charAt(i) == "<" ||keyValue.charAt(i) == ">" ||keyValue.charAt(i) == " " ||keyValue.charAt(i) == "." ||keyValue.charAt(i) == "," ||keyValue.charAt(i) == ":" ||keyValue.charAt(i) == ";" ||keyValue.charAt(i) == "!" ||keyValue.charAt(i) == "&" ||keyValue.charAt(i) == "/"){ chk_value = "Y"; str = str + keyValue.charAt(i); }else if(chk_value == "Y"){ str = str + keyValue.charAt(i).toUpperCase(); chk_value = "N" }else str = str + keyValue.charAt(i); } for(i=0;abbr.length > i;i++){ reg.compile("\\b"+abbr[i]+"\\b","gi"); str = str.replace(reg, abbr[i]); } for(i=0;prep.length > i;i++){ reg.compile(" "+prep[i]+"\\b","gi"); str = str.replace(reg, " "+prep[i]); } reg.compile("\\b[a-zA-Z]+[0-9-]*[0-9]+\\b","gi"); i=0; while((pos = str.substring(i,str.length).search(reg))!=-1){ matchstr = str.substring(i,str.length).match(reg); if (pos > -1){ pos = pos+i; str = str.substring(0,pos)+str.substring(pos,pos+matchstr[0].length).toUpperCase()+str.substring(pos+matchstr[0].length,str.length); } i = pos + matchstr[0].length; } con_nm = eval("document.catForm."+f_name); con_nm.value = str; } } /* CONVERT DATA INTO STANDARD CASE END*/ function checkForm(theForm) { if(theForm.address.value.indexOf('href=') != -1 || theForm.address.value.indexOf('Href=') != -1) { alert("Do not allow to enter href= !!!"); theForm.address.focus(); return false; } if(theForm.com_profile.value.indexOf('href=') != -1 || theForm.com_profile.value.indexOf('Href=') != -1) { alert("Do not allow to enter href= !!!"); theForm.com_profile.focus(); return false; } if(theForm.search_keys.value.indexOf('href=') != -1 || theForm.search_keys.value.indexOf('Href=') != -1) { alert("Do not allow to enter href= !!!"); theForm.search_keys.focus(); return false; } //compnay Name if(theForm.c_name.value.length == 0) { alert("Company Name Should Not Be Empty!!!"); theForm.c_name.focus(); return false; } if(theForm.c_name.value.length < 6) { alert("Company Name Entered Atleast 6 Characters!!!"); theForm.c_name.focus(); return false; } //Address if(theForm.address.value.length == 0) { alert("Address Should Not Be Empty!!!"); theForm.address.focus(); return false; } if(theForm.address.value.length>255) { alert("Address Entered upto 255 characters only!!!"); theForm.address.focus(); return false; } //City if(theForm.city.value.length == 0) { alert("City Should Not Be Empty!!!"); theForm.city.focus(); return false; } //Country if(theForm.country.value.length == 0) { alert("Country Should Not Be Select!!!"); theForm.country.focus(); return false; } // phone if(theForm.phone.value.length == 0) { alert("Phone Should Not Be Select!!!"); theForm.phone.focus(); return false; } //WEBSITE VALIDATION // var web=theForm.website.value; // var newweb=web.substring(0,4); // if(newweb=='http') // { // alert ("You Enter 'http' in website.\nPlease truncate 'http'!!!"); // theForm.website.select(); // return false; // } le=theForm.website.value.length; if(le>0) { if (theForm.website.value != 'http://') { var lastdot = theForm.website.value.lastIndexOf("."); if(lastdot>=(le-2) || lastdot<=3) { alert ("Please Enter Valid Website!!!"); theForm.website.select(); return false; } } } //E-Mail if(theForm.email1.value.length == 0) { alert("Email-1 Should Not Be Empty!!!"); theForm.email1.focus(); return false; } //now let's check if email is correct. This field name is "email1" if(notValidEmail(theForm.email1)) { alert("Please Enter valid E-mail Address in Email-1 !!!"); theForm.email1.select(); theForm.email1.focus(); return false; } //now let's check if email is correct. This field name is "email2" if( notValidEmail( theForm.email2 ) && theForm.email2.value !='') { alert("Please Enter valid E-mail Address in Email-2 !!!"); theForm.email2.focus(); return false; } theForm.image_path.value = theForm.image_link.value; /* //COMPANY PROFILE if(theForm.com_profile.value.length == 0) { alert("Company Profile Should Not Be Blank!!!"); theForm.com_profile.focus(); return false; } if(theForm.com_profile.value.length <20) { alert("In Company Profile Enter Atleast 20 Characters!!!"); theForm.com_profile.focus(); return false; }*/ //Search Keys if(theForm.search_keys.value.length == 0) { alert("Products Should Not Be Empty!!!"); theForm.search_keys.focus(); return false; } if(theForm.search_keys.value.length < 6) { alert("Products Entered Atleast 6 Characters!!!"); theForm.search_keys.focus(); return false; } if(theForm.verification.value.length==0) { alert("Please enter verification code !!!"); theForm.verification.focus(); return false; } if(theForm.verification.value!=theForm.verification_code.value) { alert("Verification code does not match !!!"); theForm.verification.focus(); return false; } return true; } function notValidEmail( str ) { mailRE = new RegExp( ); mailRE.compile( '^[\._a-z0-9-]+@[\.a-z0-9-]+[\.]{1}[a-z]{2,4}$', 'gi' ); return !(mailRE.test( str.value )); } /*CHECK EMAIL VALIDATION FUNCTION*/ function textLimitCheck(thisArea, maxLength, messageCount) { if (thisArea.value.length > maxLength) { alert(maxLength + ' characters limit. \rExcessive data will be truncated.'); thisArea.value = thisArea.value.substring(0, maxLength); thisArea.focus(); } //messageCount.innerHTML = thisArea.value.length; document.getElementById(messageCount).innerHTML = thisArea.value.length; } /*CONVERT INTO LOWER CASE*/ function lower_web(f_name) { keyValue = f_name; keyValue = keyValue.toLowerCase(); document.catForm.website.value=keyValue; } function lower_email1(f_name) { keyValue = f_name; keyValue = keyValue.toLowerCase(); document.catForm.email1.value=keyValue; } function lower_email2(f_name) { keyValue = f_name; keyValue = keyValue.toLowerCase(); document.catForm.email2.value=keyValue; } var on_color = "#FF0000"; var off_color = "#1F48BB"; var blink_onoff = 1; var blinkspeed= 500; function blink() { if( blink_onoff == 1) { document.all.blink.style.color = on_color; blink_onoff = 0; } else { document.all.blink.style.color = off_color; blink_onoff = 1; } } function addToBasket() { searchForm_detail.action=searchForm_detail.send_action.value; searchForm_detail.submit(); } function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } function __ajaxObject( url, pArr, funName ) { xmlHttp = false; if( window.XMLHttpRequest ) xmlHttp = new XMLHttpRequest( ) ; else if( window.ActiveXObject ) xmlHttp = new ActiveXObject( "Microsoft.XMLHTTP" ); if( xmlHttp ) { parameters = ''; for( i = 0; i < pArr.length; i++ ) { if( parameters != '' ) { parameters += "&" + pArr[i][0] + "=" + encodeURI( pArr[i][1] ); } else { parameters = pArr[i][0] + "=" + encodeURI( pArr[i][1] ); } } xmlHttp.open( 'post', url, true ); xmlHttp.setRequestHeader( "Content-type", "application/x-www-form-urlencoded" ); xmlHttp.setRequestHeader( "Content-length", parameters.length ); xmlHttp.setRequestHeader( "Connection", "close" ); xmlHttp.send( parameters ); xmlHttp.onreadystatechange = function( ) { if( xmlHttp.readyState == 4 ) { //xmlHttp.XML = xmlHttp.responseXML != null ? xmlHttp.responseXML : ''; //xmlHttp.TEXT = xmlHttp.responseText != null ? xmlHttp.responseText : ''; eval( funName ); } }; return xmlHttp; } } function shiftTab(id){ if(id == "company"){ document.getElementById("t1").style.display = "none"; document.getElementById("trade").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/srch-but-bg1.gif)"; document.getElementById("t3").style.display = "none"; document.getElementById("trade").className = "link_black"; document.getElementById("p1").style.display = "none"; document.getElementById("products").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/srch-but-bg1.gif)"; document.getElementById("p3").style.display = "none"; document.getElementById("products").className = "link_black"; document.getElementById("l1").style.display = "inline"; document.getElementById("c1").style.display = "inline"; document.getElementById("c11").src = "http://www.asianbuyersguide.com/images/srch-top-left.gif"; document.getElementById("company").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/srch-but-bg.gif)"; document.getElementById("c3").style.display = "inline"; document.getElementById("company").className = "link_white"; document.getElementById("companyFrm").style.display = "inline"; document.getElementById("productsFrm").style.display = "none"; document.getElementById("tradeFrm").style.display = "none"; } else if(id == "products"){ //document.getElementById("c11").style.display = "none"; document.getElementById("c11").src = "http://www.asianbuyersguide.com/images/srch-top-left11.gif"; document.getElementById("company").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/srch-but-bg1.gif)"; document.getElementById("c3").style.display = "none"; document.getElementById("company").className = "link_black"; document.getElementById("t1").style.display = "none"; document.getElementById("trade").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/srch-but-bg1.gif)"; document.getElementById("t3").style.display = "none"; document.getElementById("trade").className = "link_black"; document.getElementById("l1").style.display = "inline"; document.getElementById("p1").style.display = "inline"; document.getElementById("products").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/srch-but-bg.gif)"; document.getElementById("p3").style.display = "inline"; document.getElementById("products").className = "link_white"; document.getElementById("companyFrm").style.display = "none"; document.getElementById("productsFrm").style.display = "inline"; document.getElementById("tradeFrm").style.display = "none"; } else if(id == "trade"){ document.getElementById("c11").src = "http://www.asianbuyersguide.com/images/srch-top-left11.gif"; document.getElementById("company").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/srch-but-bg1.gif)"; document.getElementById("c3").style.display = "none"; document.getElementById("company").className = "link_black"; document.getElementById("p1").style.display = "none"; document.getElementById("products").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/srch-but-bg1.gif)"; document.getElementById("p3").style.display = "none"; document.getElementById("products").className = "link_black"; document.getElementById("l1").style.display = "none"; document.getElementById("t1").style.display = "inline"; document.getElementById("trade").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/srch-but-bg.gif)"; document.getElementById("t3").style.display = "inline"; document.getElementById("trade").className = "link_white"; document.getElementById("companyFrm").style.display = "none"; document.getElementById("productsFrm").style.display = "none"; document.getElementById("tradeFrm").style.display = "inline"; } } function shiftLatestTab(id){ if(id == "ltcom"){ document.getElementById("more").innerHTML = 'More'; document.getElementById("lcl").src = "http://www.asianbuyersguide.com/images/trade-leads-lt.gif"; document.getElementById("lcr").src = "http://www.asianbuyersguide.com/images/trade-leads-rt.gif"; document.getElementById("lol").src = "http://www.asianbuyersguide.com/images/trade-leads-lt1.gif"; document.getElementById("lor").src = "http://www.asianbuyersguide.com/images/trade-leads-rt1.gif"; document.getElementById("losl").src = "http://www.asianbuyersguide.com/images/trade-leads-lt1.gif"; document.getElementById("losr").src = "http://www.asianbuyersguide.com/images/trade-leads-rt1.gif"; document.getElementById("lobl").src = "http://www.asianbuyersguide.com/images/trade-leads-lt1.gif"; document.getElementById("lobr").src = "http://www.asianbuyersguide.com/images/trade-leads-rt1.gif"; document.getElementById("lc").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/trade-leads-bg.gif)"; document.getElementById("los").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/trade-leads-bg1.gif)"; document.getElementById("lob").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/trade-leads-bg1.gif)"; document.getElementById("lo").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/trade-leads-bg1.gif)"; document.getElementById("latestMsg").innerHTML = " » Latest updated Company Listing of Manufactures, Exporters & Importers."; document.getElementById("ltcom").style.display = "inline"; document.getElementById("ltoffer").style.display = "none"; document.getElementById("ltbuy").style.display = "none"; document.getElementById("ltsale").style.display = "none"; } else if(id == "ltoffer"){ document.getElementById("more").innerHTML = 'More'; document.getElementById("lcl").src = "http://www.asianbuyersguide.com/images/trade-leads-lt1.gif"; document.getElementById("lcr").src = "http://www.asianbuyersguide.com/images/trade-leads-rt1.gif"; document.getElementById("lol").src = "http://www.asianbuyersguide.com/images/trade-leads-lt.gif"; document.getElementById("lor").src = "http://www.asianbuyersguide.com/images/trade-leads-rt.gif"; document.getElementById("losl").src = "http://www.asianbuyersguide.com/images/trade-leads-lt1.gif"; document.getElementById("losr").src = "http://www.asianbuyersguide.com/images/trade-leads-rt1.gif"; document.getElementById("lobl").src = "http://www.asianbuyersguide.com/images/trade-leads-lt1.gif"; document.getElementById("lobr").src = "http://www.asianbuyersguide.com/images/trade-leads-rt1.gif"; document.getElementById("lc").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/trade-leads-bg1.gif)"; document.getElementById("los").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/trade-leads-bg1.gif)"; document.getElementById("lob").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/trade-leads-bg1.gif)"; document.getElementById("lo").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/trade-leads-bg.gif)"; document.getElementById("latestMsg").innerHTML = " » Latest offer Listing of Buy, Sale, Services."; document.getElementById("ltcom").style.display = "none"; document.getElementById("ltoffer").style.display = "inline"; document.getElementById("ltbuy").style.display = "none"; document.getElementById("ltsale").style.display = "none"; } else if(id == "ltbuy"){ document.getElementById("more").innerHTML = 'More'; document.getElementById("lcl").src = "http://www.asianbuyersguide.com/images/trade-leads-lt1.gif"; document.getElementById("lcr").src = "http://www.asianbuyersguide.com/images/trade-leads-rt1.gif"; document.getElementById("lol").src = "http://www.asianbuyersguide.com/images/trade-leads-lt1.gif"; document.getElementById("lor").src = "http://www.asianbuyersguide.com/images/trade-leads-rt1.gif"; document.getElementById("losl").src = "http://www.asianbuyersguide.com/images/trade-leads-lt1.gif"; document.getElementById("losr").src = "http://www.asianbuyersguide.com/images/trade-leads-rt1.gif"; document.getElementById("lobl").src = "http://www.asianbuyersguide.com/images/trade-leads-lt.gif"; document.getElementById("lobr").src = "http://www.asianbuyersguide.com/images/trade-leads-rt.gif"; document.getElementById("lc").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/trade-leads-bg1.gif)"; document.getElementById("los").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/trade-leads-bg1.gif)"; document.getElementById("lob").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/trade-leads-bg.gif)"; document.getElementById("lo").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/trade-leads-bg1.gif)"; document.getElementById("latestMsg").innerHTML = " » Latest Buy offers."; document.getElementById("ltcom").style.display = "none"; document.getElementById("ltoffer").style.display = "none"; document.getElementById("ltbuy").style.display = "inline"; document.getElementById("ltsale").style.display = "none"; }else if(id == "ltsale"){ document.getElementById("more").innerHTML = 'More'; document.getElementById("lcl").src = "http://www.asianbuyersguide.com/images/trade-leads-lt1.gif"; document.getElementById("lcr").src = "http://www.asianbuyersguide.com/images/trade-leads-rt1.gif"; document.getElementById("lol").src = "http://www.asianbuyersguide.com/images/trade-leads-lt1.gif"; document.getElementById("lor").src = "http://www.asianbuyersguide.com/images/trade-leads-rt1.gif"; document.getElementById("losl").src = "http://www.asianbuyersguide.com/images/trade-leads-lt.gif"; document.getElementById("losr").src = "http://www.asianbuyersguide.com/images/trade-leads-rt.gif"; document.getElementById("lobl").src = "http://www.asianbuyersguide.com/images/trade-leads-lt1.gif"; document.getElementById("lobr").src = "http://www.asianbuyersguide.com/images/trade-leads-rt1.gif"; document.getElementById("lc").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/trade-leads-bg1.gif)"; document.getElementById("los").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/trade-leads-bg.gif)"; document.getElementById("lob").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/trade-leads-bg1.gif)"; document.getElementById("lo").style.backgroundImage = "url(http://www.asianbuyersguide.com/images/trade-leads-bg1.gif)"; document.getElementById("latestMsg").innerHTML = " » Latest Sale offers."; document.getElementById("ltcom").style.display = "none"; document.getElementById("ltoffer").style.display = "none"; document.getElementById("ltbuy").style.display = "none"; document.getElementById("ltsale").style.display = "inline"; } } function checkSearch(frm){ if(frm.keywords.value != ''){ if(frm.keywords.value.length < 3){ alert("Please enter at least three charecter"); frm.keywords.focus(); return false; } } return true; } function resetForm(frm){ frm.keywords.value = ''; frm.country.value = ''; if(frm.offer_type!=null) frm.offer_type.value = ''; if(frm.business_type!=null) frm.business_type.value = ''; frm.search_method[0].checked = "checked"; } function getCountryCombo(){ return document.write(""); }