var d=document;
var bkr=true;

function $(v){return d.getElementById(v);}
function $s(v){return $(v).style;}

function sw(o){$s(o).display='block';}
function hd(o){$s(o).display='none';}
function tgl(o){$s(o).display=($s(o).display=='block')?'none':'block';}

function vv(o){$s(o).visibility='visible';}
function vh(o){$s(o).visibility='hidden';}
function tglv(o){$s(o).visibility=($s(o).visibility=='visible')?'hidden':'visible';}

function $t(o,t){$(o).innerHTML=t;}
function $v(o){return $(o).value;}
function of(tv,obj){if(obj.value==tv)obj.value='';obj.style.color='black'}
function ob(tv,obj){if(obj.value==''){obj.value=tv;obj.style.color='gray'}}

function r(rw){rw.style.backgroundColor='';}
function h(rw){rw.style.backgroundColor='#FFC';}
function h2(rw){rw.style.backgroundColor='#FF0';}

function cd_ml(e){d.write(("<n uers=\"znvygb:"+e+"\" ery=\"absbyybj\" pynff=yngva>"+e).replace(/[a-zA-Z]/g,function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);}));}
function vE(e){return e.match(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/);}

function w(u,s,w,h){window.open(u,s,'width='+w+',height='+h+',scrollbars=1');return false;}

function max_height(id){var s=$s(id);s.overflow="hidden";if(act_height(id)!=0)return act_height(id);else{OD=s.display;OH=s.height;OP=s.position;OV=s.visibility;OZ=s.zIndex;s.zIndex="-9";s.visibility="hidden";s.height="";s.display="block";s.position="absolute";height=act_height(id);s.display=OD;s.height=OH;s.position=OP;s.visibility=OV;s.zIndex=OZ;return height;}}
function act_height(id){height=$(id).clientHeight;if(height==0)height=$(id).offsetHeight;return height;}
function dsf(obj,txt){obj.value=txt;obj.style.color='gray'}
function setOpacity(obj,opacityLevel){var eStyle=$s(obj);eStyle.opacity=opacityLevel/100;eStyle.filter='alpha(opacity='+opacityLevel+')';}
function fadeIn(eID){sw(eID);for(var i=1,timer=0;i<=100;i++,timer++)setTimeout("setOpacity('"+eID+"',"+i+")",timer);}
function fadeOut(eID){for(var i=100,timer=0;i>=1;i--,timer++)setTimeout("setOpacity('"+eID+"',"+i+")",timer*5);setTimeout("hd('"+eID+"')", 310);}
function bd(id){maxh=max_height(id);sw(id);$s(id).height="0";var spd=Math.ceil(999/maxh);for(i=1;i<=maxh;i++)window.setTimeout("$s('"+id+"').height='"+i+"px'",spd*i);}
function externalLinks(){var hostName=window.location.hostname;var links=document.getElementsByTagName("a");for(var i=0;i<links.length;i++)if(links[i].href.indexOf(hostName)==-1){var curTitle=(links[i].getAttribute("title"))?links[i].getAttribute("title")+" - ":"";links[i].setAttribute("target","_blank");links[i].setAttribute("title",curTitle+"این لینک در پنجره جدید باز خواهد شد");}}

