// JavaScript Document
var user = "webmaster";
var domain = "speedygamez.com";

function popUp(URL){
winpops=window.open(URL,"","width=200,height=125,left=100,top=100,status=0,scrollbars=0,resizable=1,menubar=0,location=0,toolbar=0")
}


function popUp2(URL){
winpops=window.open(URL,"","width=200,height =450,left=100,top=100,status=0,scrollbars=0,resizable=1,menubar=0,location=0,toolbar=0")
}


function popUpFavorite(URL){
winpops=window.open(URL,"","width=200,height=100,left=100,top=100,status=0,scrollbars=0,resizable=1,menubar=0,location=0,toolbar=0")
}


function popComments(URL){
winpops=window.open(URL,"","width=440,height=400,left=100,top=100,status=0,scrollbars=1,resizable=1,menubar=0,location=0,toolbar=0")
}


function popRecoverPassword(URL){
winpops=window.open(URL,"","width=440,height=200,left=100,top=100,status=0,scrollbars=0,resizable=1,menubar=0,location=0,toolbar=0")
}

function popReportGame(URL){
winpops=window.open(URL,"","width=250,height=225,left=100,top=100,status=0,scrollbars=0,resizable=1,menubar=0,location=0,toolbar=0")
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


// Nannette Thacker http://www.shiningstar.net
function confirmDeleteMessage()
{
var agree=confirm("Are you sure you wish to delete this message?");
if (agree)
	return true ;
else
	return false ;
}
function goToWebSite(id)
{
	if(id == "stumpy")
		window.open("http://www.stumpygames.com");
	else if (id == "mario")
		window.open("http://www.ballerarcade.com");
}
function iconMouseOver(id)
{
	var image = document.getElementById(id);
	if(image.id == "stumpy")
		document.getElementById(id).src = "http://www.speedygamez.com/images/button1Over.gif";
	else
		document.getElementById(id).src = "http://www.speedygamez.com/images/mario2_over.gif";
}

function iconMouseOut(id)
{
	var image = document.getElementById(id);
	if(image.id == "stumpy")
		document.getElementById(id).src = "http://www.speedygamez.com/images/button1.gif";
	else
		document.getElementById(id).src = "http://www.speedygamez.com/images/mario2_normal.gif";
}
function popUp(evt,currElem,descripElem,strDesctip)
{
	try
	{  
		var popUpWin = document.getElementById(currElem).style;
		var dInnerWin = document.getElementById(descripElem);
		if (document.all) 
		{
			popUpWin.top = window.event.y + document.body.scrollTop + 15;
			leftPos = Math.max(2,parseInt(evt.x)-10);
			if (leftPos > 500)
			{
				leftPos = leftPos - 200;
			}
			popUpWin.left = leftPos;
		}
		else
		{
			popUpWin.top = parseInt(evt.pageY)+15+"px";
			leftPos = Math.max(2,parseInt(evt.pageX)-10);
			if (leftPos > 500)
			{
				leftPos = leftPos - 200;
			}
			popUpWin.left = leftPos+"px";
		}
		dInnerWin.innerHTML = "<b>Game Description</b><br /> <br />" + strDesctip;
		popUpWin.visibility = "visible";
		window.status = "";
	}
	catch(e){alert(e.message + " arcade.js.popUp");}
}

function popDown(currElem) 
{
	try
	{
		popUpWin = document.getElementById("AddInfo").style;
		popUpWin.visibility = "hidden"
	}
	catch(e){alert(e.message + " arcade.js.popDown");}
}

function createBookmarkLink()
{
	title = "Speedy Gamez";   
	url = "http://www.speedygamez.com";  
	if (window.sidebar)
	{ 
		// Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");	
	} 
	else if(window.external)
	{ 
		// IE Favorite
		window.external.AddFavorite( url, title); 
	}
	else if(window.opera && window.print) 
	{
		// Opera Hotlist
		return true;
	} 
}

function setHome()
{
   document.body.style.behavior='url(#default#homepage)';
   document.body.setHomePage("http://www.speedygamez.com");
}
function getYear()
{
	var today = new Date();
	var year = today.getFullYear();
	return year;
}

function expandPartners()
{
	var nRows = document.getElementById("partners").rows.length;
	if(document.getElementById("pLink").innerHTML == "More Links")
	{
		for(var i = 0; i < nRows; i++)
		{
			if (i > 30)
			{
				document.getElementById("pLink").innerHTML = "Less Links"
				document.getElementById("partners").rows[i].style.display = "block";
			}
		}
	}
	else if(document.getElementById("pLink").innerHTML == "Less Links")
	{
		for(var i = 0; i < nRows-2; i++)
		{
			if (i > 30)
			{
				document.getElementById("pLink").innerHTML = "More Links"
				document.getElementById("partners").rows[i].style.display = "none";
			}
		}
	}
}
