
function submitonce(theform){if(document.all||document.getElementById){for(i=0;i<theform.length;i++){var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")tempobj.disabled=true}}}
function verifyfields(theform){if(document.all||document.getElementById){for(i=0;i<theform.length;i++){var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="text"&&tempobj.value==""){alert('You Must Enter A Value For All Fields!!');tempobj.focus();return false;}}}}
var xOffset=15;var yOffset=10;xMousePos=0;yMousePos=0;xMousePosMax=0;yMousePosMax=0;function captureMousePosition(e){if(document.layers){xMousePos=e.pageX;yMousePos=e.pageY;xMousePosMax=window.innerWidth+window.pageXOffset;yMousePosMax=window.innerHeight+window.pageYOffset;}else if(document.all){xMousePos=window.event.x+document.body.scrollLeft;yMousePos=window.event.y+document.body.scrollTop;xMousePosMax=document.body.clientWidth+document.body.scrollLeft;yMousePosMax=document.body.clientHeight+document.body.scrollTop;}else if(document.getElementById){xMousePos=e.pageX;yMousePos=e.pageY;xMousePosMax=window.innerWidth+window.pageXOffset;yMousePosMax=window.innerHeight+window.pageYOffset;}}
function showPopup(targetObjectId,eventObj,msg){if(msg==undefined){msg="Error getting help data";}
helpbox.value=msg;if(eventObj){hideCurrentPopup();eventObj.cancelBubble=true;var newXCoordinate=(eventObj.pageX)?eventObj.pageX+xOffset:eventObj.x+xOffset+((document.body.scrollLeft)?document.body.scrollLeft:0);var newYCoordinate=(eventObj.pageY)?eventObj.pageY+yOffset:eventObj.y+yOffset+((document.body.scrollTop)?document.body.scrollTop:0);moveObject(targetObjectId,newXCoordinate,newYCoordinate);if(changeObjectVisibility(targetObjectId,'visible')){window.currentlyVisiblePopup=targetObjectId;return true;}else{return false;}}else{return false;}}
function hideCurrentPopup(){if(window.currentlyVisiblePopup){changeObjectVisibility(window.currentlyVisiblePopup,'hidden');window.currentlyVisiblePopup=false;}}
window.onload=initializeHacks;function initializeHacks(){if((navigator.appVersion.indexOf('MSIE 5')!=-1)&&(navigator.platform.indexOf('Mac')!=-1)&&getStyleObject('blankDiv')){window.onresize=explorerMacResizeFix;}
resizeBlankDiv();createFakeEventObj();}
function createFakeEventObj(){if(!window.event){window.event=false;}}
function resizeBlankDiv(){if((navigator.appVersion.indexOf('MSIE 5')!=-1)&&(navigator.platform.indexOf('Mac')!=-1)&&getStyleObject('blankDiv')){getStyleObject('blankDiv').width=document.body.clientWidth-20;getStyleObject('blankDiv').height=document.body.clientHeight-20;}}
function explorerMacResizeFix(){location.reload(false);}
function getStyleObject(objectId){if(document.getElementById&&document.getElementById(objectId)){return document.getElementById(objectId).style;}else if(document.all&&document.all(objectId)){return document.all(objectId).style;}else if(document.layers&&document.layers[objectId]){return document.layers[objectId];}else{return false;}}
function changeObjectVisibility(objectId,newVisibility){var styleObject=getStyleObject(objectId);if(styleObject){styleObject.visibility=newVisibility;return true;}else{return false;}}
function moveObject(objectId,newXCoordinate,newYCoordinate){var styleObject=getStyleObject(objectId);if(styleObject){styleObject.left=newXCoordinate;styleObject.top=newYCoordinate;return true;}else{return false;}}
function buylink(){location.href='index.php?view=account&ac=buywizard&step=2&samount='+document.form.link.value+'&ptype=link&".$url_variables."'}
function buyptsu(){location.href='index.php?view=account&ac=buywizard&step=2&samount='+document.form.ptsu.value+'&ptype=ptsu&".$url_variables."'}
function buyxcredits(){location.href='index.php?view=account&ac=buywizard&step=2&samount='+document.form.xcredits.value+'&ptype=xcredits&".$url_variables."'}
function buysurf(){location.href='index.php?view=account&ac=buywizard&step=2&samount='+document.form.link.value+'&ptype=surf&".$url_variables."'}
function buyghits(){location.href='index.php?view=account&ac=buywizard&step=2&samount='+document.form.ghits.value+'&ptype=ghits&".$url_variables."'}
function buypopups(){location.href='index.php?view=account&ac=buywizard&step=2&samount='+document.form.popups.value+'&ptype=popups&".$url_variables."'}
function buyptr(){location.href='index.php?view=account&ac=buywizard&step=2&samount='+document.form.ptr.value+'&ptype=ptr&".$url_variables."'}
function buyptra(){location.href='index.php?view=account&ac=buywizard&step=2&samount='+document.form.ptra.value+'&ptype=ptra&".$url_variables."'}
function buygpoints(){location.href='index.php?view=account&ac=buywizard&step=2&samount='+document.form.gpoints.value+'&ptype=gpoints&".$url_variables."'}
function buyptrac(){location.href='index.php?view=account&ac=buywizard&step=2&samount='+document.form.ptrac.value+'&ptype=ptrac&".$url_variables."'}
function buyfbanner(){location.href='index.php?view=account&ac=buywizard&step=2&samount='+document.form.banner.value+'&ptype=fbanner&".$url_variables."'}
function buybanner(){location.href='index.php?view=account&ac=buywizard&step=2&samount='+document.form.banner.value+'&ptype=banner&".$url_variables."'}
function buyfad(){location.href='index.php?view=account&ac=buywizard&step=2&samount='+document.form.fad.value+'&ptype=fad&".$url_variables."'}
function buyflink(){location.href='index.php?view=account&ac=buywizard&step=2&samount='+document.form.flink.value+'&ptype=flink&".$url_variables."'}
function buyref(){location.href='index.php?view=account&ac=buywizard&step=2&samount='+document.form.referrals.value+'&ptype=referrals&".$url_variables."'}
function buyupgrade(id,amount){location.href='index.php?view=account&ac=buywizard&step=2&samount='+amount+'&id='+id+'&ptype=upgrade&".$url_variables."'}
function buyspecial(id,amount){location.href='index.php?view=account&ac=buywizard&step=2&samount='+amount+'&id='+id+'&ptype=special&".$url_variables."'}
function buyoto(id,amount){location.href='index.php?view=account&ac=buywizard&step=2&samount='+amount+'&id='+id+'&ptype=oto&".$url_variables."'}
