			function checkGTCchecked(form) {
			  if (!form.gtc.checked) {
					alert("You have to accept the General Terms and Conditions");
					form.gtc.focus();
					return(false);  
			  }
			}

			function checkRegisterForm(form){
				if (form.password.value==""){
					alert("Please fill in all mandatory information (marked with *)");
				  	return false;
				}
				return checkProfileForm(form);
			}
						
			function checkProfileForm(form)
			{
	   			if (form.login.value.length < 4) {
     					alert("Login name requires at least 4 characters");
	 				return false;
   				}
		   		if ((form.company.value=="") || 
				(form.address_1.value=="") || 
				(form.postal_code.value=="") || 
				(form.city.value=="") || 
				(form.country.value.indexOf("Select") == 0) || 
				(form.phone.value=="") || 
				(form.contact_email.value=="") ||
				(form.contact_person.value=="") ){
				  alert("Please fill in all mandatory information (marked with *)");
				  return false;
				  }
			   else
				  {
				  if((form.country.value == "United States" || form.country.value == "Canada") && 
					 form.state.value == "NA"){
						alert("Please select a valid state for United States and Canada");
						return false;
				  }
				  else
                 				  {
					return true;   	
				  }
			   }
			}
			
			function checkClassroomForm(form,pageSize)
                        {
	                  for (i=0; i<pageSize; i++) {
		            if (((form["contact_email" + i].value!="") ||
		               (form["contact_person" + i].value!="") ||
		               (form["company" + i].value!="")) &&
		               ((form["contact_email" + i].value=="") ||
		               (form["contact_person" + i].value=="") ||
		               (form["company" + i].value==""))){
		                       alert("Please fill in all information!");
		                       return false;
		            }	
	                  }
                          return true;
                        }

			
			function openNewWindow(url,target,breite,hoehe) {
				newWindow=window.open(url,target,"width="+breite+",height="+hoehe+",top=50,left=50,scrollbars=no,resize=no,resizable=no, location=no");
				newWindow.resizeTo(breite,hoehe);
				newWindow.focus();
			}
			
			function openNewWindowForm(myform,target,breite,hoehe) {
				myform.target=target;
				newWindow=window.open('',target,"width="+breite+",height="+hoehe+",top=50,left=50,scrollbars=yes,resizable=no");
				newWindow.focus();
				return true;	
			}
			
			function checkPartnerForm()
			{
				   if
				   ((document.forms["profile"].partner_name.value=="") || 
					(document.forms["profile"].long_desc.value=="") || 
					(document.forms["profile"].short_desc.value=="") || 
					(document.forms["profile"].address_1.value=="") || 
					(document.forms["profile"].postal_code.value=="") || 
					(document.forms["profile"].city.value=="") || 
					(document.forms["profile"].country.value.indexOf("Select") == 0) || 
					(document.forms["profile"].phone.value=="") || 
					(document.forms["profile"].contact_email.value=="") ||
					(document.forms["profile"].url.value=="") ){
					  alert("Please fill all the required fields (marked with *)");
					  return false;
					  }
				   else
					  {
					  return true;
					  }
			}

