var xmlhttp; var gamestr; var gameid; gamestr=new Array(); gameid=new Array(); gamestr[0]='Please Select The Game'; gameid[0]=0; gamestr[1]='Guild War'; gameid[1]=12; gamestr[2]='World of Warcraft EU'; gameid[2]=2; gamestr[3]='The Lord of the Rings'; gameid[3]=7; gamestr[4]='EVE Online'; gameid[4]=11; gamestr[5]='Silkroad Online'; gameid[5]=17; gamestr[6]='Warhammer Online - US'; gameid[6]=3; gamestr[7]='Aion online'; gameid[7]=42; gamestr[8]='World of Warcraft US'; gameid[8]=1; gamestr[9]='Ever Quest II'; gameid[9]=10; gamestr[10]='Cabal Online'; gameid[10]=19; gamestr[11]='Maple Story'; gameid[11]=13; gamestr[12]='Archlord'; gameid[12]=14; gamestr[13]='Last Chaos'; gameid[13]=29; gamestr[14]='Lineage II'; gameid[14]=37; gamestr[15]='Conan US'; gameid[15]=5; gamestr[16]='Warhammer Online - EU'; gameid[16]=4; gamestr[17]='Final Fantasy XI'; gameid[17]=9; gamestr[18]='Conan EU'; gameid[18]=6; // build game list select function build_gl() { document.fastorder.s_gl.options.length=0; for(var i=0;i < gamestr.length;i++) { document.fastorder.s_gl.options[document.fastorder.s_gl.options.length]=new Option(gamestr[i],gameid[i]); } document.fastorder.s_gl.disabled=false; } build_gl(); function gl_chg(){ var url; document.fastorder.s_sl.options.length=0; document.fastorder.s_pl.options.length=0; document.fastorder.s_sl.options[document.fastorder.s_sl.options.length]=new Option('Please Select The Server',0); document.fastorder.s_pl.options[document.fastorder.s_pl.options.length]=new Option('Please Select The Product',0); document.fastorder.s_sl.disabled=true; document.fastorder.s_pl.disabled=true; document.fastorder.s_price.value=''; if(document.fastorder.s_gl.options[document.fastorder.s_gl.selectedIndex].value!=0){ document.fastorder.s_sl.options.length=0; document.fastorder.s_sl.options[document.fastorder.s_sl.options.length]=new Option("...Loading...",0); url='/fast-order/read-data.asp?action=serverlist\&game_id='+document.fastorder.s_gl.options[document.fastorder.s_gl.selectedIndex].value; xmlhttp=getXMLRequester(); xmlhttp.onreadystatechange = do_gl_chg; xmlhttp.open('GET', url, true); xmlhttp.send(null); } } function do_gl_chg(){ var sstr; var sid = new Array(); var str = new Array(); if (xmlhttp.readyState == 4) { if (xmlhttp.status == 200){ str=xmlhttp.responseText.split('||'); document.fastorder.s_sl.options.length=0; for(var i=0;i < str.length-1;i++) { sstr=str[i]; sid=sstr.split('|'); document.fastorder.s_sl.options[document.fastorder.s_sl.options.length]=new Option(sid[0],sid[1]); } document.fastorder.count_str.value=str[str.length-1]; document.fastorder.s_sl.disabled=false; } else alert('read data 1error:'+xmlhttp.status); } } function sl_chg(){ var ssa; var ssb; var sa = new Array(); var sb = new Array(); var dw; var price; if(document.fastorder.s_sl.options[document.fastorder.s_sl.selectedIndex].value==0){ document.fastorder.s_pl.options.length=0; document.fastorder.s_pl.options[document.fastorder.s_pl.options.length]=new Option('Please Select The Product',0); document.fastorder.s_pl.disabled=true; document.fastorder.s_price.value=''; } else{ document.fastorder.s_pl.options.length=0; document.fastorder.s_pl.options[document.fastorder.s_pl.options.length]=new Option('Please Select The Product',0); document.fastorder.s_pl.disabled=true; document.fastorder.s_price.value=''; ssa=document.fastorder.count_str.value; sa=ssa.split('|'); dw=sa[sa.length-1]; for(var i=0;i < sa.length-1;i++) { ssb=sa[i]; sb=ssb.split(':'); price=sb[0]*sb[1]*document.fastorder.s_sl.options[document.fastorder.s_sl.selectedIndex].value; price=price.toFixed(2); document.fastorder.s_pl.options[document.fastorder.s_pl.options.length]=new Option(sb[0] + ' ' + dw,sb[0] + ':' + price); } document.fastorder.s_pl.disabled=false; } } function pl_chg(){ var ssa; var ssb; var sa = new Array(); var sb = new Array(); var dw; var x1; var x2; var price; if(document.fastorder.s_pl.options[document.fastorder.s_pl.selectedIndex].value==0){ document.fastorder.s_price.value=''; } else{ document.fastorder.s_price.value=''; ssa=document.fastorder.s_pl.options[document.fastorder.s_pl.selectedIndex].value; sa=ssa.split(":"); document.fastorder.price.value=sa[1]; document.fastorder.count.value=sa[0]; x1=1; x2=sa[1]; x2=x2*x1; x2=x2.toFixed(2); document.fastorder.s_price.value=x2; } } function curr_chg(){ var ssa; var ssb; var price; if(document.fastorder.s_curr.options[document.fastorder.s_curr.selectedIndex].value==0){ document.fastorder.s_price.value=''; } else{ ssa=document.fastorder.s_curr.options[document.fastorder.s_curr.selectedIndex].value; ssb=document.fastorder.price.value; ssa=ssb*ssa; ssa=ssa.toFixed(2); document.fastorder.s_price.value=ssa; document.fastorder.curr.value=document.fastorder.s_curr.options[document.fastorder.s_curr.selectedIndex].text; } }