function include(scripts) {
    document.write('<script type="text/javascript" src="'+scripts+'"></script>');
}
include('js/jquery.js');
include('js/jquery.dimensions.min.js');
include('js/jquery.lightbox-0.5.js');
include('js/layout.js');
include('js/sifr.js');
include('js/conf.js');
include('js/flash.js');







function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("E-Mail address is not valid! // Adres e-mail jest niepoprawny!")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("E-Mail address is not valid! // Adres e-mail jest niepoprawny!")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("E-Mail address is not valid! // Adres e-mail jest niepoprawny!")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("E-Mail address is not valid! // Adres e-mail jest niepoprawny!")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("E-Mail address is not valid! // Adres e-mail jest niepoprawny!")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("E-Mail address is not valid! // Adres e-mail jest niepoprawny!")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("E-Mail address is not valid! // Adres e-mail jest niepoprawny!")
		    return false
		 }

 		 return true					
	}

function tryToSend(){
	var emailID=document.getElementById('mes-email');
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("E-Mail address is not valid! // Adres e-mail jest niepoprawny!")
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		return false
	}
	
	document.getElementById('form').submit();
	return true
 }




