var itemdelta = new Array(); var itemdelaydays = new Array(); var starkl = new Array(); var caseImages = new Array(); var itemvperf = new Array(); var itemcpuperf = new Array(); var itemramperf = new Array(); var itempcislots = new Array(); itemvperf[23393]=0; itemcpuperf[23393]=0; itemramperf[23393]=0; itempcislots[23393]=0; itemdelta[23393]=0; itemdelaydays[23393]=0; starkl[23393]=2711; itemvperf[25898]=0; itemcpuperf[25898]=0; itemramperf[25898]=0; itempcislots[25898]=0; itemdelta[25898]=150; itemdelaydays[25898]=0; starkl[25898]=5932; itemvperf[25906]=0; itemcpuperf[25906]=0; itemramperf[25906]=0; itempcislots[25906]=0; itemdelta[25906]=90; itemdelaydays[25906]=0; starkl[25906]=9578; itemvperf[25896]=0; itemcpuperf[25896]=0; itemramperf[25896]=0; itempcislots[25896]=0; itemdelta[25896]=0; itemdelaydays[25896]=0; starkl[25896]=4853; itemvperf[25858]=0; itemcpuperf[25858]=0; itemramperf[25858]=0; itempcislots[25858]=0; itemdelta[25858]=0; itemdelaydays[25858]=0; starkl[25858]=4057; itemvperf[25915]=0; itemcpuperf[25915]=0; itemramperf[25915]=0; itempcislots[25915]=0; itemdelta[25915]=650; itemdelaydays[25915]=0; starkl[25915]=6054; itemvperf[25914]=0; itemcpuperf[25914]=0; itemramperf[25914]=0; itempcislots[25914]=0; itemdelta[25914]=215; itemdelaydays[25914]=0; starkl[25914]=4866; itemvperf[25899]=0; itemcpuperf[25899]=0; itemramperf[25899]=0; itempcislots[25899]=0; itemdelta[25899]=190; itemdelaydays[25899]=0; starkl[25899]=7622; itemvperf[25823]=0; itemcpuperf[25823]=0; itemramperf[25823]=0; itempcislots[25823]=0; itemdelta[25823]=0; itemdelaydays[25823]=0; starkl[25823]=5069; itemvperf[25860]=0; itemcpuperf[25860]=0; itemramperf[25860]=0; itempcislots[25860]=0; itemdelta[25860]=0; itemdelaydays[25860]=0; starkl[25860]=420; itemvperf[23286]=0; itemcpuperf[23286]=0; itemramperf[23286]=0; itempcislots[23286]=0; itemdelta[23286]=0; itemdelaydays[23286]=0; starkl[23286]=2478; itemvperf[25909]=190; itemcpuperf[25909]=0; itemramperf[25909]=0; itempcislots[25909]=0; itemdelta[25909]=0; itemdelaydays[25909]=0; starkl[25909]=6911; itemvperf[23274]=0; itemcpuperf[23274]=0; itemramperf[23274]=0; itempcislots[23274]=0; itemdelta[23274]=0; itemdelaydays[23274]=0; starkl[23274]=2667; itemvperf[23339]=0; itemcpuperf[23339]=0; itemramperf[23339]=0; itempcislots[23339]=0; itemdelta[23339]=39; itemdelaydays[23339]=0; starkl[23339]=7692; itemvperf[23341]=0; itemcpuperf[23341]=0; itemramperf[23341]=0; itempcislots[23341]=0; itemdelta[23341]=0; itemdelaydays[23341]=0; starkl[23341]=1457; itemvperf[23313]=0; itemcpuperf[23313]=0; itemramperf[23313]=0; itempcislots[23313]=0; itemdelta[23313]=160; itemdelaydays[23313]=0; starkl[23313]=2190; itemvperf[25850]=0; itemcpuperf[25850]=0; itemramperf[25850]=0; itempcislots[25850]=0; itemdelta[25850]=0; itemdelaydays[25850]=0; starkl[25850]=3750; itemvperf[25913]=0; itemcpuperf[25913]=0; itemramperf[25913]=0; itempcislots[25913]=0; itemdelta[25913]=600; itemdelaydays[25913]=0; starkl[25913]=5953; itemvperf[25912]=0; itemcpuperf[25912]=0; itemramperf[25912]=0; itempcislots[25912]=0; itemdelta[25912]=215; itemdelaydays[25912]=0; starkl[25912]=7519; itemvperf[25861]=0; itemcpuperf[25861]=0; itemramperf[25861]=0; itempcislots[25861]=0; itemdelta[25861]=0; itemdelaydays[25861]=0; starkl[25861]=4535; itemvperf[23456]=0; itemcpuperf[23456]=0; itemramperf[23456]=0; itempcislots[23456]=0; itemdelta[23456]=-60; itemdelaydays[23456]=0; starkl[23456]=3139; itemvperf[25891]=0; itemcpuperf[25891]=0; itemramperf[25891]=0; itempcislots[25891]=0; itemdelta[25891]=1510; itemdelaydays[25891]=0; starkl[25891]=9904; itemvperf[25895]=0; itemcpuperf[25895]=0; itemramperf[25895]=0; itempcislots[25895]=0; itemdelta[25895]=805; itemdelaydays[25895]=0; starkl[25895]=3573; itemvperf[25894]=0; itemcpuperf[25894]=0; itemramperf[25894]=0; itempcislots[25894]=0; itemdelta[25894]=420; itemdelaydays[25894]=0; starkl[25894]=8675; itemvperf[25893]=0; itemcpuperf[25893]=0; itemramperf[25893]=0; itempcislots[25893]=0; itemdelta[25893]=270; itemdelaydays[25893]=0; starkl[25893]=4948; itemvperf[25890]=0; itemcpuperf[25890]=0; itemramperf[25890]=0; itempcislots[25890]=0; itemdelta[25890]=290; itemdelaydays[25890]=0; starkl[25890]=7973; itemvperf[25889]=0; itemcpuperf[25889]=0; itemramperf[25889]=0; itempcislots[25889]=0; itemdelta[25889]=170; itemdelaydays[25889]=0; starkl[25889]=7321; itemvperf[25884]=0; itemcpuperf[25884]=0; itemramperf[25884]=0; itempcislots[25884]=0; itemdelta[25884]=685; itemdelaydays[25884]=0; starkl[25884]=7640; itemvperf[25888]=0; itemcpuperf[25888]=0; itemramperf[25888]=0; itempcislots[25888]=0; itemdelta[25888]=405; itemdelaydays[25888]=0; starkl[25888]=4391; itemvperf[25887]=0; itemcpuperf[25887]=0; itemramperf[25887]=0; itempcislots[25887]=0; itemdelta[25887]=220; itemdelaydays[25887]=0; starkl[25887]=8319; itemvperf[25886]=0; itemcpuperf[25886]=0; itemramperf[25886]=0; itempcislots[25886]=0; itemdelta[25886]=140; itemdelaydays[25886]=0; starkl[25886]=7980; itemvperf[25883]=0; itemcpuperf[25883]=0; itemramperf[25883]=0; itempcislots[25883]=0; itemdelta[25883]=190; itemdelaydays[25883]=0; starkl[25883]=7412; itemvperf[25882]=0; itemcpuperf[25882]=0; itemramperf[25882]=0; itempcislots[25882]=0; itemdelta[25882]=95; itemdelaydays[25882]=0; starkl[25882]=8736; itemvperf[25880]=0; itemcpuperf[25880]=0; itemramperf[25880]=0; itempcislots[25880]=0; itemdelta[25880]=0; itemdelaydays[25880]=0; starkl[25880]=6602; itemvperf[25830]=0; itemcpuperf[25830]=0; itemramperf[25830]=0; itempcislots[25830]=0; itemdelta[25830]=150; itemdelaydays[25830]=0; starkl[25830]=482; itemvperf[25829]=0; itemcpuperf[25829]=0; itemramperf[25829]=0; itempcislots[25829]=0; itemdelta[25829]=50; itemdelaydays[25829]=0; starkl[25829]=3936; itemvperf[23396]=0; itemcpuperf[23396]=0; itemramperf[23396]=0; itempcislots[23396]=0; itemdelta[23396]=0; itemdelaydays[23396]=0; starkl[23396]=4600; itemvperf[25866]=0; itemcpuperf[25866]=0; itemramperf[25866]=0; itempcislots[25866]=0; itemdelta[25866]=0; itemdelaydays[25866]=0; starkl[25866]=6912; itemvperf[25867]=0; itemcpuperf[25867]=0; itemramperf[25867]=0; itempcislots[25867]=0; itemdelta[25867]=0; itemdelaydays[25867]=0; starkl[25867]=7229; itemvperf[25904]=0; itemcpuperf[25904]=0; itemramperf[25904]=0; itempcislots[25904]=0; itemdelta[25904]=70; itemdelaydays[25904]=0; starkl[25904]=7308; itemvperf[25905]=0; itemcpuperf[25905]=0; itemramperf[25905]=0; itempcislots[25905]=0; itemdelta[25905]=0; itemdelaydays[25905]=0; starkl[25905]=9107; itemvperf[23325]=0; itemcpuperf[23325]=0; itemramperf[23325]=0; itempcislots[23325]=0; itemdelta[23325]=259; itemdelaydays[23325]=0; starkl[23325]=6730; itemvperf[23326]=0; itemcpuperf[23326]=0; itemramperf[23326]=0; itempcislots[23326]=0; itemdelta[23326]=199; itemdelaydays[23326]=0; starkl[23326]=1924; itemvperf[23327]=0; itemcpuperf[23327]=0; itemramperf[23327]=0; itempcislots[23327]=0; itemdelta[23327]=0; itemdelaydays[23327]=0; starkl[23327]=6882; itemvperf[25918]=0; itemcpuperf[25918]=0; itemramperf[25918]=0; itempcislots[25918]=0; itemdelta[25918]=0; itemdelaydays[25918]=0; starkl[25918]=4303; itemvperf[25916]=0; itemcpuperf[25916]=0; itemramperf[25916]=0; itempcislots[25916]=0; itemdelta[25916]=0; itemdelaydays[25916]=0; starkl[25916]=8704; itemvperf[25917]=0; itemcpuperf[25917]=0; itemramperf[25917]=0; itempcislots[25917]=0; itemdelta[25917]=0; itemdelaydays[25917]=0; starkl[25917]=7768; itemvperf[25840]=0; itemcpuperf[25840]=0; itemramperf[25840]=0; itempcislots[25840]=0; itemdelta[25840]=15; itemdelaydays[25840]=0; starkl[25840]=1315; itemvperf[23292]=0; itemcpuperf[23292]=0; itemramperf[23292]=0; itempcislots[23292]=0; itemdelta[23292]=0; itemdelaydays[23292]=0; starkl[23292]=9938; itemvperf[23298]=0; itemcpuperf[23298]=0; itemramperf[23298]=0; itempcislots[23298]=0; itemdelta[23298]=100; itemdelaydays[23298]=0; starkl[23298]=9324; itemvperf[25839]=0; itemcpuperf[25839]=0; itemramperf[25839]=0; itempcislots[25839]=0; itemdelta[25839]=15; itemdelaydays[25839]=0; starkl[25839]=360; itemvperf[23297]=0; itemcpuperf[23297]=0; itemramperf[23297]=0; itempcislots[23297]=0; itemdelta[23297]=0; itemdelaydays[23297]=0; starkl[23297]=6888; itemvperf[23442]=0; itemcpuperf[23442]=0; itemramperf[23442]=0; itempcislots[23442]=0; itemdelta[23442]=0; itemdelaydays[23442]=0; starkl[23442]=5824; itemvperf[23398]=0; itemcpuperf[23398]=0; itemramperf[23398]=0; itempcislots[23398]=0; itemdelta[23398]=0; itemdelaydays[23398]=0; starkl[23398]=7679; itemvperf[25846]=0; itemcpuperf[25846]=0; itemramperf[25846]=0; itempcislots[25846]=0; itemdelta[25846]=90; itemdelaydays[25846]=0; starkl[25846]=5164; itemvperf[25845]=0; itemcpuperf[25845]=0; itemramperf[25845]=0; itempcislots[25845]=0; itemdelta[25845]=75; itemdelaydays[25845]=0; starkl[25845]=1538; itemvperf[25844]=0; itemcpuperf[25844]=0; itemramperf[25844]=0; itempcislots[25844]=0; itemdelta[25844]=0; itemdelaydays[25844]=0; starkl[25844]=7873; itemvperf[25900]=0; itemcpuperf[25900]=0; itemramperf[25900]=0; itempcislots[25900]=0; itemdelta[25900]=0; itemdelaydays[25900]=0; starkl[25900]=3965; itemvperf[25901]=0; itemcpuperf[25901]=0; itemramperf[25901]=0; itempcislots[25901]=0; itemdelta[25901]=0; itemdelaydays[25901]=0; starkl[25901]=293; itemvperf[25902]=0; itemcpuperf[25902]=0; itemramperf[25902]=0; itempcislots[25902]=0; itemdelta[25902]=0; itemdelaydays[25902]=0; starkl[25902]=2124; itemvperf[23272]=0; itemcpuperf[23272]=0; itemramperf[23272]=0; itempcislots[23272]=0; itemdelta[23272]=0; itemdelaydays[23272]=0; starkl[23272]=9022; itemvperf[23332]=0; itemcpuperf[23332]=0; itemramperf[23332]=0; itempcislots[23332]=0; itemdelta[23332]=0; itemdelaydays[23332]=0; starkl[23332]=1541; itemvperf[23285]=0; itemcpuperf[23285]=0; itemramperf[23285]=0; itempcislots[23285]=0; itemdelta[23285]=0; itemdelaydays[23285]=0; starkl[23285]=4670; itemvperf[25851]=0; itemcpuperf[25851]=0; itemramperf[25851]=0; itempcislots[25851]=0; itemdelta[25851]=299; itemdelaydays[25851]=0; starkl[25851]=6963; itemvperf[23359]=0; itemcpuperf[23359]=0; itemramperf[23359]=0; itempcislots[23359]=0; itemdelta[23359]=189; itemdelaydays[23359]=0; starkl[23359]=946; itemvperf[23361]=0; itemcpuperf[23361]=0; itemramperf[23361]=0; itempcislots[23361]=0; itemdelta[23361]=0; itemdelaydays[23361]=0; starkl[23361]=1805; itemvperf[23345]=0; itemcpuperf[23345]=0; itemramperf[23345]=0; itempcislots[23345]=0; itemdelta[23345]=0; itemdelaydays[23345]=0; starkl[23345]=1530; itemvperf[25907]=0; itemcpuperf[25907]=0; itemramperf[25907]=0; itempcislots[25907]=0; itemdelta[25907]=0; itemdelaydays[25907]=0; starkl[25907]=1165; itemvperf[25908]=0; itemcpuperf[25908]=0; itemramperf[25908]=0; itempcislots[25908]=0; itemdelta[25908]=-150; itemdelaydays[25908]=0; starkl[25908]=3373; caseImages[23393]=new Image(); caseImages[23393].src='/images/upload/signature15_MAIN.jpg'; var windowprops = "width=695,height=650,top=15,left=15,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes"; function gopop(page) { window.open(page, "", windowprops); } function disable() { if (event.button == 2) { alert("Thank you for visiting Velocity Micro!") } } function PickUserSelections () { } function ChangePrice () { var newprice =new Number(document.wizform.currentprice.value); var newlease =new Number(document.wizform.currentlease.value); var newdelaydays =new Number(document.wizform.builddays.value); var highdelaydays = 0; var usethisvperf = 100; var usethiscpuperf = 100; var usethisramperf = 100; var usethisoverallperf = 100; var newpcislots = 0; var jjkopl =56985; if (document.wizform.starkldo.value==1) { jjkopl = 0; } for (x = 0; x < document.wizform.elements.length; x++) { if (document.wizform.elements[x].type == "select-one") { thisdd = document.wizform.elements[x]; thisindex = thisdd.selectedIndex; thisdelaydays = (thisindex >= 0 ? itemdelaydays[thisdd[thisindex].value] : 0); thisdelta = (thisindex >= 0 ? itemdelta[thisdd[thisindex].value] : 0); thisvperf = (thisindex >= 0 ? itemvperf[thisdd[thisindex].value] : 0); if (thisvperf > 0) { usethisvperf = thisvperf; } thiscpuperf = (thisindex >= 0 ? itemcpuperf[thisdd[thisindex].value] : 0); if (thiscpuperf > 0) { usethiscpuperf = thiscpuperf; } thisramperf = (thisindex >= 0 ? itemramperf[thisdd[thisindex].value] : 0); if (thisramperf > 0) { usethisramperf = thisramperf; } thisoverallperf = usethisramperf + usethiscpuperf + usethisvperf; if (thisoverallperf > 0) { usethisoverallperf = Math.round((usethisramperf + usethiscpuperf + usethisvperf)/3); } thispcislots = (thisindex >= 0 ? itempcislots[thisdd[thisindex].value] : 0); newpcislots += new Number(thispcislots); sujask = (thisindex >= 0 ? starkl[thisdd[thisindex].value] : 0); newprice += new Number(thisdelta); if (thisdelaydays > highdelaydays) { highdelaydays = thisdelaydays; newdelaydays += new Number(thisdelaydays); } jjkopl += new Number(sujask); newlease = ((newprice * .03)); newlease = Math.round(newlease*1)/1; } if (document.wizform.elements[x].type == "radio") { thisindex = document.wizform.elements[x].value thischecked = document.wizform.elements[x].checked; thisdelta = (thischecked ? itemdelta[thisindex] : 0); sujask = (thischecked ? starkl[thisindex] : 0); newprice += new Number(thisdelta); jjkopl += new Number(sujask); newlease = ((newprice * .03)); newlease = Math.round(newlease*1)/1; } if (document.wizform.elements[x].type == "checkbox") { thisindex = document.wizform.elements[x].value thischecked = document.wizform.elements[x].checked; thisdelta = (thischecked ? itemdelta[thisindex] : 0); sujask = (thischecked ? starkl[thisindex] : 0); newprice += new Number(thisdelta); jjkopl += new Number(sujask); newlease = ((newprice * .03)); newlease = Math.round(newlease*1)/1; } } //if (document.images) { //alert ("starting statement"); var statement = ''; var statementlt = ''; //newprice = 1000; //newlease = 100; //if (document.all) //statement += "document.all['pricetopt'].innerHTML = '" + newprice + "';"; //else if (document.getElementById) //statement += "document.getElementById('pricetopt').innerHTML = '" + newprice + "';"; // eval(statement); //for lease pmt uncomment eval below if (document.all) statementlt += "document.all['pricetopL'].innerHTML = '" + newlease + "';"; else if (document.getElementById) statementlt += "document.getElementById('pricetopL').innerHTML = '" + newlease + "';"; eval(statementlt); var statementb = ''; var statementlb = ''; if (document.all) statementb += "document.all['pricetopb'].innerHTML = '" + newprice + "';"; else if (document.getElementById) statementb += "document.getElementById('pricetopb').innerHTML = '" + newprice + "';"; eval(statementb); if (document.all) statementb += "document.all['pricetopbb'].innerHTML = '" + newprice + "';"; else if (document.getElementById) statementb += "document.getElementById('pricetopbb').innerHTML = '" + newprice + "';"; eval(statementb); //for lease pmt uncomment eval below //if (document.all) statementlb += "document.all['pricetoplb'].innerHTML = '" + newlease + "';"; //else if (document.getElementById) statementlb += "document.getElementById('pricetoplb').innerHTML = '" + newlease + "';"; //eval(statementlb); myDate = new Date(); newoutdate = new Date(myDate.getTime() + newdelaydays*24*60*60*1000); newoutdatef = (newoutdate.getMonth() + 1) + "/" + newoutdate.getDate() +"/" + newoutdate.getFullYear(); var days = 0; var difference = 0; Christmas = new Date("December 22, 2008"); compdate = new Date(newoutdatef); difference = Christmas - compdate; days = Math.round(difference/(1000*60*60*24)); if (days >=0) { //show the shipping image if (document.all) document.all.bn24.style.visibility = 'visible'; else if (document.getElementById) document.getElementById('bn24').style.visibility = 'visible'; } else { //hide the image if (document.all) document.all.bn24.style.visibility = 'hidden'; else if (document.getElementById) document.getElementById('bn24').style.visibility = 'hidden'; } //if (document.all) //document.all['delaydays'].innerHTML = newoutdatef; //else if (document.getElementById) //document.getElementById('delaydays').innerHTML = newoutdatef; if (document.all) document.all['delaydays2'].innerHTML = newoutdatef; else if (document.getElementById) document.getElementById('delaydays2').innerHTML = newoutdatef; //video perf if (document.all) document.all['vperf'].value = usethisvperf; else if (document.getElementById) document.getElementById('vperf').value = usethisvperf; //cpu perf if (document.all) document.all['cpuperf'].value = usethiscpuperf; else if (document.getElementById) document.getElementById('cpuperf').value = usethiscpuperf; //ram perf if (document.all) document.all['ramperf'].value = usethisramperf; else if (document.getElementById) document.getElementById('ramperf').value = usethisramperf; //overall perf if (document.all) document.all['overallperf'].value = usethisoverallperf; else if (document.getElementById) document.getElementById('overallperf').value = usethisoverallperf; //pci slots if (document.all) document.all['pcislots'].value = newpcislots; else if (document.getElementById) document.getElementById('pcislots').value = newpcislots; //below is for pcislot checking if (newpcislots > 0) { //alert("You have too many PCI slots used. See highlighted items."); } var slok = newprice - jjkopl; var ojeko = slok / newprice; document.wizform.starkl.value = "c" + Math.round(jjkopl*100)/100 + " p" + Math.round(slok*100)/100 + " " + Math.round(ojeko*100) + "%"; document.wizform.emailprice.value = newprice; } function ReloadIframe() { usethisvperf = document.wizform.vperf.value; usethiscpuperf = document.wizform.cpuperf.value; usethisramperf = document.wizform.ramperf.value; usethisoverallperf = document.wizform.overallperf.value; window.document.mymovie.SetVariable("newramBarw", usethisramperf); window.document.mymovie.SetVariable("newcpuBarw", usethiscpuperf); window.document.mymovie.SetVariable("newvidBarw", usethisvperf); window.document.mymovie.SetVariable("newovrBarw", usethisoverallperf); //alert(usethisoverallperf); } var vNewImage = new Image(); function SwapCase () { if (document.caseImage) { vIndex = document.wizform.elements['configurator_item[]'][0].selectedIndex; vImageIndex = document.wizform.elements['configurator_item[]'][0].options[vIndex].value; document.caseImage.src = caseImages[vImageIndex].src; //document.caseImageF.src = caseImages[vImageIndex].src; DocURL = caseImages[vImageIndex].src; lastchr = DocURL.length; urlresult=DocURL.substring(0,lastchr - 4)+'.html'; //if (document.all) { //document.all['caseLink'] = "javascript:gopop('"+urlresult+"');"; // document.all['caseLinkb'] = "javascript:gopop('"+urlresult+"');"; // document.all['caseLinkc'] = "javascript:gopop('"+urlresult+"');"; //} //else if (document.getElementById) { //document.getElementById('caseLink').href = "javascript:gopop('"+urlresult+"');"; document.getElementById('caseLinkb').href = "javascript:gopop('"+urlresult+"');"; document.getElementById('caseLinkc').href = "javascript:gopop('"+urlresult+"');"; //} } } function setEditedSelections (vInvID) { for (x = 0; x < document.wizform.elements.length; x++) { if (document.wizform.elements[x].type == "select-one") { vEle = document.wizform.elements[x]; for (y = 0; y < vEle.options.length; y++) { if (vEle.options[y].value == vInvID) { document.wizform.elements[x].options[y].selected = true; return; } } } //now do radio if (document.wizform.elements[x].type == "radio") { vEle = document.wizform.elements[x]; if (vEle.value == vInvID) { document.wizform.elements[x].checked = true; return; } //else //{ // document.wizform.elements[x].checked = false; // return; //} } //now do checkboxes if (document.wizform.elements[x].type == "checkbox") { vEle = document.wizform.elements[x]; if (vEle.value == vInvID) { document.wizform.elements[x].checked = true; return; } //else //{ // document.wizform.elements[x].checked = false; // return; //} } } } // Begin. Specify URLs to randomly select from and pop-under. Edit & add freely. var popunder=new Array() popunder[0]="vm_survey_2.htm" // Specify the width and height of new popunder window (in pixels). var width = '780'; var height = '590'; var p = 'scrollbars=yes,resizable=yes,toolbar=no,' + //these are obvious variables. set "yes" or "no". 'menubar=no,status=no,location=no,left=20,top=20,height=' + //yes/no, & the screen location height + ',width=' + width; // Load new PopUnder only once per browser session? (0=no, 1=yes) // Putting 0 will cause the Popunder to load every time page is loaded // Specifying 1 will cause it to load only once per session var one_time=1 function get_cookie(Name) { var search = Name + "=" var returnvalue = ""; if (document.cookie.length > 0) { offset = document.cookie.indexOf(search) if (offset != -1) { // if the cookie exists offset += search.length end = document.cookie.indexOf(";", offset); // set the index of beginning value if (end == -1) // set the index of the end of cookie value end = document.cookie.length; returnvalue=unescape(document.cookie.substring(offset, end)) } } return returnvalue; } function loadornot(){ if (get_cookie('popunder')==''){ load_pop_power() document.cookie="popunder=yes" } } function load_pop_power(){ win2=window.open(popunder[Math.floor(Math.random()*(popunder.length))],"bw",p) win2.blur() window.focus() } // comment load_pop_power and loadornot to not run this //if (one_time==0) //load_pop_power() //else //loadornot()