//===============================================================================//
// Initializes the needed functions for body -> onload

function init(){
Shadowbox.init();
// startnews(); //news not used right now
blinkAgain("highres");
setListner('mouseover',setMYColor);
setListner('mouseout',reSetMYColor);
}


//===============================================================================//
// Jump To Games select function

function jumptogame(myobj){ 
 if (myobj.options[myobj.selectedIndex].value != 0)
	// old normal version:	
	// eval("parent.location='index.php?p="+myobj.options[myobj.selectedIndex].value+"'");

	// new version - rewrite rules on:
	eval("parent.location='"+myobj.options[myobj.selectedIndex].value+"'");
}

//===============================================================================//
// Blinks a certain id a few times (5 times)
var xnr=0;
function blinkAgain(k) {
	if (document.getElementById(k)) {
			s=document.getElementById(k);
			s.style.visibility=(s.style.visibility=='visible')?'hidden':'visible';
			xnr=xnr+0.5;
			j=k;
			t=setTimeout("blinkAgain(j)",250);
			if (xnr>5) clearTimeout(t); 
		}
}

//===============================================================================//
// Changes included game into image on click "Play on higher resolution"\

function replaceGame()
{
document.getElementById('gamezone').innerHTML='<div class="pos3"><a href="javascript:document.location.reload();"><img src="images/warning_swfbig.jpg" alt="Click so that the game reappears here!" width="550" height="80" hspace="0" vspace="0" border="0" /></a></div>';
}

//===============================================================================//
// Sets the options and then starts the news ticker

function startnews(){ 
var options = {
		newsList: "#news",
 		startDelay: 10
		}
$(document).newsTicker(options);
}


//===============================================================================//
// Writes the link for Favorite Games

function favgamelink(strlink){ 
	document.write('<a href="javascript:checkCookie(\''+strlink+'\');replaceContent();" title="Adauga la Jocuri Favorite! &laquo; sectiunea din stanga">');
}

//===============================================================================//
// Closes the <a> link => </a>

function closelinka(){ 
	document.write('</a>');
}

//===============================================================================//
// Writes the link for Send by YM

function YMlink(url){ 
	document.write('<a href="ymsgr:im?+&amp;msg=A+cool+game:+'+url+'" title="Sned with Yahoo! Messenger">');
}


//===============================================================================//
// Hides the instructions div (gameinstr)

function replaceInstr()
{
document.getElementById('gameinstr').innerHTML='';
}
