			function checkGTCchecked(form) {
			  if (!form.gtc.checked) {
					alert("You have to accept the General Terms and Conditions");
					form.gtc.focus();
					return(false);  
			  }
			}
			
			function checkProfileForm(form)
			{
			   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;	
			}
