
<!--
function CheckLen_links(Target) 
{
	StrLen = Target.value.length
	if (StrLen == 1 && Target.value.substring(0,1) == " ") {
	Target.value = ""
	StrLen = 0}
	if (StrLen > 200 ) {
	Target.value = Target.value.substring(0,200)
	CharsLeft = 0
	alert("Fire !!! 200 characters !!!")
	}
	else {
	CharsLeft = StrLen
	}
}

function CheckLen(Target) 
{
	StrLen = Target.value.length
	if (StrLen == 1 && Target.value.substring(0,1) == " ") {
	Target.value = ""
	StrLen = 0}
	if (StrLen > 1000 ) {
	Target.value = Target.value.substring(0,1000)
	CharsLeft = 0
	alert("Fire !!! 1000 characters !!!")
	}
	else {
	CharsLeft = StrLen
	}
	document.admit.charactersleft.value = 1000 - CharsLeft
}

function addurl_onsubmit() 
{
   if (document.addurl.thedesc.value.length<5 || document.addurl.thedesc.value.length>300)
      {
        alert ("the description must be between 5-300 characters !");
        return false;
      }
}

function login_onsubmit() 
{
   if (document.login.username.value == "")
      {
        alert ("Entered a username?");
        return false;  
      }
   if (document.login.password.value == "")   
      {
        alert ("Entered a password?");
        return false;
      }
   if (document.login.password.value.length<3 || document.login.password.value.length>24)   
      {
        alert ("password must be between 3-24 characters !");
        return false;
      }
}

function send_onsubmit() 
{
   if (document.send_to_friend.send_to_email.value == "")   
      {
        alert ("Entered an email address to send the e-admission to?");
        return false;
      }
   if (document.send_to_friend.send_to_email.value.length<3 || document.send_to_friend.send_to_email.value.length>240)   
      {
        alert ("Is the email address really that short?");
        return false;
      }
}

function login2_onsubmit() 
{
   if (document.login2.username2.value == "")
      {
        alert ("Entered a username?");
        return false;  
      }
   if (document.login2.password2.value == "")   
      {
        alert ("Entered a password?");
        return false;
      }
   if (document.login2.password2.value.length<3 || document.login2.password2.value.length>24)   
      {
        alert ("password must be between 3-24 characters !");
        return false;
      }
}

