	function resize() {
    	var widthfrom = screen.width;
    	if((widthfrom > 750) && (widthfrom > 900)) {
    		document.getElementById('map').style.width="300px";

    	}
    	if((widthfrom > 1000) && (widthfrom > 1200)) {
    		document.getElementById('map').style.width="370px";

    	}
    	if(widthfrom > 1210) {
    		document.getElementById('map').style.width="450px";

    	}
    	document.getElementById('map').style.height="400px";
    	load();
    }

	function $$(o){ return document.getElementById(o); }

	function validate(form){
		var error = "";
		
		//check fname
		if(rochak.trim($$('fname').value)=="") {
			error += "Please enter your first name" + "\r\n";
		}
		//check lname
		if(rochak.trim($$('lname').value)=="") {
			error += "Please enter your last name." + "\r\n";
		}
		//check email
		if(rochak.trim($$('email').value)=="") {
			error += "Please enter your email address." + "\r\n";
		}
		else if(rochak.isValidEmail($$('email').value)==false) {
			error += "Please enter a valid email address." + "\r\n";
		}
		
		//check domain
		if(rochak.trim($$('domain').value)=="") {
			error += "Please enter domain name." + "\r\n";
		}
		//check tnc
		if(!$$('acceptTerms').checked) {
			error += "Please accept the Terms and Conditions." + "\r\n";
		}
		
		if(error != ""){
			alert(error);
			document.formSubmit = false;
		}
		else
			document.formSubmit = true;
	}
	
	function valid(value,type,element){
		if(value == "")
			return false;
			
		switch(type){
			case "int":
				if(isNaN(parseInt(value)))
					return false;
				break;
			case "float":
				if(isNaN(parseFloat(value)))
					return false;
				break;
			case "email":
				var p = value.indexOf('@');
				if(p<1 || p==(value.length-1))
					return false;
				break;
			case "checked":
				if(!element.checked)
					return false;
				break;
				
				case "alpha":
				
				for(i=0; i<value.length; i++) {
					//alert(value.charAt(i));
					if(isNaN(value.charAt(i)) && (value.charAt(i)!=".")) {
						//alert("fdfdfd");
						return false;
					}
				}
				
			default://string
				break;
		}
		return true;
	}	

    function check_length(maxchars,message,div_id)
    {
    	var len = message.value.length;

        if(len > maxchars){
        	message.value = message.value.substr(0,maxchars);
        	len = maxchars;
        }

        document.getElementById(div_id).innerHTML = maxchars - len;
    }
