var T_ANIMATE =2000; //animation time in seconds.
var MSG_NO_MAIL = "Uw boodschap kan niet worden verzonden, vul een correct mailadres in.";
var MSG_SEND = "Uw boodschap is verzonden.";
var MSG_FAIL ="Er is een onbekende fout opgetreden, uw boodschap is niet verzonden.";


function get_parameter(name){
	      /* Reads of the actual url (window.lovation) the value of parameter called "name"
		     In case no value is found, get_parameter returns "#no_value"
		  */
		  var url=window.location.toString()
		  
		  parameters =url.split( "?");
		  var val = "#no_value";
		  for( var i = 1; i< parameters.length; i++){
			 par = parameters[i].split("=");
			 if (par[0] == name) {
				 val = par[1];
			 }
		  }
return val; 
		  
		 
}// end function get_parameter






function  wall_paper_resize(ratio){
	/*
			description: changes the sieze of the wallpaper image incase of change of the window.
			parameters:  ratio: the original ratio of the image. width/height
			response:    
			globals: 
			             
	*/
	

	var ratio_window =$(window).width()/$(window).height();
 
	if(ratio_window<ratio){
		var new_width=ratio*$(window).width()/ratio_window;
		var new_height=$(window).height();
	}else{	
		var new_width=$(window).width();
		var new_height=ratio_window*$(window).height()/ratio;	
	}
	$("#wallpaper").css("height",new_height+"px").css("width",new_width+"px");
	$("#wallpaper").css("margin-top", -1*new_height/2+"px").css("margin-left",-1*new_width/2+"px");
	
	
if($(window).width()<940){
	
	//$('div.h1_back').css("position","absolute").css("left","0").css("margin-left","0");
	//$('#header').css("position","absolute").css("left","0").css("margin-left","0");
	
	$('#container').addClass("hor_scroll");
	$('#header').addClass("hor_scroll");
	$('#h1_back').addClass("hor_scroll");
	$('#footer').addClass("hor_scroll_footer");
}else{
	$('#container').removeClass("hor_scroll");
	$('#header').removeClass("hor_scroll");
	$('#h1_back').removeClass("hor_scroll");
	$('#footer').removeClass("hor_scroll_footer");
	
	//$('div.h1_back').css("position","fixed").css("left","50%").css("margin-left","-460px");
	//$('#header').css("position","fixed").css("left","50%").css("margin-left","-460px");
}
	   


}//end function wall_paper_resize(ratio)
