var kd='';var identifier='';var oz=4000;var eP=null;var iG=null;var Uploading=false;var UploadFiles=1;var UserLogin=0;var UserEmail='n/a';var gY=0;var iv=0;var fu=0;var hq=0;var lB=0;var mv=0;var jd=0;var oo=false;var ka=false;Array.prototype.multiSort=function(index){for(var i=0;i<this.length;i++){var temp=this[i].splice(index,1);this[i].unshift(temp);}return this.sort();};function ByteSize(it){return TRUE;};function cv(){var ah=document.getElementById('form_reg');if(ah)ah.submit();else aa(0,"Unable to submit registration, please reload page and try again.");};function dW(ez){if(!ez)return false;var kV=ez.split('/');for(eh=0;kV[eh]!=undefined&&eh<10;eh++);if(eh-- >1){var jC=kV[eh].split('?');for(fA=0;jC[fA]!=undefined&&fA<10;fA++);if(fA>0)fA--;var mT=jC[fA].split('&');for(gZ=0;mT[gZ]!=undefined&&gZ<10;gZ++);if(gZ>0)gZ--;var kj=jC[gZ].split('=');for(gy=0;kj[gy]!=undefined&&gy<10;gy++);if(gy>0)gy--;if(kj[gy].length>3)return kj[gy];else return false;}else return false;};function dO(){aa(3,"Logging off user '"+UserEmail+"'.. Please wait..");setTimeout('dS()',2000);};function dG(lu){if(window.location)window.location=lu;else window.src=lu;};function pN(lu,pO){var ah=document.getElementById(pO);if(ah){if(ah.location)ah.location=lu;else ah.src=lu;}};function dS(){iD=document.getElementById('userwork');if(iD){av();ab(1,'none','prelogin','postlogin','div');var fT='/dynamic/logout.php?rand='+aC(5);if(iD.location)iD.location=fT;else iD.src=fT;}};function as(lP){if(lP==gY&&iv==1)return false;ii=document.getElementById('userwork');if(ii){aa(3,"Changing sharing mode.. Please wait..");var fT="/dynamic/douseracl.php?acl="+lP;if(ii.location)ii.location=fT;else ii.src=fT;}return true;};function cj(oc){var jw=document.getElementById('sharingmodebrowse');var jy=document.getElementById('sharingmodesingle');if(jw&&jy){if(gY==1){jy.className="singlefile";jw.className="browsable_selected";}else{jy.className="singlefile_selected";jw.className="browsable";}}var gV=document.getElementById('pagename');if(gV&&gV.value=='myfiles'&&oc!=1){RenderMyFiles(er,eN);}};function bF(ob){setTimeout('av()',ob);return false;};function av(){gm=document.getElementById('statusmessage');if(ka==false){if(gm){gm.innerHTML='';gm.style.display="none";}return false;}ka=false;if(gm)opacity('statusmessage',100,0,500);return false;};function aa(na,hg){gm=document.getElementById('statusmessage');if(gm){gm.innerHTML=hg;gm.style.display="block";opacity('statusmessage',0,100,200);ka=true;}else return false;switch(na){case 0:bF(5000);break;case 1:bF(7000);break;case 2:bF(9000);break;case 3:break;default:av();break;}return false;};