function signup_onsubmit() 
{
	 if (document.signup.newusername.value == "")
      {
        alert ("Please Specify a Username!");
        return false;  
      }
	if (document.signup.newusername.value.length<2 || document.signup.newusername.value.length>16)
      {
        alert ("Username mustbe 2-16 characters long!");
        return false;  
      }
	if (document.signup.newusername.value.indexOf(" ") > -1)
		{	
			alert("U are not supposed to use blank in your username!");
			return false;
		}
	var deg="1234567890qwertyuýopðüiþlkjhgfdsazxcvbnmöçQWERTYUIOPÐÜÝÞLKJHGFDSAZXCVBNMÖÇ._-!";
			var kod=document.signup.newusername.value;
			for (var i=0;i<kod.length;i++){
			if (deg.indexOf (kod.substr(i,1),0) == -1){
		        alert ("You cannot use special characters in your username!");
	        	return false;
				}
			}			
			
			
			
	if (document.signup.newpassword.value == "")
		{
			alert ("Please specify a password!");
			return false;  
		}
	if (document.signup.newpassword.value.length<4 || document.signup.newpassword.value.length>16)
		{
			alert ("Password must be 4-16 characters long!");
			return false;  
		}
	if (document.signup.newpassword.value.indexOf(" ") > -1)
		{	
			alert("U cannot use blank(s) in your password!");
			return false;
		}
	var deg='1234567890qwertyuýopðüiþlkjhgfdsazxcvbnmöçQWERTYUIOPÐÜÝÞLKJHGFDSAZXCVBNMÖÇ._-!?';
			var kod=document.signup.newpassword.value;
			for (var i=0;i<kod.length;i++){
			if (deg.indexOf (kod.substr(i,1),0) == -1){
		        alert ("You cannot use special characters in your username!");
	        	return false;
				}
			}
	if (document.signup.newpassword2.value == "")   
	    {
	        alert ("Please Repeat your Password!");
	        return false;
	    }
	if (document.signup.newpassword2.value.search(" ") != -1)
		{	
			alert("You cannot use blank(s) in your password!");
			return false;
		}
	if (document.signup.newpassword.value != document.signup.newpassword2.value)   
	    {
	        alert ("Passwords don't match?!");
	        return false;
	    }
	if (document.signup.sex.selectedIndex==0)
		{
		alert ("Please Enter your sex!")
		return false
		}
	if (document.signup.age_year.value.length < 1)   
	    {
	        alert ("Please enter your year of birth!");
	        return false;
	    }

	if (document.signup.age_year.value < 32)   
	    {
	        alert ("Are you really that Old!?");
	        return false;
	    }

	if (document.signup.age_year.value > 90)   
	    {
	        alert ("Are you really that Young!?");
	        return false;
	    }

var deg="1234567890";
	var kod=document.signup.age_year.value;
	for (var i=0;i<kod.length;i++){
	if (deg.indexOf (kod.substr(i,1),0) == -1){
        alert ("Please enter a numerical Value for your birth year!");
       	return false;
	    }
            }			
			
	if (document.signup.location.selectedIndex==0)
	    {
	        alert ("Please Enter Your Location!");
	        return false;
	    }

	var deg="1234567890qwertyuýopðüiþlkjhgfdsazxcvbnmöçQWERTYUIOPÐÜÝÞLKJHGFDSAZXCVBNMÖÇ._-!";
			var kod=document.signup.thecity.value;
			for (var i=0;i<kod.length;i++){
			if (deg.indexOf (kod.substr(i,1),0) == -1){
		        alert ("You cannot use special characters in City!");
	        	return false;
				}
			}			

}

function sendmessage_onsubmit() 
{
	if (document.sendmessage.thesubject.value==0)
	    {
	        alert ("Please Enter A Subject!");
	        return false;
	    }

	if (document.sendmessage.thesubject.value.length > 80)
	    {
	        alert ("Sorry! only 80 characters allowed in the subject!");
	        return false;
	    }

	if (document.sendmessage.themessage.value.length > 20002)
	    {
	        alert ("Sorry! only 20002 characters allowed in the message!");
	        return false;
	    }
}

function updatepassword_onsubmit() 
{
	if (document.updatepassword.newpassword.value == "")
		{
			alert ("Please specify a password!");
			return false;  
		}
	if (document.updatepassword.newpassword.value.length<6 || document.updatepassword.newpassword.value.length>16)
		{
			alert ("Password must be 6-16 characters long!");
			return false;  
		}
	if (document.updatepassword.newpassword.value.indexOf(" ") > -1)
		{	
			alert("U cannot use blank(s) in your password!");
			return false;
		}
	var deg='1234567890qwertyuýopðüiþlkjhgfdsazxcvbnmöçQWERTYUIOPÐÜÝÞLKJHGFDSAZXCVBNMÖÇ._-!?';
			var kod=document.updatepassword.newpassword.value;
			for (var i=0;i<kod.length;i++){
			if (deg.indexOf (kod.substr(i,1),0) == -1){
		        alert ("You cannot use special characters in your username!");
	        	return false;
				}
			}
	if (document.updatepassword.newpassword2.value == "")   
	    {
	        alert ("Please Repeat your Password!");
	        return false;
	    }
	if (document.updatepassword.newpassword.value != document.updatepassword.newpassword2.value)   
	    {
	        alert ("Passwords don't match?!");
	        return false;
	    }
}
function userupdate_onsubmit()
{
	if (document.userupdate.age_year.value.length < 1)   
	    {
	        alert ("Please enter your year of birth!");
	        return false;
	    }

	if (document.userupdate.age_year.value < 32)   
	    {
	        alert ("Are you really that Old!");
	        return false;
	    }

	if (document.userupdate.age_year.value > 90)   
	    {
	        alert ("Are you really that Young!");
	        return false;
	    }

	var deg="1234567890";
		var kod=document.userupdate.age_year.value;
		for (var i=0;i<kod.length;i++){
		if (deg.indexOf (kod.substr(i,1),0) == -1){
	        alert ("Please enter a numerical Value for your birth year!");
	       	return false;
			}
		}	

	var deg="1234567890qwertyuýopðüiþlkjhgfdsazxcvbnmöçQWERTYUIOPÐÜÝÞLKJHGFDSAZXCVBNMÖÇ._-!? ";
		var kod=document.userupdate.thecity.value;
		for (var i=0;i<kod.length;i++){
		if (deg.indexOf (kod.substr(i,1),0) == -1){
	        alert ("You cannot use special characters in the city name!");
	       	return false;
			}
		}			

}

