//	Check form element functions

function setCounter( counter ) {
	document.getElementById('counter').value = counter;
}

function showMovie ( ) {
	//	Add the HTML code to show demo movie file in the 'movie' ID <div>		
	setCounter(0);	
	var t=setTimeout("checkHeight('grow')",50);	

}

function closeMovie() {
	setCounter(400);
	var oeTags = '';
	document.getElementById('movie').innerHTML = oeTags;	
	var t=setTimeout("checkHeight('shrink')",50);		
}

function checkHeight( action ) {
	var table_row = document.getElementById('movie-row');
	var table_table = document.getElementById('movie-table');
	
	if(action == 'grow'){
		var args = 400;	
		var counter = parseInt(document.getElementById('counter').value);
	
		if(counter < args){				
			counter=counter+20;
			document.getElementById('counter').value=counter;
			table_row.height = counter;
			table_table.height = counter;
			t=setTimeout("checkHeight('grow')",40);
		}else{
			insertMovie();
			/*var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
			+ 'width="560" height="400"'
			+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
			+ '<param name="movie" value="movies/saa-demo-2.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />'
			+ '<embed src="movies/saa-demo-2.swf" quality="high" bgcolor="#ffffff" '
			+ 'width="560" height="400" name="saa-demo-2" align="middle"'
			+ 'play="true"'
			+ 'loop="false"'
			+ 'quality="high"'
			+ 'allowScriptAccess="sameDomain"'
			+ 'type="application/x-shockwave-flash"'
			+ 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
			+ '<\/embed>'
			+ '<\/object>';		
					
			document.getElementById('movie').innerHTML = oeTags;*/
		}
	}
	
	if(action == 'shrink'){
		var args = 0;	
		var counter = parseInt(document.getElementById('counter').value);
	
		if(counter > args){				
			counter=counter-20;
			document.getElementById('counter').value=counter;
			table_row.height = counter;
			table_table.height = counter;
			t=setTimeout("checkHeight('shrink')",40);
		}
	}
}



function sayHello(name) {
	alert(">> Hello " + name + ".");
	return ">> Hi Flash.";
}








