var gsflash=new ccGs();
gsflash.init();
function ccGs(){
this.util=new clsUtil();
this.page=new clsPage();
this.cookie=new clsCookie();
this.init=startRun;
function startRun(){
this.util.init();
this.page.init();
}
function clsUtil(){
this.init=startRun;
function startRun(){
String.prototype.trim=fxTrim;
}
function fxTrim(_1){
var _2=null;
if(_1==null){
_1=this;
}
if(_1){
_2=new String(_1);
_2=_2.replace(/^\s+/,"");
_2=_2.replace(/\s+$/,"");
}
return (_2);
}
}
function clsPage(){
this.init=startRun;
function startRun(){
}
}
function clsCookie(){
this.set=ccSet;
this.get=ccGet;
this.remove=ccRemove;
this.buildMatrix=ccBuildMatrix;
function ccSet(_3,_4,_5,_6,_7,_8){
var _9=_3+"="+escape(_4)+";";
if(_5){
_9+="expires="+_5.toUTCString()+";";
}
if((_6)&&(_6!="")){
_9+="path="+_6+";";
}
if((_7)&&(_7!="")){
_9+="domain="+_7+";";
}
if(_8){
_9+="secure";
}
document.cookie=_9;
}
function ccGet(_a){
var _b=null;
var _c=this.buildMatrix(new String(document.cookie));
for(var _d=0;_d<_c.length;_d++){
if(_c[_d][0]==_a){
_b=_c[_d][1];
break;
}
}
return _b;
}
function ccBuildMatrix(_e){
var _f;
var _10=_e.split(";");
for(var _11=0;_11<_10.length;_11++){
_f=_10[_11].trim().split("=");
_f[1]=unescape(_f[1]);
_10[_11]=_f;
}
return _10;
}
function ccRemove(_12,_13,_14){
var _15,_16;
var _17=this.get(_12);
if(_17){
_15=_12+"=;";
if((_13)&&(_13!="")){
_15+="path="+_13+";";
}
if((_14)&&(_14!="")){
_15+="domain="+_14+";";
}
_16=new Date();
_16.setDate(_16.getDate()-1);
_15+="expires="+_16.toGMTString()+";";
document.cookie=_15;
}
return _17;
}
}
}
whatNavigator();
function whatNavigator(){
navigator.unknown=1;
navigator.ie=2;
navigator.netscape=4;
navigator.opera=8;
navigator.type=null;
navigator.version=null;
navigator.os=null;
navigator.jsVersion=1;
navigator.vbScriptEnabled=false;
navigator.hasPlugin=havPlugin;
navigator.selectPluginDetectType=whatPluginDetectType;
navigator.setCookie=setThisCookie;
navigator.hasFlash=havFlash;
startRun();
function startRun(){
var _18=gsflash.cookie.get("whatBrowser");
if(_18){
eval(_18);
navigator.selectPluginDetectType();
}else{
analyzeUsrAgnt();
document.write("<scr"+"ipt language=\"JavaScript1.1\">navigator.jsVersion = 1.1;</s"+"cript>");
document.write("<scr"+"ipt language=\"JavaScript1.2\">navigator.jsVersion = 1.2;</s"+"cript>");
document.write("<scr"+"ipt language=\"JavaScript1.3\">navigator.jsVersion = 1.3;</s"+"cript>");
document.write("<scr"+"ipt language=\"JavaScript1.4\">navigator.jsVersion = 1.4;</s"+"cript>");
document.write("<scr"+"ipt language=\"JavaScript1.5\">navigator.jsVersion = 1.5;</s"+"cript>");
document.write("<scr"+"ipt language=\"JavaScript1.6\">navigator.jsVersion = 1.6;</s"+"cript>");
document.write("<scr"+"ipt language=\"JavaScript2.0\">navigator.jsVersion = 2.0;</s"+"cript>");
document.write("<scr"+"ipt language=\"VBScript\">navigator.vbScriptEnabled = true</s"+"cript>");
document.write("<scr"+"ipt language=\"JavaScript\">navigator.selectPluginDetectType();navigator.setCookie();</s"+"cript>");
}
}
function analyzeUsrAgnt(){
var _19;
switch(navigator.appName){
case "Microsoft Internet Explorer":
navigator.type=navigator.ie;
navigator.version=getVersionIE();
navigator.os=getOsIE();
break;
case "Netscape":
navigator.type=navigator.netscape;
navigator.version=getVersionNets();
navigator.os=getOsNetscape();
break;
case "Opera":
navigator.type=navigator.opera;
navigator.version=getVersionOpera();
navigator.os=getOsOpera();
break;
default:
navigator.type=navigator.unknown;
navigator.version=parseFloat(navigator.appVersion);
navigator.os="Unknown";
}
}
function getVersionIE(){
var _1a=new String(navigator.userAgent);
var _1b=_1a.split("MSIE ");
return parseFloat(_1b[1]);
}
function getVersionNets(){
var _1c=new String(navigator.userAgent);
var _1d,_1e;
if(_1c.indexOf("Gecko")<0){
_1d=parseFloat(navigator.appVersion);
}else{
if(_1c.indexOf("Firefox")>-1){
_1e=_1c.split("Firefox");
_1e=_1e[1].split("/");
_1d=parseFloat(_1e[1]);
}else{
if(_1c.indexOf("Safari")>-1){
_1e=_1c.split("Safari");
_1e=_1e[1].split("/");
_1d=parseFloat(_1e[1]);
}else{
_1e=_1c.split("Netscape");
_1e=_1e[1].split("/");
_1d=parseFloat(_1e[1]);
}
}
}
return _1d;
}
function getVersionOpera(){
var _1f=new String(navigator.userAgent);
var _20=_1f.split("Opera/");
return parseFloat(_20[1]);
}
function getOsIE(){
var _21=new String(navigator.userAgent);
var _22=_21.split(";");
return _22[2].substr(0,_22[2].length);
}
function getOsNetscape(){
var _23;
var _24=new String(navigator.userAgent);
var _25=_24.split("(");
_25=_25[1].split(";");
if(this.version<6){
_23=_25[0];
}else{
_23=_25[2];
}
return _23;
}
function getOsOpera(){
var _26=new String(navigator.userAgent);
var _27=_26.split("(");
_27=(new String(_27[1])).split(";");
return _27[0];
}
function havPlugin(_28,_29){
var _2a=false;
switch(navigator.pluginDetectType){
case "plugins array":
for(var i=0;i<navigator.plugins.length;i++){
if(navigator.plugins[i].name.indexOf(_28)>=0){
_2a=true;
break;
}
}
break;
case "detectPlugin function":
_2a=fxDetectPlugin(_29);
break;
}
return _2a;
}
function whatPluginDetectType(){
if((navigator.plugins)&&(navigator.plugins.length>0)){
navigator.pluginDetectType="plugins array";
}else{
if(navigator.type=navigator.ie){
if(navigator.jsVersion>=1.3){
navigator.pluginDetectType="detectPlugin function";
document.write("<scr"+"ipt language=\"JavaScript1.3\">\n");
document.write("\tfunction fxDetectPlugin(strPluginName){\n");
document.write("\t\tvar blnHasPlugin = false;\n");
document.write("\t\ttry{\n");
document.write("\t\t\tvar obj = new ActiveXObject(strPluginName);\n");
document.write("\t\t\tblnHasPlugin = true;\n");
document.write("\t\t}   // try\n");
document.write("\t\tcatch(Exception){");
document.write("\t\t}\n");
document.write("\t\treturn blnHasPlugin;\n");
document.write("\t}   // fxCheckPlugin\n");
document.write("</s"+"cript>\n");
}else{
if(navigator.vbScriptEnabled){
navigator.pluginDetectType="detectPlugin function";
document.write("<scr"+"ipt language=\"VBScript\">\n");
document.write("\tfunction fxDetectPlugin(strPluginName)\n");
document.write("\t\ton error resume next\n");
document.write("\t\tif (IsObject(CreateObject(strPluginName))) then\n");
document.write("\t\t\tfxDetectPlugin = true\n");
document.write("\t\telse\n");
document.write("\t\t\tfxDetectPlugin = false\n");
document.write("\t\tend If\n");
document.write("\tend function\n");
document.write("</s"+"cript>\n");
}else{
navigator.pluginDetectType="none";
}
}
}
}
}
function setThisCookie(){
var _2c="navigator.type="+navigator.type+";\n"+"navigator.version="+navigator.version+";\n"+"navigator.os=\""+navigator.os+"\";\n"+"navigator.jsVersion="+navigator.jsVersion+";\n"+"navigator.vbScriptEnabled="+navigator.vbScriptEnabled+";\n";
gsflash.cookie.set("whatBrowser",_2c,null,"/");
}
function havFlash(_2d){
var _2e=false;
var _2f;
if(_2d){
switch(navigator.pluginDetectType){
case "plugins array":
for(var i=0;i<navigator.plugins.length;i++){
if(navigator.plugins[i].name.indexOf("Shockwave Flash")>=0){
_2f=navigator.plugins[i].description.substr(16,navigator.plugins[i].description.length);
if(parseFloat(_2f)>=_2d){
_2e=true;
break;
}
}
}
break;
case "detectPlugin function":
_2e=fxDetectPlugin("ShockwaveFlash.ShockwaveFlash."+parseInt(_2d));
break;
}
}else{
_2e=navigator.hasPlugin("Shockwave Flash","ShockwaveFlash.ShockwaveFlash");
}
return _2e;
}
}

