 var identifier_seed='';var identifier='';var jM=4000;var O=null;var Timeout=null;var Uploading=false;var UploadFiles=1;var UserLogin=0;var UserEmail='n/a';var dy=0;var cM=0;var dA=false;function fu(){ShowStatusMessage(3,"Logging off user '"+UserEmail+"'.. Please wait..");setTimeout('jz()',2000);};function jz(){eO=document.getElementById('userwork');if(eO){ai();m(1,'none','prelogin','postlogin','div');var dK='/dynamic/logout.php?rand='+cB(5);if(eO.location)eO.location=dK;else eO.src=dK;}};function aq(iY){if(iY==dy&&cM==1)return false;hs=document.getElementById('userwork');if(hs){ShowStatusMessage(3,"Changing sharing mode.. Please wait..");var dK="/dynamic/douseracl.php?acl="+iY;if(hs.location)hs.location=dK;else hs.src=dK;}return true;};function dO(){var dw=document.getElementById('sharingmodebrowse');var dx=document.getElementById('sharingmodesingle');if(dw&&dx){if(dy==1){dx.className="singlefile";dw.className="browsable_selected";}else{dx.className="singlefile_selected";dw.className="browsable";}}var da=document.getElementById('pagename');if(da&&da.value=='myfiles'){C(l,I);}};function bG(jF){setTimeout('ai()',jF);return false;};function ai(){dc=document.getElementById('statusmessage');if(dA==false){if(dc){dc.innerHTML='';dc.style.display="none";}return false;}dA=false;if(dc)opacity('statusmessage',100,0,500);return false;};function ShowStatusMessage(jH,iM){dc=document.getElementById('statusmessage');if(dc){dc.innerHTML=iM;dc.style.display="block";opacity('statusmessage',0,100,200);dA=true;}else return false;switch(jH){case 0:bG(3000);break;case 1:bG(5000);break;case 2:bG(9000);break;case 3:break;default:ai();break;}return false;};function opacity(id,opacStart,opacEnd,millisec){var speed=Math.round(millisec/100);var timer=0;if(opacStart>opacEnd){for(i=opacStart;i>=opacEnd;i--){setTimeout("gD("+i+",'"+id+"')",(timer*speed));timer++;}}else if(opacStart<opacEnd){for(i=opacStart;i<=opacEnd;i++){setTimeout("gD("+i+",'"+id+"')",(timer*speed));timer++;}}};function gD(opacity,id){var mainobject=document.getElementById(id);if(!mainobject)return false;var object=document.getElementById(id).style;object.opacity=(opacity/100);object.MozOpacity=(opacity/100);object.KhtmlOpacity=(opacity/100);object.filter="alpha(opacity="+opacity+")";};function Y(limitField,limitCount,limitNum,jv){if(limitField.value.length>limitNum){limitField.value=limitField.value.substring(0,limitNum);}else{limitCount.innerHTML=limitNum-(limitField.value.length+jv);}};function hU(jx,gc){if(!jx)return false;var eo="http://www"+cS(gc)+".randomgameplayer.com/imgbnc.php/"+gc+"1g.jpg";jx.src=eo;};function cS(gc){return Math.ceil(jL(gc.substring(0,1))/4);};function jD(){return "You haven't finished yet!  Please press 'Cancel' to continue.";};function ap(hB){var g=0;var gY;while(document.getElementById('toptab_'+g)){gY=document.getElementById('toptab_'+g);if(hB==g)gY.className='current';else{switch(g){case 0:case 1:break;case 2:gY.className='green';default:break;}}g++;}};function kd(d){return d.toString(16);};function jL(h){return parseInt(h,16);};function m(){var i,x,tB,j=0,tA=new Array(),arg=m.arguments;if(document.getElementsByTagName){for(i=4;i<arg.length;i++){tB=document.getElementsByTagName(arg[i]);for(x=0;x<tB.length;x++){tA[j]=tB[x];j++;}}for(i=0;i<tA.length;i++){if(tA[i].className){if(tA[i].id==arg[1]){if(arg[0]==1){tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];}else{tA[i].className=arg[2];}}else if(arg[0]==1&&arg[1]=='none'){if(tA[i].className==arg[2]||tA[i].className==arg[3]){tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];}}else if(tA[i].className==arg[2]){tA[i].className=arg[3];}}}}};function by(){if(document.getElementById('iframe_ad1'))if(document.getElementById('iframe_ad1').location)document.getElementById('iframe_ad1').location="/templates/myfiles_728x90.html";else document.getElementById('iframe_ad1').src="/templates/myfiles_728x90.html";if(document.getElementById('iframe_ad2'))if(document.getElementById('iframe_ad2').location)document.getElementById('iframe_ad2').location="/templates/160x600.html";else document.getElementById('iframe_ad2').src="/templates/160x600.html";if(document.getElementById('iframe_ad3'))if(document.getElementById('iframe_ad3').location)document.getElementById('iframe_ad3').location="/templates/336x280.html";else document.getElementById('iframe_ad3').src="/templates/336x280.html";};function cI(newlocation){window.location.href=newlocation;};function fK(flipto){if(flipto=='logout')m(1,'none','prelogin','postlogin','div');};function eJ(){var da=document.getElementById('pagename');var bn='';if(!da)return;switch(da.value){case 'imageview':var query=window.location.search.substring(1);var vars=query.split("&");bn=vars[0]+"&"+vars[1]+"&r="+cB(5);break;case 'download':var query=window.location.search.substring(1);var vars=query.split("&");bn=vars[0];break;case 'about1':case 'about2':case 'myfiles':case 'myaccount':bn="?r="+cB(5);break;default:break;}switch(da.value){case 'imageview':if(document.location)document.location="/imageview.php?"+bn;else document.src="/imageview.php?"+bn;break;case 'download':if(document.location)document.location="/download.php?"+bn;else document.src="/download.php?"+bn;break;case 'about1':case 'myfiles':if(document.location)document.location="/myfiles.php"+bn;else document.src="/myfiles.php"+bn;break;case 'about2':case 'myaccount':if(document.location)document.location="/myaccount.php"+bn;else document.src="/myaccount.php"+bn;break;default:break;}};function gF(){if(UserLogin!=0){document.getElementById('loggedin_email').innerHTML=UserEmail;fK('logout');if(document.getElementById('upload_create')){document.getElementById('upload_create').style.visibility="hidden";document.getElementById('upload_login').style.visibility="hidden";document.getElementById('upload_create').innerHTML="";document.getElementById('upload_login').innerHTML="";document.getElementById('upload_create').style.display="none";document.getElementById('upload_login').style.display="none";}}else{if(document.getElementById('upload_create')){document.getElementById('upload_create').style.visibility="visible";document.getElementById('upload_login').style.visibility="visible";}if(document.getElementById('reg_emailUL')){document.getElementById('reg_emailUL').value="";document.getElementById('reg_passUL').value="";}if(document.getElementById('reg_email')){document.getElementById('reg_email').value="";document.getElementById('reg_pass').value="";}}if(document.getElementById('login_area')){document.getElementById('login_area').style.visibility="visible";}};function J(iO){var jf=document.getElementById(iO);if(!jf){ShowStatusMessage(0,"Failed to copy to clipboard, please use CTRL-C");return false;}var text2copy=jf.value;if(window.clipboardData&&clipboardData.setData&&0){window.clipboardData.setData("Text",text2copy);ShowStatusMessage(0,"Data copied to your clipboard!");}else{var flashcopier='flashcopier';if(!document.getElementById(flashcopier)){var divholder=document.createElement('div');divholder.id=flashcopier;document.body.appendChild(divholder);}document.getElementById(flashcopier).innerHTML='';var divinfo='<embed src="swf/clipboard.swf" FlashVars="clipboard='+escape(text2copy)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';document.getElementById(flashcopier).innerHTML=divinfo;ShowStatusMessage(0,"Data copied to your clipboard!");}return false;};function cZ(direction){var counter=1;if(direction=="blank")var targetstring="_blank";else var targetstring="";while(counter<25){if(document.getElementById('alink_'+counter)){document.getElementById('alink_'+counter).target=targetstring;}counter++;}};function hM(num1,num2){num1=parseInt(num1);num2=parseInt(num2);if(num1>=num2)return 0;else{var generator=Math.random()*(num2-num1);return Math.round(num1+generator);}};function cB(len){var varAlpha="";var varBeta="";while(len>0){var rndNum=Math.random();rndNum=parseInt(rndNum*1000);rndNum=(rndNum%26)+65;varBeta=String.fromCharCode(rndNum);varAlpha=varAlpha+varBeta;len--;}varBeta=varAlpha.toLowerCase();return varBeta;};function dk(){if(document.getElementById('workframe2'))if(document.getElementById('workframe2').location)document.getElementById('workframe2').location="/dynamic/random_seed.php";else document.getElementById('workframe2').src="/dynamic/random_seed.php";};function cV(eT){if(eT==null)eT=0;var filefield=document.getElementById('file_name0');if(filefield.value==""){ShowStatusMessage(0," ");}else{identifier=identifier_seed;document.form_upload.action='http://www.randomgameplayer.com/'+identifier+'p'+eT;m(1,'none','preupload','progressupload','div');Uploading=true;cZ("blank");document.getElementById('form_upload').submit();}};function ay(){if(typeof XMLHttpRequest!="undefined"){O=new XMLHttpRequest();return 1;}else if(window.ActiveXObject){var aU=["MSXML2.XMLHttp.5.0","MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0","MSXML2.XMLHttp","Microsoft.XMLHttp"];for(var i=0;i<aU.length;i++){try{O=new ActiveXObject(aU[i]);return 1;}catch(eA){}}}return 0;};function bH(numfiles,force){if(numfiles==UploadFiles&&force!=1)return;document.getElementById('links').selectedIndex=(parseInt(numfiles)-1);var counter=0;var gd=new Array();var newSlot;while(counter<parseInt(numfiles)){gd[counter]='<div class="header_browsebox"><table border="0" cellpadding="0" align="center" cellspacing="0"><tr>';if(parseInt(numfiles)>1)gd[counter]+='<td><div class="ul_number">'+(counter+1)+'</div></td>';else gd[counter]+='<td><div id="filenum_1" name="filenum_1" class="ul_number"></div></td>';gd[counter]+='<td><img src="images/browse_left.gif" height="28"/></td><td align="center" bgcolor="#FFFFFF"><input class="browse" name="file_name'+counter+'" id="file_name'+counter+'" type="file"  size="58" /></td><td><img src="images/browse_right.gif" height="28"/></td></tr></table></div>';counter++;}if(parseInt(numfiles)<=UploadFiles){counter=parseInt(numfiles);while(counter<10){document.getElementById('links_html_'+counter).innerHTML=' ';counter++;}counter=0;if(force)while(counter<numfiles){document.getElementById('links_html_'+counter).innerHTML=gd[counter];counter++;}}else{counter=UploadFiles;while(counter<numfiles){document.getElementById('links_html_'+counter).innerHTML=gd[counter];counter++;}}if(parseInt(numfiles)==1){document.getElementById('filenum_1').innerHTML='';document.getElementById('submit_file').src="images/upload_button.gif";}else{document.getElementById('filenum_1').innerHTML='1';document.getElementById('submit_file').src="images/uploads_button.gif";}UploadFiles=parseInt(numfiles);};function bk(percent,kbps,verify,eta){if(percent!=''&&percent!='undefined'){divUploadPercent=document.getElementById('total_percent');divUploadPercent.innerHTML=percent+"%";divUploadPercentWidth=document.getElementById('total_progress');if(percent>0)divUploadPercentWidth.style.width=percent+"%";else divUploadPercentWidth.style.width=1;}if(kbps!=''&&kbps!='undefined'){divKbps=document.getElementById('kbps');divKbps.innerHTML=kbps+"Kbps";divKbpsWidth=document.getElementById('speed');if(kbps>0){if(kbps>512)divKbpsWidth.style.width="150px";else if(kbps<128)divKbpsWidth.style.width="25px";else divKbpsWidth.style.width=Math.round(kbps/3.5)+"px";}else divKbpsWidth.style.width=1;}if(verify!=''&&verify!='undefined'){divVerifyPercent=document.getElementById('progress');divVerifyPercent.innerHTML=verify+"%";divVerifyPercentWidth=document.getElementById('progress_bar');if(verify>0)divVerifyPercentWidth.style.width=verify+"%";else divVerifyPercentWidth.style.width=1;}if(eta!=''&&eta!='undefined'){divETA=document.getElementById('eta');divETA.innerHTML=eta;}};function cs(c_name,value,expiredays){var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=c_name+"="+escape(value)+((expiredays==null)?"":";expires="+exdate.toGMTString());};function bc(c_name,value,expireseconds){var exdate=new Date();exdate.setTime(exdate.getTime()+(expireseconds*1000));document.cookie=c_name+"="+escape(value)+((expireseconds==null)?"":";expires="+exdate.toGMTString());};function iR(c_name,value){document.cookie=c_name+"="+escape(value);};function cu(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!= -1){c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end== -1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}return "";};function eU(c_name){cs(c_name,'',-1);};function dF(eB,hR,gS){io();iA(eB,hR,gS);};function aR(eB){gP(eB);};function iA(eB,hR,gS){var ez=document.getElementById(eB);if(!ez){gl();return false;}w=hR;h=gS;xc=Math.round((document.body.clientWidth/2)-(w/2));yc=Math.round((document.body.clientHeight/2)-(h/2));ez.style.left=xc+"px";ez.style.top='100px';ez.style.display='block';};function gP(eB){var ez=document.getElementById(eB);if(ez)ez.style.display='none';else{ShowStatusMessage(0,"Internal Error closing popup, please contact support!");return;}gl();};function io(){var page_screen=document.getElementById('page_screen');page_screen.style.height=document.body.parentNode.scrollHeight+'px';page_screen.style.display='block';opacity('page_screen',0,80,200);};function gl(){var page_screen=document.getElementById('page_screen');if(page_screen){opacity('page_screen',80,0,100);setTimeout('hT()',1500);}else ShowStatusMessage(0,"Internal Error with HTML components, please contact support.");};function hT(){var ig=document.getElementById('page_screen');if(!ig)return false;ig.style.display="none";} 