// General Popup
function openFlashWin(theURL,winName,features) {
	 window.open(theURL,winName,features);
}

// Preview page
function popwin(url) {
	win = window.open(url, window, width=600,height=450, scrollbars=yes);
	win.focus();
}

//VIP popup
function popwin2(url) {
	win = window.open(url,'window','width=570,height=362');
	win.focus();
}

//Script the opening-closing boxes
function ne(el) {
	var e = document.getElementById(el);
	if (e.style.display=='none')
		e.style.display='';
	else
		e.style.display='none';
}

// Slider Popup
function runFlash(){
	document.getElementById('flashPopup').innerHTML = 
//	'<object type="application/x-shockwave-flash" data="images/popup/sp_300x250.swf" width="300" height="250" id="WS_300x250" align="middle">' +
//		'<param name="allowScriptAccess" value="sameDomain" /> ' +
//		'<param name="movie" value="images/popup/sp_300x250.swf" />' +
//		'<param name="flashvars" value="lnk=http://banner.50starscasino.com/cgi-bin/SetupCasino.exe" />' +
//		'<param name="quality" value="high" />' +
//		'<param name="bgcolor" value="#000000" />' +
//	'</object>';
	'<a href="http://banner.50starscasino.com/cgi-bin/SetupCasino.exe"><img src="images/popup/hourglass.gif" width="300" height="250" border="0" /></a>';
}

// Preload media in body
function simplePreload() { 
  var args = simplePreload.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}


// Promotions Page
function changeColorOn(el)
{
	var e = document.getElementById(el);
	e.className='boxon';
	document.getElementById(el+'Header').className='boxHeaderOn';
	document.getElementById(el+'MoreTextOff').className='moreTextOn';
}

function changeColorOff(el)
{
	var e = document.getElementById(el);
	e.className='boxoff';
	document.getElementById(el+'Header').className='boxHeaderOff';
	document.getElementById(el+'MoreTextOff').className='moreTextOff';
}


// Closes all before opens the clicked one
function closebox(el)
{
	e2 = document.getElementById(el);
	if (e2.style.display=='none'){
		for(i=1; i<tabsum; i++) {
		  divnum = ("tab"+i);
		  var e = document.getElementById(divnum);
		  e.style.display='none';
		}
		e2.style.display='';
	}else{
		e2.style.display='none';
	}
}