var inWebSearch=false;
var selected_prod_id="";
var selected_catalog_id="2000000003844";
var currentCatalogId="2000000003844";
var action_added=0;
function submitHeaderSearch(){
if(document.searchbox.query.value==""){
alert("Please enter a keyword first\nto start your search.");
}else{
if(action_added==1){
makeInputElement(document.searchbox,"hidden","action","GetPoint");
makeInputElement(document.searchbox,"hidden","action","DoFreeTextSearch");
}
if(document.searchbox.search_what.value=="1"){
setSearchValues("PRODUCT",document.searchbox);
}else{
if(document.searchbox.search_what.value=="2"){
setSearchValues("SUPPLIER",document.searchbox);
}else{
if(document.searchbox.search_what.value=="3"){
setSearchValues("ARTICLE",document.searchbox);
}
}
}
if(document.searchbox.searchWithin!=null&&document.searchbox.searchWithin.checked==true&&document.searchbox.searchWithin.value=="withinResults"){
makeInputElement(document.searchbox,"hidden","prev_query",unescape("null"));
}
if((selected_prod_id!="")&&(selected_prod_id!="-1")){
makeInputElement(document.searchbox,"hidden","prod_id",selected_prod_id);
}
document.searchbox.submit();
}
}
action_added=1;
function openbig2(_1){
msg=window.open(_1,"DisplayWindow2","HEIGHT=550,WIDTH=750,status=1,toolbar=1,directories=1,menubar=1,location=1,scrollbars=1,resizable=1,top=50,left=50");
if(window.focus){
msg.focus();
}
}
function openNew(_2){
msg=window.open(_2,"DisplayWindow2","HEIGHT=550,WIDTH=800,status=1,toolbar=0,directories=0,menubar=0,location=0,scrollbars=1,resizable=1,top=50,left=50");
if(window.focus){
msg.focus();
}
}
function pop(_3,_4,_5){
params="height="+_4+",width="+_5+",status=1,toolbar=0,directories=0,menubar=0,location=0,scrollbars=1,resizable=1,top=250,left=50,screenX=250,screenY=50";
mypopup=window.open(_3,"PopupWindow",params);
mypopup.focus();
}
function searchMag(_6){
var _7=document.magForm.magName.selectedIndex;
if(document.magForm.magName.selectedIndex>0){
self.location=document.magForm.magName.options[_7].value;
}
}
function search(_8){
var _9=document.tradeshow.event_topic.selectedIndex;
if(document.tradeshow.event_topic.selectedIndex>0){
self.location=document.tradeshow.event_topic.options[_9].value;
}
}
today=new Date();
timetoday=today.getTime();
randm=getRandom(100000,999999);
timenow=timetoday+""+randm;
function getRandom(_a,_b){
return (Math.round(Math.random()*(_b-_a)))+_a;
}
nets=(navigator.appName.indexOf("Netscape")!=-1);
nseven=(navigator.userAgent.indexOf("Netscape/7")!=-1);
bVer=parseInt(navigator.appVersion);
var isMSIE3=false;
var name="new_visited_us";
var path="/";
var expDays=365*20;
var exp=new Date();
exp.setTime(exp.getTime()+(expDays*24*60*60*1000));
var value=timenow;
if(navigator.appName=="Microsoft Internet Explorer"&&bVer==2){
isMSIE3=true;
}
function GetCookie(_c){
if((bVer>2)&&!isMSIE3){
var _d=_c+"=";
var _e=_d.length;
var _f=document.cookie.length;
var i=0;
while(i<_f){
var _11=i+_e;
if(document.cookie.substring(i,_11)==_d){
var _12=document.cookie.indexOf(";",_11);
if(_12==-1){
_12=document.cookie.length;
}
return unescape(document.cookie.substring(_11,_12));
}
i=document.cookie.indexOf(" ",i)+1;
if(i==0){
break;
}
}
return null;
}
}
function SetCookie(_13,_14,_15,_16){
if((bVer>2)&&!isMSIE3){
document.cookie=_13+"="+escape(_14)+((_15==null)?"":("; expires="+_15.toGMTString()))+";domain=.globalsources.com"+((_16==null)?"":("; path="+_16));
}else{
eval(_13+" = '"+_14+"'");
}
}
function setUniqCookie(){
if((bVer>2)&&!isMSIE3){
snooky=GetCookie(name);
if(snooky==null){
SetCookie(name,value,exp,path);
}
}
}
setUniqCookie();
function addToFavorite(){
if(navigator.appName=="Netscape"){
alert("Please press ^D (CTRL-D) to bookmark this page");
}else{
if(parseInt(navigator.appVersion)>3){
var _17=document.title.toString();
if(_17==""){
_17="Global Sources: The Largest Base of Suppliers";
}
var _18=document.location.toString();
var _19=/\?/;
var _1a=/\//;
var _1b=/GeneralManager/;
_18=_18.replace(/http:\/\//,"");
if(_1a.test(_18)){
if((_18.substring(_18.length-4,_18.length)==".jsp")||(_18.substring(_18.length-4,_18.length)==".com")||(_18.substring(_18.length-1,_18.length)=="/")){
window.external.AddFavorite(document.location+"?ref=bmk",_17);
}else{
window.external.AddFavorite(document.location+"&ref=bmk",_17);
}
}else{
if(_19.test(document.location)||_1b.test(document.location)){
window.external.AddFavorite(document.location+"&ref=bmk",_17);
}else{
window.external.AddFavorite(document.location+"?ref=bmk",_17);
}
}
}
}
}
function HomepageNS(){
alert("Please Drag the link onto your Home button to make this your Home Page.");
}
function opencsfvideoBySize(_1c,hgt,wdt){
msg=open(_1c,"DisplayWindow","HEIGHT="+hgt+",WIDTH="+wdt+",status=no,toolbar=no,directories=no,menubar=no,location=no,scrollbars=no,top=100,left=50,resizable=no");
}
var MacBrws=(navigator.appVersion.indexOf("Mac")!=-1);
var brwSafari=(navigator.appVersion.indexOf("Safari")!=-1);
var MacNets=(navigator.appName.indexOf("Netscape")!=-1);
var brwFirefox=(navigator.userAgent.indexOf("Firefox")!=-1);
var brwIE=(navigator.appName.indexOf("Explorer")!=-1);
function writeScreenResolution(_1f){
var r;
do{
r=Math.ceil(Math.random()*10000000000);
}while(r<1000000000);
var w=screen.width;
var h=screen.height;
var _23=_1f+"?resol="+w+"by"+h+"&rand="+r;
document.write("<img src=\""+_23+"\" width=0 height=0 border=0>");
}
function displayPopup2(xml){
if(xml!=null){
result=null;
if(window.ActiveXObject){
result=xml.getElementsByTagName("ipInChina")[0].text;
}else{
if(window.XMLHttpRequest){
result=xml.getElementsByTagName("ipInChina")[0].textContent;
}
}
if(result!=null&&result=="yes"){
insertCn();
}
}
}
function requestHandler2(){
if(client.readyState==4&&client.status==200){
if(client.responseText!=null){
displayPopup2(client.responseXML);
}else{
displayPopup2(null);
}
}else{
if(client.readyState==4&&client.status!=200){
displayPopup2(null);
}
}
}
var client=null;
function getURL2(url){
if(window.ActiveXObject){
client=new ActiveXObject("Microsoft.XMLHTTP");
}else{
if(window.XMLHttpRequest){
client=new XMLHttpRequest();
}
}
client.onreadystatechange=requestHandler2;
client.open("GET",url,true);
client.send(null);
}
function insertCn(){
var str="<div><a href=\"http://www.globalsources.com.cn?source=eGSOLHP\" class=\"r3\">\u73af\u7403\u8d44\u6e90\u4e2d\u6587\u5185\u8d38\u7f51  </a><b><span class=\"sred2\">\u5168\u65b0\uff01</span></b></div><div class=\"line-redhead\"></div><div class=\"body\"><img src=\"http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/staticeh.globalsources.com/ST/i/CGSOL-PC-IMG.JPG\" width=80 height=86 border=0 alt=\"\u73af\u7403\u8d44\u6e90\u4e2d\u6587\u5185\u8d38\u7f51\" class=\"cProm\"><div class=\"cPromTag\">\u7f51\u7f57\u6d77\u91cf\u8d44\u8baf<br>\u7cbe\u9009\u53ef\u9760\u4f9b\u5e94\u5546</div><div class=\"cPromlnk\"><a href=\"http://www.globalsources.com.cn?source=eGSOLHP\">\u7acb\u5373\u70b9\u51fb\u5f00\u59cb\u4f60\u7684\u5185\u8d38\u4e4b\u65c5</a></div><div class=\"ht20\"></div>";
ABC.innerHTML=str;
}
var copyright=new Date();
var update=copyright.getFullYear();
function writeCopy(){
document.write("Copyright &copy; "+update+" Trade Media Holdings Ltd. Copyright &copy; "+update+" Trade Media Ltd. <a href=\"javascript:pop('http://www.globalsources.com/CUSTOMER/ALLRIGHTS.HTM','130','640');\">All rights reserved</a>.");
}
function openmag(_27){
msg=window.location.href(_27);
}

function virtualpaginate(_1,_2,_3){
var _3=(typeof _3=="undefined")?"div":_3;
this.pieces=virtualpaginate.collectElementbyClass(_1,_3);
this.chunksize=(typeof _2=="undefined")?1:(_2>0&&_2<this.pieces.length)?_2:this.pieces.length;
this.pagecount=Math.ceil(this.pieces.length/this.chunksize);
this.showpage(-1);
this.currentpage=0;
this.showpage(this.currentpage);
}
virtualpaginate.collectElementbyClass=function(_4,_5){
var _6=new RegExp("(^|\\s+)"+_4+"($|\\s+)","i");
var _7=[];
var _8=document.getElementsByTagName(_5);
for(var i=0;i<_8.length;i++){
if(typeof _8[i].className=="string"&&_8[i].className.search(_6)!=-1){
_7[_7.length]=_8[i];
}
}
return _7;
};
virtualpaginate.prototype.showpage=function(_a){
var _b=this.pieces.length;
var _c=_a*this.chunksize;
var _d=_c+this.chunksize-1;
for(var i=0;i<_b;i++){
if(i>=_c&&i<=_d){
this.pieces[i].style.display="block";
}else{
this.pieces[i].style.display="none";
}
}
this.currentpage=parseInt(_a);
if(this.cpspan){
this.cpspan.innerHTML="Page "+(this.currentpage+1)+"/"+this.pagecount;
}
};
virtualpaginate.prototype.paginate_build_selectmenu=function(_f,_10){
var _11=this;
var _10=_10||new Array();
this.selectmenupresent=1;
for(var i=0;i<this.pagecount;i++){
if(typeof _10[i]!="undefined"){
_f.options[i]=new Option(_10[i],i);
}else{
_f.options[i]=new Option("Page "+(i+1)+" of "+this.pagecount,i);
}
}
_f.selectedIndex=this.currentpage;
_f.onchange=function(){
_11.showpage(this.selectedIndex);
};
};
virtualpaginate.prototype.paginate_build_regularlinks=function(_13){
var _14=this;
for(var i=0;i<_13.length;i++){
var _16=_13[i].getAttribute("rel");
if(_16=="previous"||_16=="next"||_16=="first"||_16=="last"){
_13[i].onclick=function(){
_14.navigate(this.getAttribute("rel"));
return false;
};
}
}
};
virtualpaginate.prototype.paginate_build_flatview=function(_17,_18){
var _19=this;
var _1a="";
var _18=_18||new Array();
for(var i=0;i<this.pagecount;i++){
if(typeof _18[i]!="undefined"){
_1a+="<a href=\"#flatview\" rel=\""+i+"\">"+_18[i]+"</a> ";
}else{
_1a+="<a href=\"#flatview\" rel=\""+i+"\">"+(i+1)+"</a> ";
}
}
_17.innerHTML=_1a;
this.flatviewlinks=_17.getElementsByTagName("a");
for(var i=0;i<this.flatviewlinks.length;i++){
this.flatviewlinks[i].onclick=function(){
_19.flatviewlinks[_19.currentpage].className="";
this.className="selected";
_19.showpage(this.getAttribute("rel"));
return false;
};
}
this.flatviewlinks[this.currentpage].className="selected";
this.flatviewpresent=true;
};
virtualpaginate.prototype.paginate_build_cpinfo=function(_1c){
this.cpspan=_1c;
_1c.innerHTML="Page "+(this.currentpage+1)+"/"+this.pagecount;
};
virtualpaginate.prototype.buildpagination=function(_1d,_1e){
var _1f=this;
var _20=document.getElementById(_1d);
if(this.chunksize==this.pieces.length){
_20.style.display="none";
return;
}
var _21=_20.innerHTML;
if(_20.getElementsByTagName("select").length>0){
this.paginate_build_selectmenu(_20.getElementsByTagName("select")[0],_1e);
}
if(_20.getElementsByTagName("a").length>0){
this.paginate_build_regularlinks(_20.getElementsByTagName("a"));
}
var _22=_20.getElementsByTagName("span");
for(var i=0;i<_22.length;i++){
if(_22[i].className=="flatview"){
this.paginate_build_flatview(_22[i],_1e);
}else{
if(_22[i].className=="paginateinfo"){
this.paginate_build_cpinfo(_22[i]);
}
}
}
this.paginatediv=_20;
};
virtualpaginate.prototype.navigate=function(_24){
if(this.flatviewpresent){
this.flatviewlinks[this.currentpage].className="";
}
if(_24=="previous"){
this.currentpage=(this.currentpage>0)?this.currentpage-1:(this.currentpage==0)?this.pagecount-1:0;
}else{
if(_24=="next"){
this.currentpage=(this.currentpage<this.pagecount-1)?this.currentpage+1:0;
}else{
if(_24=="first"){
this.currentpage=0;
}else{
if(_24=="last"){
this.currentpage=this.pieces.length-1;
}
}
}
}
this.showpage(this.currentpage);
if(this.selectmenupresent){
this.paginatediv.getElementsByTagName("select")[0].selectedIndex=this.currentpage;
}
if(this.flatviewpresent){
this.flatviewlinks[this.currentpage].className="selected";
}
};