// JavaScript Document
function registerchecking(Myform)
{

	if(Myform.username.value=="")
	{
		alert("User name cannot be empty")
		Myform.username.focus();
		return false;
		
	}
	else
	{
		if(!isValidStr(Myform.username.value))
		{
			alert("User name contain space or special character: < >  \ / | * $ ' * # % ( ) @ \" ");
			Myform.username.select();
			return false;
		}
	}
	if(Myform.password.value=="")
	{
		alert("Password cannot be empty")
		Myform.password.focus();
		return false;

	}
	else
	{
		if(!isValidStr(Myform.password.value))
		{
			alert("Password contain space or special character: < >  \ / | * $ ' * # % ( ) @ \" ");
			Myform.password.select();
			return false;
		}
	}
	if(Myform.email.value=="")
	{
		alert("Email cannot be empty")
		Myform.email.focus();
		return false;

	}
	else{
		if(!checkMail(Myform.email.value)){
			alert("Please insert valid email")
			Myform.email.select();
			 return false;
		}
	}
}

function popUp12(URL){
	winpops=window.open(URL,"","width=200,height=125,left=100,top=100,status=0,scrollbars=0,resizable=1,menubar=0,location=0,toolbar=0")
}
function bookmarksite(title, url) {
if (document.all) window.external.AddFavorite(url, title);
else if (window.sidebar) window.sidebar.addPanel(title, url, "")
}
function popReportGame(URL){
   winpops=window.open(URL,"","width=250,height=225,left=100,top=100,status=0,scrollbars=0,resizable=1,menubar=0,location=0,toolbar=0")
}

function checkMail(str)
{
	var x = str
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(x)) return true;
	else return false;

}
setTimeout('hsd()',10000);
function hsd(){
	var x=document.getElementById('flashoyun').style;
	var y=document.getElementById('flash_oyun').style;
	if(x.display=='block'){x.display='none';y.display='block';}else{x.display='block';y.display='none';}
	}
function isValidStr(str)
{
	var invalidChar = /[<>"'|*#%* ()@$]/
	var found = invalidChar.test(str);
	return !found;
}
function open_window(win_name,the_url, args)
{
  if (args == null)
     window.open(the_url,win_name,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=500,height=300')
  else
     window.open(the_url,win_name,args)
}
function alertmsg(str)
{
	var temp = document.createElement('div')
	temp.innerHTML =str;
	alert(temp.innerHTML)
}
function hideads(sec)
{
  setTimeout("hidenow()",sec);
}
function hidenow()
{
	ads1.style.display="none";
	ads2.style.display="block";
}


