/****************************************************************************/
/* 2007 - TECHFRONT - http://www.techfront.com.br/							*/
/*																			*/
/* Created: 13/11/2007 by Herus Armstrong - herus.armstrong@techfront.com.br*/
/* Description: Home page: list games, featured games and online games		*/
/****************************************************************************/


/************************************/
/* FUNCTIONS						*/
/************************************/

/* Creates a bookmark link setting favorite page */
function createBookmarkLink() {
	title = "eGames - Where the \"e\" is for everybody!"; 
	url =  "http://www.egames.com";
	
	// Mozilla Firefox Bookmark
	if (window.sidebar) {
		window.sidebar.addPanel(title, url,"");
	}
	// IE Favorite
	else if (window.external) {
		window.external.AddFavorite( url, title);
	}
	// Opera Hotlist
	else if (window.opera && window.print) {
		return true;
	}
}

// Show link for a specific browser
function showFavLink() {
	fav = document.getElementById("buttons");
	if (window.external) {
		fav.innerHTML += '<a href="#" onclick="createBookmarkLink(); return false;" class="fav" title="Add to your favorites"><span>Add to favorites</span></a>'; 
	} else if (window.sidebar) {
		fav.innerHTML += '<a href="#" onclick="createBookmarkLink(); return false;" class="fav" title="Add to your favorites"><span>Add to favorites</span></a>'; 
	} else if (window.opera && window.print) {	
		fav.innerHTML += '<a href="#" onclick="createBookmarkLink(); return false;" class="fav" title="Add to your favorites"><span>Add to favorites</span></a>';
	}
}	  

// Open page in pop-up
function popUp(url) {
//var height = window.availHeight;
	document.open(url,"GameWebtrial","location=no,status=no,scrollbars=no,width=640,height=680"); 
	return false;
}
function openPopup(url, janela, larg, alt, scroll, pos1, pos2) {
	window.open(url,janela,'toolbar=no,url=0,location=no,directories=no,status=no,menubar=no,scrollbars='+scroll+',resizable=no,copyhistory=no,top='+pos1+',left='+pos2+',screenY='+pos1+',screenX='+pos2+',width='+larg+',height='+alt);
}
// Describe text in comment field
function textin(val) {
	if (val.value == "Insert your comment here" || val.value == "") {
		val.value = "Insert your comment here";
	}
}
function textout(val) {
	if (val.value == "Insert your comment here") {
		val.value = "";
	}
}