function opacity
(id,opacStart,opacEnd,millisec)
{var object=document.getElementById(id).style;

   object.opacity=(opacEnd/100);
   object.MozOpacity=(opacEnd/100);
   object.KhtmlOpacity=(opacEnd/100);
   object.filter="alpha(opacity="+opacEnd+")";return;
 };
 
 
 function opacity_real(id,opacStart,opacEnd,millisec)
 {var object=document.getElementById(id).style;var speed=Math.round(millisec/100);var timer=0;if(opacStart>opacEnd){for(i=opacStart;i>=opacEnd;i--){setTimeout("co("+i+",'"+id+"')",(timer*speed));timer++;}}else if(opacStart<opacEnd){for(i=opacStart;i<=opacEnd;i++){setTimeout("co("+i+",'"+id+"')",(timer*speed));timer++;}}};function co(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 aq(limitField,limitCount,limitNum,nC){if(limitField.value.length>limitNum){limitField.value=limitField.value.substring(0,limitNum);limitCount.innerHTML=0;}else{limitCount.innerHTML=limitNum-(limitField.value.length+nC);}};function cE(lw,iH,ik){if(!lw)return false;if(!ik&&ik!=0)ik=1;var ez="";if(lB==1){ez+="/imgbnc.php/"+iH+ik+"g.jpg";}else{ez+="http://www"+aX(iH)+".mediafire.com/imgbnc.php/"+iH+ik+"g.jpg";}lw.src=ez;};function aX(iH){return Math.ceil(h2d(iH.substring(0,1))/4);};function en(){return "You haven't finished yet!  Please press 'Cancel' to continue.";};function ap(hv){if(mv!=0)return;var eh=0;var jD;while(document.getElementById('toptab_'+eh)){jD=document.getElementById('toptab_'+eh);if(hv==eh)jD.className='current';else{switch(eh){case 0:case 1:break;case 2:jD.className='green';default:break;}}eh++;}mv=1;};function d2h(d){return d.toString(16);};function h2d(h){return parseInt(h,16);};function ab(){var i,x,tB,j=0,tA=new Array(),arg=ab.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 ax(){if(jd!=0)return;if(document.getElementById('iframe_ad1')){pN('/templates/728x90.html','iframe_ad1');DoShow('iframe_ad1');}if(document.getElementById('iframe_ad2')){pN('/templates/160x600.html','iframe_ad2');DoShow('iframe_ad2');}if(document.getElementById('iframe_ad3')){pN('/templates/336x280.html','iframe_ad3');DoShow('iframe_ad3');}jd=1;};function dC(){if(jd!=1)return;if(document.getElementById('iframe_ad1')){pN('/blank.html','iframe_ad1');DoHide('iframe_ad1');}if(document.getElementById('iframe_ad2')){pN('/blank.html','iframe_ad2');DoHide('iframe_ad2');}if(document.getElementById('iframe_ad3')){pN('/blank.html','iframe_ad3');DoHide('iframe_ad3');}jd=0;};function change_top_window(newlocation){window.location.href=newlocation;};function bL(flipto){if(flipto=='logout')ab(1,'none','prelogin','postlogin','div');};function bT(){var gV=document.getElementById('pagename');var fi='';if(!gV)return;switch(gV.value){case 'imageview':var query=window.location.search.substring(1);var vars=query.split("&");fi=vars[0]+"&"+vars[1]+"&r="+aC(5);break;case 'download':var query=window.location.search.substring(1);var vars=query.split("&");fi=vars[0];break;case 'about1':case 'about2':case 'myfiles':case 'upload':case 'billinghistory':case 'myaccount':fi="?r="+aC(5);break;case 'statisticsfilter':fi="?r="+aC(5);break;default:break;}switch(gV.value){case 'imageview':if(document.location)document.location="/imageview.php?"+fi;else document.src="/imageview.php?"+fi;break;case 'download':if(document.location)document.location="/download.php?"+fi;else document.src="/download.php?"+fi;break;case 'about1':case 'myfiles':if(document.location)document.location="/myfiles.php"+fi;else document.src="/myfiles.php"+fi;break;case 'about2':case 'myaccount':if(document.location)document.location="/myaccount.php"+fi;else document.src="/myaccount.php"+fi;break;case 'billinghistory':if(document.location)document.location="/myaccount/billinghistory.php"+fi;else document.src="/myaccount/billinghistory.php"+fi;break;case 'statisticsfilter':if(document.location)document.location="/myaccount/statisticsfilter.php"+fi;else document.src="/myaccount/statisticsfilter.php"+fi;break;case 'upload':if(document.location)document.location="/"+fi;else document.src="/"+fi;break;default:break;}};function cR(){var gd=document.getElementById('header_icon_pro_logo');if(UserLogin!=0){document.getElementById('loggedin_email').innerHTML=UserEmail;bL('logout');if(gd){if(fu>=1)gd.style.display='';else gd.style.display='none';}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(gd){gd.style.display='none';}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 am(mU){var hO=document.getElementById(mU);if(!hO){aa(0,"Failed to copy to clipboard, please use CTRL-C");return false;}if(hO.value)var text2copy=hO.value;else if(hO.innerHTML)var text2copy=hO.innerHTML;if(window.clipboardData&&clipboardData.setData&&0){window.clipboardData.setData("Text",text2copy);aa(0,"Data copied to your clipboard!");}else{var flashcopier='flashcopier';if(!document.getElementById(flashcopier)){var kP=document.createElement('div');kP.id=flashcopier;document.body.appendChild(kP);}document.getElementById(flashcopier).innerHTML='';var nd='<embed src="/swf/_clipboard.swf" FlashVars="clipboard='+escape(text2copy)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';document.getElementById(flashcopier).innerHTML=nd;aa(0,"Data copied to your clipboard!");}return false;};function cH(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 db(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 aC(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 bR(){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 dg(jM){if(jM==null)jM=0;var filefield=document.getElementById('file_name0');if(filefield.value==""){aa(0,"Please click the 'Browse' or 'Choose' button and select at least one file before clicking the 'Upload File(s) to MediaFire' button");}else{identifier=kd;document.form_upload.action='http://upload.mediafire.com/'+identifier+'p'+jM;ab(1,'none','preupload','progressupload','div');Uploading=true;cH("blank");document.getElementById('form_upload').submit();}};function aP(){if(typeof XMLHttpRequest!="undefined"){eP=new XMLHttpRequest();return 1;}else if(window.ActiveXObject){var gp=["MSXML2.XMLHttp.5.0","MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0","MSXML2.XMLHttp","Microsoft.XMLHttp"];for(var i=0;i<gp.length;i++){try{eP=new ActiveXObject(gp[i]);return 1;}catch(hk){}}}return 0;};function set_file_name(je,iI){var gu='';if(!iI)return false;if(je&&je.length<11){return false;}if((gu=dW(je))!=false){iI.value=gu;}else if(iI){iI.value='Uknown_'+aC(5)+'.upload';}else return false;};function bn(numfiles,force,website){if(!document.getElementById('upload_content')|| !document.getElementById('links'))return;if(numfiles==UploadFiles&&force!=1)return;document.getElementById('links').selectedIndex=(parseInt(numfiles)-1);var counter=0;var sHTML=new Array();var newSlot;while(counter<parseInt(numfiles)){sHTML[counter]='<div class="header_browsebox"><table border="0" cellpadding="0" align="center" cellspacing="0"><tr>';if(parseInt(numfiles)>1)sHTML[counter]+='<td><div class="ul_number">'+(counter+1)+'</div></td>';else sHTML[counter]+='<td><div id="filenum_1" name="filenum_1" class="ul_number"></div></td>';if(website){sHTML[counter]+='<td> URL&nbsp;</td>';sHTML[counter]+='<td><img src="/images/browse_left.gif" height="28"/></td><td align="center" bgcolor="#FFFFFF"><input class="browse_lite" name="file_name'+counter+'" id="file_name'+counter+'" type="input"  size="30" value="http://" OnBlur="if (this.value == \'\') { this.value = \'http://\'; this.className = \'browse_lite\'; }" OnFocus="if (this.value == \'http://\') { this.value = \'\';  this.className = \'browse\'; }" OnChange="set_file_name(this.value,document.getElementById(\'file_title'+counter+'\'));" /></td><td><img src="/images/browse_right.gif" height="28"/></td>';sHTML[counter]+='<td>&nbsp;&nbsp;&nbsp; Save As&nbsp;</td>';sHTML[counter]+='<td><img src="/images/browse_left.gif" height="28"/></td><td align="center" bgcolor="#FFFFFF"><input class="browse_lite" name="file_title'+counter+'" id="file_title'+counter+'" type="input"  size="20" value="file.exe" OnFocus="if (this.value == \'file.exe\') this.value = \'\'; this.className = \'browse\';"/></td><td><img src="/images/browse_right.gif" height="28"/></td></tr></table></div>';}else sHTML[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=sHTML[counter];counter++;}}else{counter=UploadFiles;while(counter<numfiles){document.getElementById('links_html_'+counter).innerHTML=sHTML[counter];counter++;}}if(parseInt(numfiles)==1){document.getElementById('filenum_1').innerHTML='';document.getElementById('submit_file').src="/images/buttons/upload_file.gif";}else{document.getElementById('filenum_1').innerHTML='1';document.getElementById('submit_file').src="/images/buttons/upload_files1.gif";}UploadFiles=parseInt(numfiles);};function update_upload_progress(percent,kbps,verify,eta){if(percent!=''&&percent!='undefined'){nA=document.getElementById('total_percent');nA.innerHTML=percent+"%";kF=document.getElementById('total_progress');if(percent>0)kF.style.width=percent+"%";else kF.style.width=1;}if(kbps!=''&&kbps!='undefined'){nz=document.getElementById('kbps');nz.innerHTML=kbps+"Kbps";iW=document.getElementById('speed');if(kbps>0){if(kbps>512)iW.style.width="150px";else if(kbps<128)iW.style.width="25px";else iW.style.width=Math.round(kbps/3.5)+"px";}else iW.style.width=1;}if(verify!=''&&verify!='undefined'){nD=document.getElementById('progress');nD.innerHTML=verify+"%";lc=document.getElementById('progress_bar');if(verify>0)lc.style.width=verify+"%";else lc.style.width=1;}if(eta!=''&&eta!='undefined'){nf=document.getElementById('eta');nf.innerHTML=eta;}};function aY(fZ,value,lj){var exdate=new Date();exdate.setDate(exdate.getDate()+lj);document.cookie=fZ+"="+escape(value)+((lj==null)?"":";expires="+exdate.toGMTString());};function aU(fZ,value,lh){var exdate=new Date();exdate.setTime(exdate.getTime()+(lh*1000));document.cookie=fZ+"="+escape(value)+((lh==null)?"":";expires="+exdate.toGMTString());};function ef(fZ,value){document.cookie=fZ+"="+escape(value);};function aL(fZ){if(document.cookie.length>0){hG=document.cookie.indexOf(fZ+"=");if(hG!= -1){hG=hG+fZ.length+1;jN=document.cookie.indexOf(";",hG);if(jN== -1)jN=document.cookie.length;return unescape(document.cookie.substring(hG,jN));}}return "";};function bU(fZ){aY(fZ,'',-1);};function cI(){var ip=0,iu=0;if(typeof(window.pageYOffset)=='number'){iu=window.pageYOffset;ip=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){iu=document.body.scrollTop;ip=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){iu=document.documentElement.scrollTop;ip=document.documentElement.scrollLeft;}return[ip,iu];};function aj(fC,hQ,hm){DoAPopup(fC,hQ,hm);};


function DoAPopup(fC,hQ,hm)
{
   dZ();
   cq(fC,hQ,hm);
   
   };
   
   
   function ai(fC){bY(fC);};function bO(fC,hQ,hm){cq(fC,hQ,hm);};function bs(fC){bY(fC,true);};
   
   
   function cq(fC,hQ,hm)
   {
   var gH=document.getElementById(fC);
   if(!gH){return false;}w=hQ;h=hm;
      xc=Math.round((document.body.clientWidth-w)/2);
      yc=Math.round((document.body.clientHeight/2)-(h/2));
      var og=cI();
    
      if(xc > 0)
            gH.style.left=xc + "px";
      else
            gH.style.left="20px";
      gH.style.top=(og[1])+'px';
      gH.style.display='block';
      };
      
      function bY(fC,nc){var gH=document.getElementById(fC);if(gH){gH.style.display='none';if(nc!=true){cU();}}else{aa(0,"Internal Error closing popup, please contact support!");alert(fC);return;}};
   
   
   function dZ()
   {
   var page_screen=document.getElementById('page_screen');
   if(!page_screen)return;
   
   page_screen.style.height=document.body.parentNode.scrollHeight+'px';
   page_screen.style.display='block';
   opacity('page_screen',0,80,200);
   };
   
   
   function cU(){var page_screen=document.getElementById('page_screen');if(page_screen){opacity('page_screen',80,0,100);setTimeout('cO()',1500);}return;};
   function cO(){var kA=document.getElementById('page_screen');if(!kA)return false;kA.style.display="none";};
   function au(obj){if(obj!=null&&obj.options!=null){return true;}return false;};
   function at(from){if(!au(from)){return;}for(var i=(from.options.length-1);i>=0;i--){from.options[i]=null;}from.selectedIndex= -1;};
   function ac(obj,text,value,selected){if(obj!=null&&obj.options!=null){obj.options[obj.options.length]=new Option(text,value,false,selected);}};
   function DoHide(fb){var ah;ah=document.getElementById(fb);if(ah&&ah.className!='hide')ah.className="hide";return;};
   function DoShow(fb){var ah;ah=document.getElementById(fb);if(ah&&ah.className!='show')ah.className="show";return;};
   function al(fb){var ah;ah=document.getElementById(fb);if(ah&&ah.innerHTML)ah.innerHTML="";return;};
   function bA(fb){var ah=document.getElementById(fb);if(ah)if(ah.style.display=='block')return true;else return false;else return false;};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");};String.prototype.ltrim=function(){return this.replace(/^\s+/,"");};String.prototype.rtrim=function(){return this.replace(/\s+$/,"");};
   function GetThis(T,C,U,L){var targetUrl='http://www.myspace.com/Modules/PostTo/Pages/?'+'t='+encodeURIComponent(T)+'&c='+encodeURIComponent(C)+'&u='+encodeURIComponent(U)+'&l='+L;window.open(targetUrl);



}