function openFullChromeWindow(url, name){
	window.open(url, name);
	return false;
}
function openPositionedWindow(url, name, width, height, x, y, status, scrollbars, moreProperties, openerName) {
	return openPopup(url, name, width, height, status, scrollbars, moreProperties);
}
function openPopup(url, name, width, height, status, scrollbars, moreProperties) {
	var agent = navigator.userAgent.toLowerCase();
	var x, y = 0;
	if (screen) {
      x = (screen.availWidth - width) / 2;
      y = (screen.availHeight - height) / 2;
   }
   if (!status) status = '';

	// Adjust width if scrollbars are used (pc places scrollbars inside the content area; mac outside) 
	width += (scrollbars != '' && scrollbars != null && agent.indexOf("mac") == -1) ? 16 : 0;

	var properties = 'width=' + width + ',height=' + height + ',screenX=' + x + ',screenY=' + y + ',left=' + x + ',top=' + y + ((status) ? ',status' : '') + ',scrollbars' + ((scrollbars) ? '' : '=no') + ((moreProperties) ? ',' + moreProperties : '');
   
	window.open(url, name, properties);
	return false;
} 
function setCookie(c_name, value) {
	var expiredays = "6";
	var exdate = new Date();
	exdate.setDate(exdate.getDate() + expiredays);
	document.cookie= c_name + "=" + escape(value) + ((expiredays==null) ? "" : ";expires=" + exdate.toGMTString());
}

function reloadCookie(value) {
	setCookie('gateway', value);
	window.location.reload();
}

function setSectionCookie(value) {
		var sc_name = "lotrconquestsection";
		document.cookie= sc_name + "=" + escape(value);
}

function setSessionCookie(value)
{
	var sc_name = "lotrconquestsession";
	document.cookie= sc_name + "=" + escape(value);
}

function flashMovie(name)
{
 if(navigator.appName.indexOf("Microsoft") != -1)
 {
  return window[name];
 }
 else
 {
  return document[name];
 }
}

function pauseMusic()
{
	flashMovie("LOTRConquestFlashTopNavID").pauseMusic();
}

function resumeMusic()
{
	flashMovie("LOTRConquestFlashTopNavID").resumeMusic();
}