﻿var TINY={};function T$(i){return document.getElementById(i)}function T$$(e,p){return p.getElementsByTagName(e)}TINY.fader=function(){function fade(n,p){this.n=n;this.init(p)}fade.prototype.init=function(p){var s=T$(p.id),u=this.u=T$$('li',s),l=u.length,i=this.l=this.c=this.z=0;if(p.navid&&p.activeclass){this.g=T$$('li',T$(p.navid));this.s=p.activeclass}s.style.overflow='hidden';this.a=p.auto||0;this.p=p.resume||0;for(i;i<l;i++){if(u[i].parentNode==s){u[i].style.position='absolute';this.l++;u[i].o=p.visible?100:0;u[i].style.opacity=u[i].o/100;u[i].style.filter='alpha(opacity='+u[i].o+')'}}this.pos(p.position||0,this.a?1:0,p.visible)},fade.prototype.auto=function(){this.u.ai=setInterval(new Function(this.n+'.move(1,1)'),this.a*1000)},fade.prototype.move=function(d,a){var n=this.c+d,i=d==1?n==this.l?0:n:n<0?this.l-1:n;this.pos(i,a)},fade.prototype.pos=function(i,a,v){var p=this.u[i];this.z++;p.style.zIndex=this.z;clearInterval(p.si);clearInterval(this.u.ai);this.u.ai=0;this.c=i;if(p.o>=100&&!v){p.o=0;p.style.opacity=0;p.style.filter='alpha(opacity=0)'}if(this.g){for(var x=0;x<this.l;x++){this.g[x].className=x==i?this.s:''}}p.si=setInterval(new Function(this.n+'.fade('+i+','+a+')'),20)},fade.prototype.fade=function(i,a){var p=this.u[i];if(p.o>=100){clearInterval(p.si);if((a||(this.a&&this.p))&&!this.u.ai){this.auto()}}else{p.o+=5;p.style.opacity=p.o/100;p.style.filter='alpha(opacity='+p.o+')'}};return{fade:fade}}();
var TINY={};

function T$(i){return document.getElementById(i)}
function T$$(e,p){return p.getElementsByTagName(e)}

TINY.fader=function(){
	function fade(n,p){this.n=n; this.init(p)}
	fade.prototype.init=function(p){
		var s=T$(p.id), u=this.u=T$$('li',s), l=u.length, i=this.l=this.c=this.z=0;
		if(p.navid&&p.activeclass){this.g=T$$('li',T$(p.navid)); this.s=p.activeclass}
		s.style.overflow='hidden'; this.a=p.auto||0; this.p=p.resume||0;
		for(i;i<l;i++){
			if(u[i].parentNode==s){
				u[i].style.position='absolute'; this.l++; u[i].o=p.visible?100:0;
				u[i].style.opacity=u[i].o/100; u[i].style.filter='alpha(opacity='+u[i].o+')'
			}
		}
		this.pos(p.position||0,this.a?1:0,p.visible)
	},
	fade.prototype.auto=function(){
		this.u.ai=setInterval(new Function(this.n+'.move(1,1)'),this.a*1000)
	},
	fade.prototype.move=function(d,a){
		var n=this.c+d, i=d==1?n==this.l?0:n:n<0?this.l-1:n; this.pos(i,a)
	},
	fade.prototype.pos=function(i,a,v){
		var p=this.u[i]; this.z++; p.style.zIndex=this.z;
		clearInterval(p.si); clearInterval(this.u.ai); this.u.ai=0; this.c=i;
		if(p.o>=100&&!v){p.o=0; p.style.opacity=0; p.style.filter='alpha(opacity=0)'}
		if(this.g){for(var x=0;x<this.l;x++){this.g[x].className=x==i?this.s:''}}
		p.si=setInterval(new Function(this.n+'.fade('+i+','+a+')'),20)
	},
	fade.prototype.fade=function(i,a){
		var p=this.u[i];
		if(p.o>=100){
			clearInterval(p.si); if((a||(this.a&&this.p))&&!this.u.ai){this.auto()}
		}else{
			p.o+=5; p.style.opacity=p.o/100; p.style.filter='alpha(opacity='+p.o+')'
		}
	};
	return{fade:fade}
}();
function showmenu(elmnt)
{
document.getElementById(elmnt).style.visibility="visible";
}
function hidemenu(elmnt)
{
document.getElementById(elmnt).style.visibility="hidden";
}
function gp(a){
var c="/";
var b=0;
if(document.pan.Level[0].checked==true){c+="gu/";b=1;}
if(document.pan.Level[1].checked==true){c+="";b=1;}
if(document.pan.Level[2].checked==true){c+="fan/";b=1;}
if(document.pan.Level[3].checked==true){c+="ka/";b=1;}
if(b==0){window.alert("لطفا مقطع مورد نظر خود را انتخاب نمایید");}else{
if(a=="1"){window.open(".."+c+"signup.html","getpanel");document.getElementById("getpanel").style.display="";
}
if(a=="2"){window.open(".."+c+"newcpanel.php","getpanel");document.getElementById("getpanel").style.display="";
}
if(a=="3"){window.open("../echarge.php","newwindow");}
}

}

function CheckForm(){
var mes="";
var l=document.form.elements.length;
for(i=0;i<l;i++){
if((document.form.elements[i].value==0)&&(document.form.elements[i].disabled==""))mes="اطلاعات فرم كامل وارد نشده است"+"\r\n";
}
if(mes>''){
                alert(mes)
                return false;
        }else{
                return true;
        }

}
function numbersonly(myfield, e, dec)
{
var key;
var keychar;

if (window.event)
   key = window.event.keyCode;
else if (e)
   key = e.which;
else
   return true;
keychar = String.fromCharCode(key);

// control keys
if ((key==null) || (key==0) || (key==8) ||
    (key==9) || (key==13) || (key==27) )
   return true;

// numbers
else if ((("0123456789").indexOf(keychar) > -1))
   return true;

// decimal point jump
else if (dec && (keychar == "."))
   {
   myfield.form.elements[dec].focus();
   return false;
   }
else
   return false;
}
function chm(){
return false;
}
function golink(s){
if(s=="sign"||s=="quizz"||s=="comp"||s=="note")window.location='getmember.php';
if(s=="charge")window.location='../echarge.php';
if(s=="match")window.location='article.php?pid=3355';
if(s=="plan")window.location='article.php?pid=3483';
if(s=="forum")window.location='../web';
}
function lmq(){
window.open("../membersandquizz.php","hidden");
}
function deliver(tex){
document.getElementById("nmq").innerHTML=tex;
}