function admit_onsubmit() 
{
   if (document.admit.sendadmit.value == "")
      {
        alert ("What is the e-admission?");
        return false;  
      }
   if (document.admit.sendadmit.value.length<15)   
      {
        alert ("Really?! Isn't that e-admission too short!");
        return false;
      }
   if (document.admit.sendadmit.value.length > 1000)   
      {
        alert ("Sorry.. Maximum 1000 Characters allowed.");
        return false;
      }
   if (!document.admit.termsofservice.checked)
      {
        alert ("Haven't you read the rules page yet?!");
        return false;
      }
}

function CheckLen_comment(Target) 
{
	StrLen = Target.value.length
	if (StrLen == 1 && Target.value.substring(0,1) == " ") {
	Target.value = ""
	StrLen = 0}
	if (StrLen > 1000 ) {
	Target.value = Target.value.substring(0,1000)
	CharsLeft = 0
	alert("Fire !!! 1000 characters !!!")
	}
	else {
	CharsLeft = StrLen
	}
	document.addcomment.charactersleft.value = 1000 - CharsLeft
}

function addcomment_onsubmit() 
{
   if (document.addcomment.comment.value == "")
      {
        alert ("What is the comment?");
        return false;  
      }
   if (document.addcomment.comment.value.length<15)
      {
        alert ("Really?! Isn't that comment too short!");
        return false;
      }
   if (document.addcomment.comment.value.length > 1000)   
      {
        alert ("Sorry.. Maximum 1000 Characters allowed.");
        return false;
      }
   if (!document.addcomment.termsofservice.checked)
      {
        alert ("Haven't you read the rules page yet?!");
        return false;
      }
}

function searchuser_onsubmit() 
{
   if (document.searchuser.auser.value == "")
      {
        alert ("Search for What?");
        return false;  
      }
	var deg="1234567890qwertyuýopðüiþlkjhgfdsazxcvbnmöçQWERTYUIOPÐÜÝÞLKJHGFDSAZXCVBNMÖÇ._-!? ";
		var kod=document.searchuser.auser.value;
		for (var i=0;i<kod.length;i++){
		if (deg.indexOf (kod.substr(i,1),0) == -1){
	        alert ("You cannot search for special characters!");
	       	return false;
		}
	}
}
function searchword_onsubmit() 
{
   if (document.searchword.sword.value == "")
      {
        alert ("Search for What?");
        return false;  
      }
   if (document.searchword.sword.value.length<2 || document.searchword.sword.value.length>30)
      {
        alert ("You can search for words with 2-30 characters!");
        return false;  
      }
	var deg="1234567890qwertyuýopðüiþlkjhgfdsazxcvbnmöçQWERTYUIOPÐÜÝÞLKJHGFDSAZXCVBNMÖÇ._-!? ";
		var kod=document.searchword.sword.value;
		for (var i=0;i<kod.length;i++){
		if (deg.indexOf (kod.substr(i,1),0) == -1){
	        alert ("You cannot search for special characters!");
	       	return false;
		}
	}			
}
function newpasswindow()
{
dizwin=window.open("updatepassword.asp","","menubar=no,scrollbars=no,resizable=no,width=200,height=200");
if(navigator.appName == "Microsoft Internet Explorer" &&
  parseInt(navigator.appVersion) >= 4) {
      dizwin.focus();
      } else {
      if(navigator.appName != "Microsoft Internet Explorer")
      dizwin.focus(); }
}

