function initSelectBoxesForCG(b){if(b!=null){for(var a=0;a<locationArray.length;a++){if(locationArray[a][1]==null){addOption("cs_location_1",locationArray[a][0],locationArray[a][2])}}if(b!=""){fixParents("location",b)}}}function initSelectBoxes(d,b,e,a){if(d!=null){for(var c=0;c<locationArray.length;c++){if(locationArray[c][1]==null){addOption("cs_location_1",locationArray[c][0],locationArray[c][2])}}if(d!=""){fixParents("location",d)}}}function reloadOptions(selectBox){propagateClean(selectBox);var targetSelectBox=selectBox.substring(0,selectBox.length-1)+(selectBox.substring(selectBox.length-1)- -1);var sb=document.getElementById(selectBox);var selectedId=document.getElementById(selectBox).options[sb.selectedIndex].value;var firstUnder=selectBox.indexOf("_");eval("var currentArray = "+selectBox.substring(firstUnder+1,selectBox.lastIndexOf("_"))+"Array");if(selectedId==-1){var topLevelIds=findTopLevelIds();for(var i=0;i<currentArray.length;i++){if(topLevelIds.indexOf(currentArray[i][1])!=-1){addOption(targetSelectBox,currentArray[i][0],currentArray[i][2])}}}else{for(var i=0;i<currentArray.length;i++){if(currentArray[i][1]==selectedId){addOption(targetSelectBox,currentArray[i][0],currentArray[i][2])}}}}function findTopLevelIds(){if(!Array.indexOf){Array.prototype.indexOf=function(e){for(var d=0;d<this.length;d++){if(this[d]==e){return d}}return -1}}var c=new Array();for(var b=0,a=0;b<locationArray.length;b++){if(locationArray[b][1]==null){c[a++]=locationArray[b][0]}}return c}function propagateClean(b){var a=b.substring(0,b.length-1)+(b.substring(b.length-1)- -1);if(document.getElementById(a)!=null){document.getElementById(a).options.selectedIndex=0;document.getElementById(a).options.length=1;propagateClean(a)}}function addOption(c,e,a){var d=document.getElementById(c);var b=d.options.length;d.options[b]=new Option(a,e)}function search(b,g,d,f){var e=BASE_URL;if(b){var c=(document.getElementById("cs_location_4").selectedIndex==0)?(document.getElementById("cs_location_3").selectedIndex==0)?(document.getElementById("cs_location_2").selectedIndex==0)?((document.getElementById("cs_location_1").selectedIndex==0)||(document.getElementById("cs_location_1").selectedIndex==1))?null:document.getElementById("cs_location_1").options[document.getElementById("cs_location_1").selectedIndex].value:document.getElementById("cs_location_2").options[document.getElementById("cs_location_2").selectedIndex].value:document.getElementById("cs_location_3").options[document.getElementById("cs_location_3").selectedIndex].value:document.getElementById("cs_location_4").options[document.getElementById("cs_location_4").selectedIndex].value;if(c!=null){HrefMgr=new HrefManager(e);e=HrefMgr.appendOrReplace({location:c})}}if(f){var a=document.getElementById("cs_general").selectedIndex==0?null:document.getElementById("cs_general").options[document.getElementById("cs_general").selectedIndex].value;if(a!=null){HrefMgr=new HrefManager(e);e=HrefMgr.appendOrReplace({general:a})}}HrefMgr=new HrefManager(e);window.location.href=HrefMgr.appendOrReplace({doSearch:"true"})}function fixParentsCG(g,f){var a=new Array();var d=null;a[0]=f;for(var b=0;(d=findParent(g,a[b]))!=null;a[++b]=d){}for(var c=a.length-1;c>=0;c--){var e="cs_"+g+"_"+(a.length-c);fixSelectedIndexCG(e,a[c])}}function fixSelectedIndexCG(c,a){var d=document.getElementById(c);if(c=="cs_location_1"){d.selectedIndex=1}else{for(var b=0;b<d.options.length;b++){if(d.options[b].value==a){d.selectedIndex=b;break}}}reloadOptions(c)}function fixSelectedIndex(c,a){var d=document.getElementById(c);for(var b=0;b<d.options.length;b++){if(d.options[b].value==a){d.selectedIndex=b;break}}reloadOptions(c)}function findParent(categoryName,value){eval("var currentArray="+categoryName+"Array;");for(var i=0;i<currentArray.length;i++){if(currentArray[i][0]==value){return currentArray[i][1]}}}function fixParents(g,f){var a=new Array();var d=null;a[0]=f;for(var b=0;(d=findParent(g,a[b]))!=null;a[++b]=d){}for(var c=a.length-1;c>=0;c--){var e="cs_"+g+"_"+(a.length-c);fixSelectedIndex(e,a[c])}}function geoSearch(a){window.location.href=BASE_URL+"?location="+a+"&doSearch=true"}function embedFlashMap(c,a,b){if(AC_FL_RunContent==0){alert("This page requires AC_RunActiveContent.js.")}else{AC_FL_RunContent("containerElementId",c,"codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0","width","100%","height","280","src","/eot/flash/cs/map?xmlName=/eot/flash/cs/countries&langid="+b+"&vcmId="+a,"quality","high","pluginspage","http://www.macromedia.com/go/getflashplayer","play","true","loop","true","scale","exactfit","wmode","normal","devicefont","false","id","map","bgcolor","red","name","map","menu","true","allowFullScreen","false","allowScriptAccess","sameDomain","movie","/eot/flash/cs/map?xmlName=/eot/flash/cs/countries&langid="+b+"&vcmId="+a,"salign","")}}function showResults(){HrefMgr=new HrefManager(document.location.href);var a=HrefMgr.appendOrReplace({doSearch:"true"});document.location.href=a};
