function showImage (url, w, h)
{
	if(w==0 || h==0)
	{
		window.open(url, "fullscreen","toolbar=0,scrollbars=0,menubar=0,location=0,resizable=1,directories=0,status=0,fullscreen=yes,width=" + (screen.width) + ",height=" + (screen.height) + ",left=0,top=0");
	}
	else
	{
    		imgwindow = window.open(url,"imgwindow"," scrollbar=no, toolbar=no, fullscreen=no, resizable=yes,width="+w+",height="+h);
    		imgwindow.focus();		
	}
	return false;
}
function GetCookie(sName)
{
	var aCookie = document.cookie.split("; ");
	for (var i=0; i < aCookie.length; i++)
	{
		var aCrumb = aCookie[i].split("=");
		if (sName == aCrumb[0]) 
			return unescape(aCrumb[1]);
	}
	return null;
}
function SetCookie (name, val)
{
	document.cookie = name+" = "+val;
}			
function Start ()
{
	ss=GetCookie ("mediaplay");
	if (ss == "true")
	{
		imgg.src = "Resources/stop.jpg";
		ss = true;
	}
	else
	{
		imgg.src = "Resources/play.jpg";
		ss = false;
	}
				
	if (ss)	StartSS ();			
}
function Stop ()
{
	SetCookie ("mediaplay", "false");	
	window.close();
}
function Click ()
{
	if (ss)
	{
		ss=false;
		imgg.src = "Resources/play.jpg";
		StopSS ();
		SetCookie ("mediaplay", "false");
	}
	else
	{
		ss=true;
		imgg.src = "Resources/stop.jpg";
		StartSS ();
		SetCookie ("mediaplay", "true");
	}
}			

function StartSS ()
{
	id = window.setTimeout("Next ();", 3*1000);
}		
			
function StopSS ()
{
	window.clearTimeout (id);
}
	