//  © Copyright 2011 Created By BehrOOz Zahedi
var x = 0;
var y = 0;
var x1 = 0;
var y1 = 0;
var x2 = 0;
var y2 = 0;
var x3 = 1;
var y3 = 0;
function Showpass()
{
	if(x==1)
	{
	document.getElementById('pa').style.display = 'none';
	y = 0;
	}
	if(x==0)
	{
	document.getElementById('pa').style.display = 'block';
	y = 1;
	}
	if(y==1)
	x =1;
    if(y==0)
	x =0;
	
}

function Showserver()
{
	if(x1==1)
	{
	document.getElementById('serverbox').style.display = 'none';
	y1 = 0;
	}
	if(x1==0)
	{
	document.getElementById('serverbox').style.display = 'block';
	y1 = 1;
	}
	if(y1==1)
	x1 =1;
    if(y1==0)
	x1 =0;
	
}

function Showbank()
{
	if(x2==1)
	{
	document.getElementById('bank').style.display = 'none';
	y2 = 0;
	}
	if(x2==0)
	{
	document.getElementById('bank').style.display = 'block';
	y2= 1;
	}
	if(y2==1)
	x2 =1;
    if(y2==0)
	x2 =0;
}

function Showinfo()
{
	if(x3==1)
	{
	document.getElementById('info').style.display = 'none';
	y3 = 0;
	}
	if(x3==0)
	{
	document.getElementById('info').style.display = 'block';
	y3= 1;
	}
	if(y3==1)
	x3 =1;
    if(y3==0)
	x3 =0;
	
}

function kk()
{
	top.location="index.php";
}
function server1()
{
	top.location="http://s1.lahij.ir";
}
function server2()
{
	top.location="http://s2.lahij.ir";
}
function check()
{
	var myform = document.f1;
	
	if ((myform['t1'].value == '' ))
	{
		alert('نام کاربری خود را وارد کنید');
		return false;
	}
	else if (myform['t2'].value == '')
	{
		alert('رمز عبور خود را وارد کنید');
		return false;
	}
	else
		return true;
	
}

function check1()
{
	var myform = document.f2;
	 if ((myform['t3'].value == '' ))
	{
		alert('رمز عبور جدید را وارد کنید');
		return false;
	}else if(myform['t3'].value.length < 6)
	{
		alert('طول رمز عبور باید بیشتر از 6 کاراکتر باشد');
		return false;
	}
	else
		return true;
	
}

function CheckValidUrlChar()
{
	var unicode = window.event.keyCode;
		//if the key isn't the backspace key (which we should allow)
	if( unicode != 8 && unicode != 45 && unicode != 46  )
	{ 
		//if not a number
		if( (unicode < 48 || unicode > 57) && (unicode < 65 || unicode > 90) && (unicode < 97 || unicode > 122) )
		{
		//disable key press
		window.event.returnValue = false;
		}//end if
	else
	{
		// enable keypress
		window.event.returnValue = true;
		}//end else
		}//end if
	else
	{
		// enable keypress
		window.event.returnValue = true;
	}//end else
}//end function
