

// the active erea which the player used
var activeEreaW =1010;
var activeEreaH =620;


function checkSize(){
// self.moveTo(0,0);
// self.resizeTo(screen.width,screen.height); //THIS LINE RESIZES THE WINDOW BASED ON CURRENT SCREEN DIMS
// self.resizeTo(1023,740); //THIS LINE RESIZES THE WINDOW BASED ON CURRENT SCREEN DIMS

	var marge = 50;
	var innerH = actualPageHeight();
		innerW = actualPageWidth();
	offsetL = Math.floor((innerW - activeEreaW)/2);
	offsetT = ((innerH <800) ? 0 : Math.floor((innerH - activeEreaH)/3));
	 

	
//  getRef("boordsize").innerHTML = "innerW = "+innerW + "<br>innerH = " + innerH+ "<br><br>offsetL = " +offsetL+"<br>offsetT = "+offsetT;

// layout();
}
// var layersLayout = new Array("movie_titel","L_dekker","L_inleiding","movie_Bschrijving","player","controller","R_holder","sendforward","formembed","playerboord");

// var layersLayout = new Array("L_inleiding","player","sendforward","formembed","dekkerright","dekkerbottomhhhh","playerboord");

	function layout(){

		for (var i=0; i< layersLayout.length; i++){
			var obj = document.getElementById(layersLayout[i]).style;
			var objleft =  parseInt(obj.left);
			var objtop =  parseInt(obj.top);
				obj.left = objleft+offsetL;
				obj.top = objtop+offsetT;
			
			}
	// getRef("boordsize").innerHTML="objleft= "+  objleft +"<br>objtop= "+ objtop ;

}


	function actualPageHeight() {
		if (window.innerHeight != null)
			return window.innerHeight;
		if (document.body.clientHeight != null)
			return document.body.clientHeight;
		return(null);
}
	function actualPageWidth() {
		if (window.innerWidth != null)
			return window.innerWidth;
		if (document.body.clientWidth != null)
			return document.body.clientWidth;
		return(null);
}


//change the opacity for different browsers
function changeOpac(opacity, id) {
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
}

//   --------   Read prameters from locationbar  ----------
function gup( name ){
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}
//   --------   checkEmail  --------

function checkEmail(email) {

var str = new String(email);
var isOK = true;
rExp = /[!\"£$%\^&*()-+=<>,\'#?\\|Â`\/\[\]]/
if( rExp.test(str) )
isOK = false;
if( str.indexOf('.') == -1 || str.indexOf('@') == -1 )
isOK = false;
if( str.slice(str.lastIndexOf('.')+1,str.length).length < 2 )
isOK = false;
if( str.slice(0,str.indexOf('@')).length < 1 )
isOK = false;
if( str.slice(str.indexOf('@')+1,str.lastIndexOf('.')).length < 1 )
isOK = false;

// if( !isOK ) alert( "Invalid email address" );

return isOK;
}




