function xigajax(xPhpFile,xElementId,doIt){if(doIt){if(xElementId=="detailzone"||xElementId=="mainzone")
{window.scroll(0,0);}
var onDate=new Date();if(xElementId){if(xElementId=="detailzone")
xElementId="mainzone";if(xElementId=="mainzone"){document.getElementById(xElementId).innerHTML='<div style="text-align:center; padding-top:30px"><img src="/usa/templates/default/images/loading.gif" border="0"></div>';}else{document.getElementById(xElementId).style.display="";}}
sendtotext(xPhpFile+'&rand='+onDate,xElementId);}else{document.getElementById("theframe").src="/usa/helper3.htm?"+xPhpFile+"~"+xElementId;}
return false;}
function resetiframe(){document.getElementById("currencylist").style.display='none';theframe.location.reload();}
function searchme(){var searchterms=document.getElementById("searchbox").value;var searchin=document.getElementById("searchin").value;var modifier=document.getElementById("modifier").value;var prodtype=document.getElementById("prodtype").value;var searchclean=URLEncode(searchterms);xigajax("/usa/workerbee.php?dosearch=1&searchterms="+searchclean+"&searchin="+searchin+"&modifier="+modifier+"&prodtype="+prodtype,"mainzone");return false;}
function showloading(){}
function clearloading(){}
function showdetail(){var o=document.getElementById("detailzone");if(o.style.display=="none"){document.getElementById("detailcontent").innerHTML="";}
document.getElementById("mainzone").style.display="none";o.style.display="block";}
function showmain(){document.getElementById("detailzone").style.display="none";document.getElementById("mainzone").style.display="block";}
function outsidesearchme(t,i,m,p,s,o){var searchterms=t;var searchin=i;var modifier=m;var prodtype=p;var special=s;if(o){var order=o;}else{var order="";}
var searchclean=URLEncode(searchterms);xigajax("/usa/workerbee.php?dosearch=1&searchterms="+searchclean+"&searchin="+searchin+"&modifier="+modifier+"&prodtype="+prodtype+"&special="+s+"&order="+order,"mainzone");return false;}
function URLEncode(t)
{var SAFECHARS="0123456789"+"ABCDEFGHIJKLMNOPQRSTUVWXYZ"+"abcdefghijklmnopqrstuvwxyz"+"-_.!~*'()";var HEX="0123456789ABCDEF";var plaintext=t;var encoded="";for(var i=0;i<plaintext.length;i++){var ch=plaintext.charAt(i);if(ch==" "){encoded+="+";}else if(SAFECHARS.indexOf(ch)!=-1){encoded+=ch;}else{var charCode=ch.charCodeAt(0);if(charCode>255){alert("Unicode Character '"
+ ch
+"' cannot be encoded using standard URL encoding.\n"+"(URL encoding only supports 8-bit characters.)\n"+"A space (+) will be substituted.");encoded+="+";}else{encoded+="%";encoded+=HEX.charAt((charCode>>4)&0xF);encoded+=HEX.charAt(charCode&0xF);}}}
return encoded;};function lookupship(){var shipcountry=document.getElementById("shippingcountry").value;xigajax("/usa/workerbee.php?lookupshipping=1&entry_country="+shipcountry,"lookupshipdata");return false;}
function flashsuccess(prodID,x){document.getElementById("productsucmsg"+prodID).style.display="block";document.getElementById("productsucmsg"+prodID).innerHTML="<strong>Adding to "+x+"...</strong>";setTimeout('document.getElementById("productsucmsg'+prodID+'").innerHTML = ""',1000);setTimeout('document.getElementById("productsucmsg'+prodID+'").style.display = "none"',1005);}
function switchpull(o){document.forms[0].prodtype.selectedIndex=o;}
function resetsearch(){var s=document.getElementById("searchbox").value;if(s=="Search the site"){document.getElementById("searchbox").value='';}}
function findsugg(i){xigajax("/usa/con_suggest.php?productid="+i,"thesuggestions");return false;}