function popup_send(url,width,height)
{
	window.open(url,"send","status=no, menubar=no, toolbar=no, resizable=no, scrollbars=no, width="+width+", height="+height+", channelmode=no, left=280, top=173");
}

function popup_the_poll(url)
{
	width	= 300
	height	= 400
	window.open(url,"the_poll","menubar=no, toolbar=no, resizable=no, scrollbars=no, width="+width+", height="+height+", channelmode=no, left=480, top=173");
}

function suggest_eadmit_OnSubmit()
{
	the_name = document.suggest_eadmit.the_name.value;
	the_mail = document.suggest_eadmit.the_mail.value;
	if (the_mail != "")
		popup_send("suggest_eadmit.asp?the_name="+the_name+"&the_mail="+the_mail,250,240);
	else
		alert("Please enter a mail address");
		return false;
}

function the_poll_form_OnSubmit(id)
{
	var choice;
	for (i = 0; i <= document.the_poll_form.elements.length-1; i++)
	{
		if (document.the_poll_form.vote[i].checked)
		{
			choice = document.the_poll_form.vote[i].value;
			break;
		}
	}
	if (choice > 0)
		popup_the_poll("the_poll.asp?vote="+choice+"&show_poll_id="+id);
	else
		alert("Please give us an opinion");
		return false;
}

function user_poll_form_1_OnSubmit(id)
{
	var choice;
	for (i = 0; i <= document.user_poll_form_1.elements.length-1; i++)
	{
		if (document.user_poll_form_1.vote[i].checked)
		{
			choice = document.user_poll_form_1.vote[i].value;
			break;
		}
	}
	if (choice > 0)
		popup_the_poll("the_poll.asp?vote="+choice+"&user_poll_id="+id);
	else
		alert("Please give us an opinion");
		return false;
}

function user_poll_form_2_OnSubmit(id)
{
	var choice;
	for (i = 0; i <= document.user_poll_form_2.elements.length-1; i++)
	{
		if (document.user_poll_form_2.vote[i].checked)
		{
			choice = document.user_poll_form_2.vote[i].value;
			break;
		}
	}
	if (choice > 0)
		popup_the_poll("the_poll.asp?vote="+choice+"&user_poll_id="+id);
	else
		alert("Please give us an opinion");
		return false;
}

function user_poll_form_3_OnSubmit(id)
{
	var choice;
	for (i = 0; i <= document.user_poll_form_3.elements.length-1; i++)
	{
		if (document.user_poll_form_3.vote[i].checked)
		{
			choice = document.user_poll_form_3.vote[i].value;
			break;
		}
	}
	if (choice > 0)
		popup_the_poll("the_poll.asp?vote="+choice+"&user_poll_id="+id);
	else
		alert("Please give us an opinion");
		return false;
}

function user_poll_form_4_OnSubmit(id)
{
	var choice;
	for (i = 0; i <= document.user_poll_form_4.elements.length-1; i++)
	{
		if (document.user_poll_form_4.vote[i].checked)
		{
			choice = document.user_poll_form_4.vote[i].value;
			break;
		}
	}
	if (choice > 0)
		popup_the_poll("the_poll.asp?vote="+choice+"&user_poll_id="+id);
	else
		alert("Please give us an opinion");
		return false;
}

