// Live Person
var lpMTagConfig = {'lpServer' : "server.iad.liveperson.net",'lpNumber' : "45535058",'lpProtocol' : "https"}; function lpAddMonitorTag(src){if(typeof(src)=='undefined'||typeof(src)=='object'){src=lpMTagConfig.lpMTagSrc?lpMTagConfig.lpMTagSrc:'/hcp/html/mTag.js';}if(src.indexOf('http')!=0){src=lpMTagConfig.lpProtocol+"://"+lpMTagConfig.lpServer+src+'?site='+lpMTagConfig.lpNumber;}else{if(src.indexOf('site=')<0){if(src.indexOf('?')<0)src=src+'?';else src=src+'&';src=src+'site='+lpMTagConfig.lpNumber;}};var s=document.createElement('script');s.setAttribute('type','text/javascript');s.setAttribute('charset','iso-8859-1');s.setAttribute('src',src);document.getElementsByTagName('head').item(0).appendChild(s);} if (window.attachEvent) window.attachEvent('onload',lpAddMonitorTag); else window.addEventListener("load",lpAddMonitorTag,false);

// General Popup
function openFlashWin(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// Preview page
function popwin(url) {
	win = window.open(url, window, width=600,height=450, scrollbars=yes);
	win.focus();
}

function popwin2(url)
{
	win = window.open(url,'window','width=400,height=420');
	win.focus();
}

function flg_mn(){
	
	$('#language').hover(
			function() {
							onImg = true;
							$('#dropmenudiv').fadeIn('fast');
						}, 
			function(){
							onImg = false;
							setTimeout(function(){if (!onMenu) $('#dropmenudiv').fadeOut('fast');},50);
					  }
					);

	$('#dropmenudiv').hover(
		function(){
					onMenu = true;
				}, 
		function(){ 
					onMenu = false; 
					setTimeout(function(){if (!onImg) $('#dropmenudiv').fadeOut('fast');},50);
			});
}

/*	
// Slider Popup
function runFlash(){
	document.getElementById('flashPopup').innerHTML = 
	'<a href="http://banner.casinoking.com/cgi-bin/SetupCasino.exe"><img src="images/popup/hourglass.gif" border="0" alt="popup" width="300" height="250"></a>'
//	'<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.casinoking.com/cgi-bin/SetupCasino.exe" />' +
//		'<param name="quality" value="high" />' +
//		'<param name="bgcolor" value="#000000" />' +
//	'</object>';
}*/

// 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];
  }
}

//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';
}

// Date
var d=new Date();
var weekday=new Array(7);
weekday[0]="Sunday";
weekday[1]="Monday";
weekday[2]="Tuesday";
weekday[3]="Wednesday";
weekday[4]="Thursday";
weekday[5]="Friday";
weekday[6]="Saturday";

var monthname=new Array(7);
monthname[0]="Jan";
monthname[1]="Feb";
monthname[2]="Mar";
monthname[3]="Apr";
monthname[4]="May";
monthname[5]="Jun";
monthname[6]="Jul";
monthname[7]="Aug";
monthname[8]="Sep";
monthname[9]="Oct";
monthname[10]="Nov";
monthname[11]="Dec";


/* Promotion's mouseover */
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';
	}
}