function cjsc(nuo)
{
	var lang='',dvA='',dvF='',dvE='',prvw1='تِلْكَ الدَّارُ الْآخِرَةُ نَجْعَلُهَا لِلَّذِينَ لَا يُرِيدُونَ عُلُوًّا فِي الْأَرْضِ وَلَا فَسَادًا وَالْعَاقِبَةُ لِلْمُتَّقِينَ',prvw2='اين سرای آخرت را (تنها) برای كسانی قرار می دهيم كه اراده برتری جويی در زمين و فساد را ندارند؛ و عاقبت نيك برای پرهيزگاران است!',prvw3='That Home of the Hereafter We shall give to those who intend not high-handedness or mischief on earth: and the end is (best) for the righteous.',p_a='<div id=dorr_a class=c>',p_f='<div id=dorr_f class=c>',p_e='<div id=dorr_e class="ltr c">',eee='</div>';
	if(nuo=='f')
		s='';
	else if(nuo=='j')
	{
		s='<style>\n';
		dvs='';
	}
	$('prvw').style.backgroundColor='#'+$v('bgcolor');
	if($v('mrq')==3)
		$t('prvw','<marquee scrolldelay=1 direction=right scrollamount=1 class=r><div id=dorr_a>'+prvw1+'</div></marquee><marquee scrolldelay=1 direction=right scrollamount=1 class=r><div id=dorr_f class=r>'+prvw2+'</div></marquee><marquee scrolldelay=1 direction=left scrollamount=1><div id=dorr_e dir=ltr>'+prvw3+'</div></marquee>');
	else if($v('mrq')==2)
		$t('prvw','<marquee scrolldelay=1 direction=up scrollamount=1 height="100%">'+p_a+prvw1+eee+p_f+prvw2+eee+p_e+prvw3+eee+'</marquee>');
	else
		$t('prvw',p_a+prvw1+eee+p_f+prvw2+eee+p_e+prvw3+eee);
	if($('lang_a')!=null && $('lang_a').checked)
	{
		bi=$('i_a').checked?'italic ':'';
		bi+=$('b_a').checked?'bold ':'';
		c=short_color($v('color_a'));
		fn=($v('font_name_a').indexOf(' ')>-1)?'"'+$v('font_name_a')+'"':$v('font_name_a');
		s+='#dorr_a{font:'+bi+$v('font_size_a')+' '+fn+';'+c;
		try{
			$('dorr_a').style.font=bi+$v('font_size_a')+' '+fn;
			$('dorr_a').style.color='#'+$v('color_a');
		}catch(e){alert('خطا در مقادیر ورودی برای تنظیمات زبان عربی\nتوضیح تخصصی\n'+e.description)}
		lang+='&a=1';
		if(nuo=='j')
		{
			dvA='<div id=dorr_a></div>';
			if($v('mrq')==3)
			{
				s+=';text-align:right';
				dvA='<marquee onmouseover="this.stop()" onmouseout="this.start()" scrolldelay=1 direction=right scrollamount=1>'+dvA+'</marquee>';
			}
			else
				s+=';text-align:center';
		}
		s+='}';
		sw('dorr_a');
	}
	if($('lang_f')!=null && $('lang_f').checked)
	{
		bi=$('i_f').checked?'italic ':'';
		bi+=$('b_f').checked?'bold ':'';
		c=short_color($v('color_f'));
		fn=($v('font_name_f').indexOf(' ')>-1)?'"'+$v('font_name_f')+'"':$v('font_name_f');
		s+='\n#dorr_f{font:'+bi+$v('font_size_f')+' '+fn+';'+c;
		try{
			$('dorr_f').style.font=bi+$v('font_size_f')+' '+fn;
			$('dorr_f').style.color='#'+$v('color_f');
		}catch(e){alert('خطا در مقادیر ورودی برای تنظیمات زبان فارسی\nتوضیح تخصصی\n'+e.description)}
		lang+='&f=1';
		if(nuo=='j')
		{
			dvF='<div id=dorr_f></div>';
			if($v('mrq')==3)
			{
				s+=';text-align:right';
				dvF='<marquee onmouseover="this.stop()" onmouseout="this.start()" scrolldelay=1 direction=right scrollamount=1>'+dvF+'</marquee>';
			}
			else
				s+=';text-align:center';
		}
		s+='}';
		sw('dorr_f');
	}
	if($('lang_e')!=null && $('lang_e').checked)
	{
		bi=$('i_e').checked?'italic ':'';
		bi+=$('b_e').checked?'bold ':'';
		c=short_color($v('color_e'));
		fn=($v('font_name_e').indexOf(' ')>-1)?'"'+$v('font_name_e')+'"':$v('font_name_e');
		s+='\n#dorr_e{font:'+bi+$v('font_size_e')+' '+fn+';'+c+';direction:ltr';
		try{
			$('dorr_e').style.font=bi+$v('font_size_e')+' '+fn;
			$('dorr_e').style.color='#'+$v('color_e');
		}catch(e){alert('خطا در مقادیر ورودی برای تنظیمات زبان انگلیسی\nتوضیح تخصصی\n'+e.description)}
		lang+='&e=1';
		if(nuo=='j')
		{
			dvE='<div id=dorr_e></div>';
			if($v('mrq')==3)
			{
				s+=';text-align:left';
				dvE='<marquee onmouseover="this.stop()" onmouseout="this.start()" scrolldelay=1 direction=right scrollamount=1>'+dvE+'</marquee>';
			}
			else
				s+=';text-align:center';
		}
		s+='}';
		sw('dorr_e');
	}
	if(nuo=='f')
		s='<iframe marginwidth=1 marginheight=1 align=center border=0 frameborder=0 \nstyle="width:'+$v('wd')+';height:'+$v('ht')+'" \nsrc="http://dorr.ir/show1.php?o=f&d='+$v('d')+'&m='+$v('mrq')+lang+'&b='+short_color($v('bgcolor'),'','')+'&s='+$v('fld_num_in_db')+'&css='+Base64.encode(s)+'"></iframe>';
	else if(nuo=='j')
	{
		s+='\n</style>\n';
		if($v('mrq')==2)
			s+='<marquee onmouseover="this.stop()" onmouseout="this.start()" scrolldelay=1 direction=up scrollamount=1 style="width:'+$v('wd')+';height:'+$v('ht')+';background-color:#'+$v('bgcolor')+'">'+dvA+dvF+dvE+'</marquee>';
		else
			s+='<div style="width:'+$v('wd')+';height:'+$v('ht')+';background-color:#'+$v('bgcolor')+'">'+dvA+dvF+dvE+'</div>';
		s+='\n<script src="http://dorr.ir/show1.php?o=j&d='+$v('d')+lang+'&s='+$v('fld_num_in_db')+'"></script>';
	}
	$('code').value=s;
}
function short_color(c,s1,s2)
{
	s1=typeof(s1)!='undefined'?s1:'color:';
	s2=typeof(s2)!='undefined'?s2:'#';
	c=(''+c).toLowerCase();
	if(c=='d2b48c')
		c='tan';
	else if(c=='ff0000')
		c='red';
	else if(c.charAt(0)==c.charAt(1) && c.charAt(2)==c.charAt(3) && c.charAt(4)==c.charAt(5))
		c=s2+c.charAt(0)+c.charAt(2)+c.charAt(4);
	else
		c=s2+c;
	return s1+c;
}
//from:u.nu/7bqna
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(input){var output="",chr1,chr2,chr3,enc1,enc2,enc3,enc4,i=0;while (i < input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1 >> 2;enc2=((chr1 & 3) << 4) | (chr2 >> 4);enc3=((chr2 & 15) << 2) | (chr3 >> 6);enc4=chr3 & 63;if(isNaN(chr2))enc3=enc4=64;else if(isNaN(chr3))enc4=64;output=output+this._keyStr.charAt(enc1)+this._keyStr.charAt(enc2)+this._keyStr.charAt(enc3)+this._keyStr.charAt(enc4);}return output;}}
//sandmodal
eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([4578j-zB-Z]|1\\w)'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('5 z=m;5 o=m;5 C=m;5 K;5 F=s;5 W="/loading.html";5 L=s;5 X=m;5 Y=1j 1k();5 G=1j 1k("A","BUTTON","TEXTAREA","INPUT","IFRAME");7(!4.Z)4.onkeypress=1l;k 1m(){11=4.q(\'M\')[0];12=4.1n(\'p\');12.t=\'1o\';N=4.1n(\'p\');N.t=\'1p\';N.1q=\'<p t="popupInner"><p t="O"><p t="1r"></p><p t="popupControls"><img P="/i/close.gif" 1s="1t(s);" t="13" /></p></p><1u P="\'+W+\'" l="H:Q%;I:Q%;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="n" t="D" name="D" H="Q%" I="Q%"></1u></p>\';11.1v(12);11.1v(N);z=4.r("1o");o=4.r("1p");C=4.r("D");5 c=u(j.1w.appVersion.charAt(0),10);7(c<=6&&j.1w.userAgent.1x("MSIE")>-1)L=n;5 d=4.q(\'a\');B(i=0;i<d.v;i++)7(d[i].1y.1x("submodal")==0){d[i].1s=k(){5 a=711;5 b=399;R=1z.1y.split(\'-\');7(R.v==3){a=u(R[1]);b=u(R[2])}1A(1z.href,a,b,m);8 s}}}S(j,"load",1m);k 1A(a,b,c,d,e){7(e==m||e==n)4.r("13").l.E="14";T 4.r("13").l.E="15";F=n;1B();z.l.E="14";o.l.E="14";J(b,c);5 f=u(4.r("O").16,10);o.l.H=b+"w";o.l.I=(c+f)+"w";18();C.l.H=u(4.r("O").1C,10)+"w";C.l.I=(c)+"w";C.P=a;K=d;7(L==n)1D();j.19("1a();",600)}5 gi=0;k J(a,b){7(F==n){7(a==m||isNaN(a))a=o.1C;7(b==m)b=o.16;5 c=4.q("M")[0];5 d=u(1E(),10);5 e=u(c.U,10);18();5 f=u(4.r("O").16,10);5 g=1b();5 h=1c();o.l.top=(d+((g-(b+f))/2))+"w";o.l.left=(e+((h-a)/2))+"w"}}S(j,"resize",J);S(j,"scroll",J);j.onscroll=J;k 18(){5 a=4.q("M")[0];5 b=1b();5 c=1c();7(b>a.1F)1d=b;T 1d=a.1F;7(c>a.1G)1e=c;T 1e=a.1G;z.l.I=1d+"w";z.l.H=1e+"w"}k 1t(a){F=s;5 b=4.q("M")[0];b.l.overflow="";1H();7(z==m){8}z.l.E="15";o.l.E="15";7(a==n&&K!=m){X=j.1f["D"].returnVal;j.19(\'K(X);\',1)}C.P=W;7(L==n){1I()}}k 1a(){7(j.1f["D"].4.1J==m)j.19("1a();",10);T 4.r("1r").1q=j.1f["D"].4.1J}k 1l(a){7(F&&a.keyCode==9)8 s}k 1B(){5 a=0;7(4.Z)B(5 b=0;b<G.v;b++){5 c=4.q(G[b]);B(5 d=0;d<c.v;d++){Y[a]=c[d].1g;c[d].1g="-1";a++}}}k 1H(){5 a=0;7(4.Z)B(5 b=0;b<G.v;b++){5 c=4.q(G[b]);B(5 d=0;d<c.v;d++){c[d].1g=Y[a];c[d].tabEnabled=n;a++}}}k 1D(){5 a=4.q("1K");B(i=0;a&&i<a.v;i++)a[i].l.1L="hidden"}k 1I(){5 a=4.q("1K");B(i=0;a&&i<a.v;i++)a[i].l.1L="visible"}k S(a,b,c){7(a.1M){a.1M(b,c,s);8 n}7(a.1N){5 d=a.1N("on"+b,c);8 d}8 s}k removeEvent(a,b,c,d){7(a.1P){a.1P(b,c,d);8 n}7(a.1Q){5 e=a.1Q("on"+b,c);8 e}alert("Handler could not be removed")}k 1b(){7(j.1R!=j.1h)8 j.1R;7(4.1S==\'1T\')8 4.x.1U;7(4.y)8 4.y.1U;8 j.1h}k 1c(){5 a=17,b=m;7(j.1V!=j.1h)8 j.1V;7(4.1S==\'1T\')8 4.x.1W;7(4.y)8 4.y.1W}k 1E(){7(V.1X)8 V.1X;7(4.x&&4.x.1i)8 4.x.1i;7(4.y)8 4.y.1i}k getScrollLeft(){7(V.1Y)8 V.1Y;7(4.x&&4.x.U)8 4.x.U;7(4.y)8 4.y.U}',[],123,'||||document|var||if|return|||||||||||window|function|style|null|true|gPopupContainer|div|getElementsByTagName|getElementById|false|id|parseInt|length|px|documentElement|body|gPopupMask||for|gPopFrame|popupFrame|display|gPopupIsShown|gTabbableTags|width|height|centerPopWin|gReturnFunc|gHideSelects|BODY|popcont|popupTitleBar|src|100|params|addEvent|else|scrollLeft|self|gDefaultPage|gReturnVal|gTabIndexes|all||theBody|popmask|popCloseBox|block|none|offsetHeight||setMaskSize|setTimeout|setPopTitle|getViewportHeight|getViewportWidth|popHeight|popWidth|frames|tabIndex|undefined|scrollTop|new|Array|keyDownHandler|initPopUp|createElement|popupMask|popupContainer|innerHTML|popupTitle|onclick|hidePopWin|iframe|appendChild|navigator|indexOf|className|this|showPopWin|disableTabIndexes|offsetWidth|hideSelectBoxes|getScrollTop|scrollHeight|scrollWidth|restoreTabIndexes|displaySelectBoxes|title|SELECT|visibility|addEventListener|attachEvent||removeEventListener|detachEvent|innerHeight|compatMode|CSS1Compat|clientHeight|innerWidth|clientWidth|pageYOffset|pageXOffset'.split('|'),0,{}))