function user_poll_form_5_OnSubmit(id)
{
	var choice;
	for (i = 0; i <= document.user_poll_form_5.elements.length-1; i++)
	{
		if (document.user_poll_form_5.vote[i].checked)
		{
			choice = document.user_poll_form_5.vote[i].value;
			break;
		}
	}
	if (choice > 0)
		popup_the_poll("the_poll.asp?vote="+choice+"&user_poll_id="+id);
	else
		alert("Please give us an opinion");
		return false;
}

function user_poll_form_6_OnSubmit(id)
{
	var choice;
	for (i = 0; i <= document.user_poll_form_6.elements.length-1; i++)
	{
		if (document.user_poll_form_6.vote[i].checked)
		{
			choice = document.user_poll_form_6.vote[i].value;
			break;
		}
	}
	if (choice > 0)
		popup_the_poll("the_poll.asp?vote="+choice+"&user_poll_id="+id);
	else
		alert("Please give us an opinion");
		return false;
}

function user_poll_form_7_OnSubmit(id)
{
	var choice;
	for (i = 0; i <= document.user_poll_form_7.elements.length-1; i++)
	{
		if (document.user_poll_form_7.vote[i].checked)
		{
			choice = document.user_poll_form_7.vote[i].value;
			break;
		}
	}
	if (choice > 0)
		popup_the_poll("the_poll.asp?vote="+choice+"&user_poll_id="+id);
	else
		alert("Please give us an opinion");
		return false;
}

function user_poll_form_8_OnSubmit(id)
{
	var choice;
	for (i = 0; i <= document.user_poll_form_8.elements.length-1; i++)
	{
		if (document.user_poll_form_8.vote[i].checked)
		{
			choice = document.user_poll_form_8.vote[i].value;
			break;
		}
	}
	if (choice > 0)
		popup_the_poll("the_poll.asp?vote="+choice+"&user_poll_id="+id);
	else
		alert("Please give us an opinion");
		return false;
}

function user_poll_form_9_OnSubmit(id)
{
	var choice;
	for (i = 0; i <= document.user_poll_form_9.elements.length-1; i++)
	{
		if (document.user_poll_form_9.vote[i].checked)
		{
			choice = document.user_poll_form_9.vote[i].value;
			break;
		}
	}
	if (choice > 0)
		popup_the_poll("the_poll.asp?vote="+choice+"&user_poll_id="+id);
	else
		alert("Please give us an opinion");
		return false;
}

function user_poll_form_10_OnSubmit(id)
{
	var choice;
	for (i = 0; i <= document.user_poll_form_10.elements.length-1; i++)
	{
		if (document.user_poll_form_10.vote[i].checked)
		{
			choice = document.user_poll_form_10.vote[i].value;
			break;
		}
	}
	if (choice > 0)
		popup_the_poll("the_poll.asp?vote="+choice+"&user_poll_id="+id);
	else
		alert("Please give us an opinion");
		return false;
}

function user_poll_form_11_OnSubmit(id)
{
	var choice;
	for (i = 0; i <= document.user_poll_form_11.elements.length-1; i++)
	{
		if (document.user_poll_form_11.vote[i].checked)
		{
			choice = document.user_poll_form_11.vote[i].value;
			break;
		}
	}
	if (choice > 0)
		popup_the_poll("the_poll.asp?vote="+choice+"&user_poll_id="+id);
	else
		alert("Please give us an opinion");
		return false;
}

function user_poll_form_12_OnSubmit(id)
{
	var choice;
	for (i = 0; i <= document.user_poll_form_12.elements.length-1; i++)
	{
		if (document.user_poll_form_12.vote[i].checked)
		{
			choice = document.user_poll_form_12.vote[i].value;
			break;
		}
	}
	if (choice > 0)
		popup_the_poll("the_poll.asp?vote="+choice+"&user_poll_id="+id);
	else
		alert("Please give us an opinion");
		return false;
}
//-->



