var loadFlashTimer = 0;

setTimeout("showSkipAd();",15000);

//Collaspe the loader DIV which overlays the flash movie
function loadFlash(){
	document.getElementById("loader").style.display = "none";
	RunShapeShape();
}

//Show the skipAd DIV
function showSkipAd(){
	document.getElementById("SkipAd").style.visibility = "visible";
	loadFlashTimer = setTimeout( "loadFlash()", 15000 );
}

//Collaspe the SkipAd, Loader DIV
function skipAd(){
	document.getElementById("loader").style.display = "none";
	RunShapeShape();
	clearTimeout (loadFlashTimer);

}


function isVisible()
{
	var visible = new String();
	visible = document.getElementById("loader").style.display;

	var returnVal;
	if (visible.toLowerCase() == "none")
       {
       	return false;
	}
	
	return true;
}

function setIsPaid(userId,userName)
{
    createCookie("isPaid", 1, 365);
	createCookie("userId", userId, 365);
	createCookie("userName", userName, 365);
	//alert( "PAID USER!" );
}

function setIsNotPaid(userId,userName)
{
    createCookie("isPaid", 0, 365);
	createCookie("userId", userId, 365);
	createCookie("userName", userName, 365);
	//alert( "NON-PAID USER!" );

}

function createCookie(name,value,days)
{
       if (days)
	{
              var date = new Date();
              date.setTime(date.getTime()+(days*24*60*60*1000));
	       var expires = "; expires="+date.toGMTString();
       }
       else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}