function wopen(url,width,height)
{newwindow=window.open(url,'name','height='+height+',width='+width);if(window.focus){newwindow.focus()}
return false;}
function sure(url,text)
{if(confirm(text))
{document.location=url;}}
function bookmark(a)
{if(window.sidebar)
{window.sidebar.addPanel(title,homepage,'');return true;}
else if(window.opera&&window.print)
{a.href=homepage;a.rel="sidebar";a.title=title;return true;}
else if(document.all)
{window.external.AddFavorite(homepage,title);return true;}
var chr='CTRL-D';var agt=navigator.userAgent.toLowerCase();if(agt.substr(agt.indexOf('opera')+6,1)<9)chr='CTRL-T';alert("Press '+chr+' to bookmark us!");}
function get(id)
{return document.getElementById(id);}
function toggle(theDiv)
{var elem=document.getElementById(theDiv);if(theDiv=='codes')
{elem.style.display='block';clip_init();return true;}
if(elem.style.display=="none")
{elem.style.display='block';return true;}
else
{elem.style.display='none';return false;}}
function upload_status(perc)
{get('status_uploading').style.width=perc+'%';perc=perc+1;if(perc>99)
{perc=0;}
setTimeout('upload_status('+perc+')',500);}
function submit_form()
{if(get('upload'))
{if(!get('upload').value)
{return false;}}
if(get("l_adult_no"))
{if(!get("l_adult_no").checked&&!get("l_adult_yes").checked)
{alert(text_alert);return false;}}
if(get("presubmit"))
{get('presubmit').style.display='none';get('progress').style.display='';setTimeout('upload_status(0)',500);}
var c=new Date();hashArr=new Array();hashArr[hashArr.length]=typeof screen.colorDepth!="undefined"?screen.colorDepth:"?";hashArr[hashArr.length]=typeof screen.width!="undefined"?screen.width:"?";hashArr[hashArr.length]=typeof screen.height!="undefined"?screen.height:"?";hashArr[hashArr.length]=typeof navigator.cookieEnabled!="undefined"?"true":"?";hashArr[hashArr.length]=typeof navigator.systemLanguage!="undefined"?navigator.systemLanguage:"?";hashArr[hashArr.length]=typeof navigator.userLanguage!="undefined"?navigator.userLanguage:"?"
if(c.toLocaleString())
{hashArr[hashArr.length]=c.toLocaleString();}
else
{hashArr[hashArr.length]="?";}
hashArr[hashArr.length]=typeof navigator.userAgent!=navigator.userAgent?navigator.userAgent:"?";var d="";for(var e=0;e<hashArr.length;e++)
{d=d+hashArr[e]+"__"}
get('ui').value=d;return true;}
function bot_test()
{get('antibot').value="test";return true;}
function update_code()
{var field=get('layout');var str=get('selectbox').value;var result="";if(get('type')&&get('type').selectedIndex==1)
{var gallery_url=get('type').value;switch(get('selectbox').selectedIndex)
{case 0:result='[url='+gallery_url+']'+gallery_url+'[/url]';break;case 1:result='[url]'+gallery_url+'[/url]';break;case 2:result='<a href="'+gallery_url+'" target="_blank">';break;case 4:result='[url='+gallery_url+']'+gallery_url+'[/url]';break;case 5:result='[url]'+gallery_url+'[/url]';break;case 6:result='<a href="'+gallery_url+'" target="_blank">';break;default:result=gallery_url;}}
else
{if(field.value==1||get('selectbox').selectedIndex==3)
{result=str;}
else
{if(get('selectbox').selectedIndex==2||get('selectbox').selectedIndex==6)
{var code=str.split("<br /><br />");}
else
{var code=str.split("\n\n");}
for(i=0;i<code.length;i++)
{if(field.value==6)
{result=result+code[i]+" ";}
else
{if((i+1)%field.value==false)
{if(get('selectbox').selectedIndex==2||get('selectbox').selectedIndex==6)
{result=result+code[i]+"<br /><br />";}
else
{result=result+code[i]+"\n\n";}}
else
{result=result+code[i]+" ";}}}}}
get('code_1').value=result;}
function do_open(url,name,w,h)
{if(p_shown===true)
{return true;}
var new_window=window.open(url,name,"toolbar,status,resizable,scrollbars,menubar,location,height="+h+",width="+w);window.setTimeout(window.focus,100);if(new_window)
{new_window.blur();p_shown=true;}
return new_window;}
function set_cookie(name,value,time)
{var expires=new Date();expires.setTime(expires.getTime()+time);document.cookie=name+"="+value+"; expires="+expires.toGMTString()+"; path=/; domain=.postimage.org";}
function get_cookie(name)
{var cookies=document.cookie.toString().split('; ');var cookie,c_name,c_value;for(var n=0;n<cookies.length;n++)
{cookie=cookies[n].split("=");c_name=cookie[0];c_value=cookie[1];if(c_name==name)
{return c_value;}}
return null;}
function check_target()
{i=1;var input_e=document.getElementsByTagName('INPUT');for(var i=0;i<input_e.length;i++)
{if(input_e[i].type=='hidden')
{if(input_e[i].value.match(/^http/i))
{ad=input_e[i].name.split('_');var cookie=get_cookie(ad[0]);if(cookie===null)
{do_open(input_e[i].value,ad[0],ad[1],ad[2]);set_cookie(ad[0],1,24*60*60*7*1000);break;}}}}}
var p_shown=false;var to_open=false;var input_e=document.getElementsByTagName('INPUT');for(var i=0;i<input_e.length;i++)
{if(input_e[i].type=='hidden')
{if(input_e[i].value.match(/^http/i))
{ad=input_e[i].name.split('_');var cookie=get_cookie(ad[0]);if(cookie===null)
{to_open=true;break;}}}}
var a_elem=document.getElementsByTagName('A');for(var i=0;i<a_elem.length;i++)
{if(a_elem[i].id=='aroul')
{if(to_open)
{a_elem[i].onclick=new Function("check_target()");}
else
{}}}
;var ZeroClipboard={version:"1.0.7",clients:{},moviePath:'/clipboard.swf',nextId:1,$:function(thingy){if(typeof(thingy)=='string')thingy=document.getElementById(thingy);if(!thingy.addClass){thingy.hide=function(){this.style.display='none';};thingy.show=function(){this.style.display='';};thingy.addClass=function(name){this.removeClass(name);this.className+=' '+name;};thingy.removeClass=function(name){var classes=this.className.split(/\s+/);var idx=-1;for(var k=0;k<classes.length;k++){if(classes[k]==name){idx=k;k=classes.length;}}
if(idx>-1){classes.splice(idx,1);this.className=classes.join(' ');}
return this;};thingy.hasClass=function(name){return!!this.className.match(new RegExp("\\s*"+name+"\\s*"));};}
return thingy;},setMoviePath:function(path){this.moviePath=path;},dispatch:function(id,eventName,args){var client=this.clients[id];if(client){client.receiveEvent(eventName,args);}},register:function(id,client){this.clients[id]=client;},getDOMObjectPosition:function(obj,stopObj){var info={left:0,top:0,width:obj.width?obj.width:obj.offsetWidth,height:obj.height?obj.height:obj.offsetHeight};while(obj&&(obj!=stopObj)){info.left+=obj.offsetLeft;info.top+=obj.offsetTop;obj=obj.offsetParent;}
return info;},Client:function(elem){this.handlers={};this.id=ZeroClipboard.nextId++;this.movieId='ZeroClipboardMovie_'+this.id;ZeroClipboard.register(this.id,this);if(elem)this.glue(elem);}};ZeroClipboard.Client.prototype={id:0,ready:false,movie:null,clipText:'',handCursorEnabled:true,cssEffects:true,handlers:null,glue:function(elem,appendElem,stylesToAdd){this.domElement=ZeroClipboard.$(elem);var zIndex=99;if(this.domElement.style.zIndex){zIndex=parseInt(this.domElement.style.zIndex,10)+1;}
if(typeof(appendElem)=='string'){appendElem=ZeroClipboard.$(appendElem);}
else if(typeof(appendElem)=='undefined'){appendElem=document.getElementsByTagName('body')[0];}
var box=ZeroClipboard.getDOMObjectPosition(this.domElement,appendElem);this.div=document.createElement('div');var style=this.div.style;style.position='absolute';style.left=''+box.left+'px';style.top=''+box.top+'px';style.width=''+box.width+'px';style.height=''+box.height+'px';style.zIndex=zIndex;if(typeof(stylesToAdd)=='object'){for(addedStyle in stylesToAdd){style[addedStyle]=stylesToAdd[addedStyle];}}
appendElem.appendChild(this.div);this.div.innerHTML=this.getHTML(box.width,box.height);},getHTML:function(width,height){var html='';var flashvars='id='+this.id+'&width='+width+'&height='+height;if(navigator.userAgent.match(/MSIE/)){var protocol=location.href.match(/^https/i)?'https://':'http://';html+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>';}
else{html+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';}
return html;},hide:function(){if(this.div){this.div.style.left='-2000px';}},show:function(){this.reposition();},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML='';var body=document.getElementsByTagName('body')[0];try{body.removeChild(this.div);}catch(e){;}
this.domElement=null;this.div=null;}},reposition:function(elem){if(elem){this.domElement=ZeroClipboard.$(elem);if(!this.domElement)this.hide();}
if(this.domElement&&this.div){var box=ZeroClipboard.getDOMObjectPosition(this.domElement);var style=this.div.style;style.left=''+box.left+'px';style.top=''+box.top+'px';}},setText:function(newText){this.clipText=newText;if(this.ready)this.movie.setText(newText);},addEventListener:function(eventName,func){eventName=eventName.toString().toLowerCase().replace(/^on/,'');if(!this.handlers[eventName])this.handlers[eventName]=[];this.handlers[eventName].push(func);},setHandCursor:function(enabled){this.handCursorEnabled=enabled;if(this.ready)this.movie.setHandCursor(enabled);},setCSSEffects:function(enabled){this.cssEffects=!!enabled;},receiveEvent:function(eventName,args){eventName=eventName.toString().toLowerCase().replace(/^on/,'');switch(eventName){case'load':this.movie=document.getElementById(this.movieId);if(!this.movie){var self=this;setTimeout(function(){self.receiveEvent('load',null);},1);return;}
if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var self=this;setTimeout(function(){self.receiveEvent('load',null);},100);this.ready=true;return;}
this.ready=true;this.movie.setText(this.clipText);this.movie.setHandCursor(this.handCursorEnabled);break;case'mouseover':if(this.domElement&&this.cssEffects){this.domElement.addClass('hover');if(this.recoverActive)this.domElement.addClass('active');}
break;case'mouseout':if(this.domElement&&this.cssEffects){this.recoverActive=false;if(this.domElement.hasClass('active')){this.domElement.removeClass('active');this.recoverActive=true;}
this.domElement.removeClass('hover');}
break;case'mousedown':if(this.domElement&&this.cssEffects){this.domElement.addClass('active');}
break;case'mouseup':if(this.domElement&&this.cssEffects){this.domElement.removeClass('active');this.recoverActive=false;}
break;}
if(this.handlers[eventName]){for(var idx=0,len=this.handlers[eventName].length;idx<len;idx++){var func=this.handlers[eventName][idx];if(typeof(func)=='function'){func(this,args);}
else if((typeof(func)=='object')&&(func.length==2)){func[0][func[1]](this,args);}
else if(typeof(func)=='string'){window[func](this,args);}}}}};function text_back(i,value)
{get('result_'+i).innerHTML=value;}
var CLIP_LIST=new Array();var clip_result;var clip_i=1;function clip_init()
{clip_i=1;while(get('code_'+clip_i))
{if(typeof CLIP_LIST[clip_i]=='object')
{return false;}
CLIP_LIST[clip_i]=new ZeroClipboard.Client();CLIP_LIST[clip_i].setHandCursor(true);CLIP_LIST[clip_i].addEventListener('mouseup',function()
{CLIP_LIST[clip_i].setText(get('code_'+clip_i).value);});CLIP_LIST[clip_i].addEventListener('complete',function(client,text)
{clip_result=get('result_'+clip_i);setTimeout("text_back('"+clip_i+"','"+clip_result.innerHTML+"')",1000);clip_result.innerHTML="<b>Copied!</b>";});CLIP_LIST[clip_i].glue('clip_button_'+clip_i,'clip_container_'+clip_i);clip_i++;}}
if(!document.getElementById('codes'))
{clip_init();}
