var xmlhttp; function getXMLRequester( ) { var xmlhttp_request = false; try { if( window.ActiveXObject ) { for( var i = 5; i; i-- ){ try{ if( i == 2 ) { xmlhttp_request = new ActiveXObject( "Microsoft.XMLHTTP" ); } else { xmlhttp_request = new ActiveXObject( "Msxml2.XMLHTTP." + i + ".0" ); xmlhttp_request.setRequestHeader("Content-Type","text/xml"); xmlhttp_request.setRequestHeader("Content-Type","utf8"); } break;} catch(e){ xmlhttp_request = false; } } } else if( window.XMLHttpRequest ) { xmlhttp_request = new XMLHttpRequest(); if (xmlhttp_request.overrideMimeType) { xmlhttp_request.overrideMimeType('text/xml'); } } } catch(e){ xmlhttp_request = false; } return xmlhttp_request ; } function doContents(){ var sstr; var sid = new Array(); var str = new Array(); if (xmlhttp.readyState == 4) { if (xmlhttp.status == 200){ str=xmlhttp.responseText.split('||'); document.fastorder.s2.options.length=0; for(var i=0;i < str.length;i++) { sstr=str[i]; sid=sstr.split('|'); document.fastorder.s2.options[document.fastorder.s2.options.length]=new Option(sid[0],sid[1]); } document.fastorder.s2.disabled=false; } } } function s_two(n){ var url; if(document.fastorder.s1.selectedIndex!=0){ document.fastorder.s2.options.length=0; document.fastorder.s2.options[document.fastorder.s2.options.length]=new Option("Please Waiting...",0); url='/js_select_two.asp?gid='+n; xmlhttp=getXMLRequester(); xmlhttp.onreadystatechange = doContents; xmlhttp.open('GET', url, true); xmlhttp.send(null); } else { document.fastorder.s2.options.length=0; document.fastorder.s2.disabled=true; document.fastorder.s2.options[document.fastorder.s2.options.length]=new Option("Please Select Server",0); document.fastorder.s3.options.length=0; document.fastorder.s3.disabled=true; document.fastorder.s3.options[document.fastorder.s3.options.length]=new Option("Please Select Product",0); document.fastorder.xprice.value=''; } } function doContents3(){ var sstr; var sid = new Array(); var vid = new Array(); var str = new Array(); if (xmlhttp.readyState == 4) { if (xmlhttp.status == 200){ str=xmlhttp.responseText.split('||'); document.fastorder.s3.options.length=0; for(var i=0;i < str.length;i++) { sstr=str[i]; sid=sstr.split('|'); document.fastorder.s3.options[document.fastorder.s3.options.length]=new Option(sid[0]+' Gold',sid[1]); } document.fastorder.s3.disabled=false; } } } function s_three(n){ var url; if(document.fastorder.s2.selectedIndex!=0){ document.fastorder.s3.options.length=0; document.fastorder.s3.options[document.fastorder.s3.options.length]=new Option("Please Waiting...",0); url='js_select_three.asp?mid='+n; xmlhttp=getXMLRequester(); xmlhttp.onreadystatechange = doContents3; xmlhttp.open('GET', url, true); xmlhttp.send(null); } else { document.fastorder.s3.options.length=0; document.fastorder.s3.disabled=true; document.fastorder.s3.options[document.fastorder.s3.options.length]=new Option("Please Select Product",0); document.fastorder.xprice.value=''; } } function sprice(){ if(document.fastorder.s3.selectedIndex!=0) document.fastorder.xprice.value='$ '+document.fastorder.s3.options[document.fastorder.s3.selectedIndex].value; else document.fastorder.xprice.value=''; } function chk_forder(){ if(document.fastorder.s1.selectedIndex==0){ alert('please select game first'); return false; } if(document.fastorder.s2.selectedIndex==0){ alert('please select server'); return false; } if(document.fastorder.s3.selectedIndex==0){ alert('please select product'); return false; } document.fastorder.price.value=document.fastorder.s3.options[document.fastorder.s3.selectedIndex].value; if(document.fastorder.s1.options[document.fastorder.s1.selectedIndex].value==1) document.fastorder.cy.value='US'; else document.fastorder.cy.value='EU'; document.fastorder.typename.value=document.fastorder.cy.value+'-WOW GOLD-('+document.fastorder.s2.options[document.fastorder.s2.selectedIndex].text+')-('+document.fastorder.s3.options[document.fastorder.s3.selectedIndex].text+')'; return true; }