elbuhleini 0 Newbie Poster

I want to create a function, which checks if user has myApp installed and if not, he is being redirected to my landing page. Now, the landing page works as it should, the problem is with function mentioned above. Also, the function has to work for the whole media content on the page, not to call it for each and every file. Here is my code so far and I am asking for a little help :)

<html> 
<head> 
<script type="text/javascript">
		toolbar=0;
		function ToolBarInit(tool) {
			toolbar=1;
		}

		function checkToolbar(){
			if(toolbar!=1) {
				window.location.href=url;
			}
		} 
</script> 

</head> 
<body> 
<script language="javascript">
document.getElementById('mask').style.visibility='visible'
document.getElementById('mask2').style.visibility='visible'

document.getElementById('mask').style.height=document.body.clientHeight

function loadContent(){

if(toolbar==1){ document.getElementById('cont').innerHTML='<div width=500 height=500 style="overflow: hidden;" id=media_container><embed src= "http://www.odeo.com/flash/audio_player_standard_gray.swf" quality="high" width="300" height="52" allowScriptAccess="always" wmode="transparent"  type="application/x-shockwave-flash" flashvars= "valid_sample_rate=true&external_url=<?=$_GET[url];?>" pluginspage="http://www.macromedia.com/go/getflashplayer"> </embed></div>'
document.getElementById('mask').style.visibility='hidden'
document.getElementById('mask2').style.visibility='hidden'

}
}

function confirmDL(){
location.href='http://mydomain/myApp.exe';
}

</script> 
<div id=('cont')
<h1><a href="http://mydomain/flash_game.swf">Play!</a></h1></div>
</body> 
</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.