Dear fellow programmers. I have a small question. I have a program that runs youtube movies, worked perfect and the video's are played. But it does not show the video in the length and heigth from the frame. That is the issue window.document.detect.screenW is empty....

Does anybody have a solution?

Code:
<html>
<?php
if(isset($_POST['check'])){
	$check = $_POST['check'];
} elseif(isset($_GET['check'])){
	$check = $_GET['check'];
} else { $check = "";}
if(isset($_POST['screenW'])){
	$screenW = $_POST['screenW'];
} elseif(isset($_GET['screenW'])){
	$screenW = $_GET['screenW'];
} else { $screenW = "";}
if(isset($_POST['screenH'])){
	$screenH = $_POST['screenH'];
} elseif(isset($_GET['screenH'])){
	$screenH = $_GET['screenH'];
} else { $screenH = "";}
if(isset($_POST['teller'])){
	$teller = $_POST['teller'];
} elseif(isset($_GET['teller'])){
	$teller = $_GET['teller'];
} else { $teller = "";}
if(isset($_POST['seconde'])){
	$seconde = $_POST['seconde'];
} elseif(isset($_GET['seconde'])){
	$seconde = $_GET['seconde'];
} else { $seconde = "";}
if(isset($_POST['eindtijd'])){
	$eindtijd = $_POST['eindtijd'];
} elseif(isset($_GET['eindtijd'])){
	$eindtijd = $_GET['eindtijd'];
} else { $eindtijd = "";}
include '../databaseconnectie/DBconnection2.php'; // connectie toevoegen via include

?>

<head>
<title> Youtube Uitvoerscherm </title>
<style type="text/css">
html {	
	overflow-x: hidden;
	overflow-y: auto;
	background-color : orange;
}
iframe{
	margin-left: -8px;
	margin-right: -8px;
	margin-top: -8px;
	align : center;
}
</style>
</head>

<body>
	<input type='hidden' name='screenW' value='screenW'/>
	<input type='hidden' name='screenH' value='screenH'/>
	
	<SCRIPT language="javascript">
	var screenW = 640, screenH = 480;
	 var Check = "check";
	if (parseInt(navigator.appVersion)>3) {
	 screenW = screen.width;
	 screenH = screen.height;
	}
	else if (navigator.appName == "Netscape" 
		&& parseInt(navigator.appVersion)==3
		&& navigator.javaEnabled()
	   ) 
	{
	 var jToolkit = java.awt.Toolkit.getDefaultToolkit();
	 var jScreenSize = jToolkit.getScreenSize();
	 screenW = jScreenSize.width;
	 screenH = jScreenSize.height;
	}
	window.document.detect.screenW.value=screenW;
	window.document.detect.screenH.value=screenH;
	window.document.detect.check.value=Check;
	window.document.forms['detect'].submit();
	</SCRIPT>
<?php
if($teller ==""){
	$tijd = time();
	$result = mysql_query("SELECT * FROM opdrachten WHERE starttijd < '$tijd' AND eindtijd > '$tijd' AND type = 'youtube'") or exit(mysql_error()); 
	while ($row = mysql_fetch_array($result)){
		$youtube = $row['bestand'];	
		echo "$youtube";
	}

	$hoog=$screenH -20;
?>
	<?php
	$teller=0;
}

else{
	print "<meta http-equiv=\"refresh\" content=\"0;URL=../index.php\" />"; 
}
?>

</body>
</html>