
var browserName;

if (navigator.appName == "Microsoft Internet Explorer") 
document.write('<'+'link rel="stylesheet" href="newindexIE.css" />');
else
document.write('<'+'link rel="stylesheet" href="newindexIE.css" />'); 

/*
function MORE01_onclick() {
	var obj = document.getElementById("TABLE2");
	if(obj)
	{	
		obj.style.display="inline";
	}
}
*/
/** 
* @returns A string which specifies which is the current 
* browser in which we are running. 
* 
* Currently-supported browser detection and codes: 
* * 'opera' -- Opera 
* * 'msie' -- Internet Explorer 
* * 'safari' -- Safari 
* * 'firefox' -- FireFox 
* * 'mozilla' -- Mozilla 
* 
* If we are unable to property identify the browser, we 
* return an empty string. 
* 
* @type String 
*/ 
function GetBrowserName() { 
var browserName = ""; 

var ua = navigator.userAgent.toLowerCase(); 
if ( ua.indexOf( "opera" ) != -1 ) { 
browserName = "opera"; 
} else if ( ua.indexOf( "msie" ) != -1 ) { 
browserName = "msie"; 
} else if ( ua.indexOf( "safari" ) != -1 ) { 
browserName = "safari"; 
} else if ( ua.indexOf( "mozilla" ) != -1 ) { 
if ( ua.indexOf( "firefox" ) != -1 ) { 
browserName = "firefox"; 
} else { 
browserName = "mozilla"; 
} 
} 

return browserName; 
}; 
 


function doTrans2()
{
browserName=navigator.appName; 
//alert(browserName);

var theImg = document.getElementById("theImg");
if (browserName=="Opera")
    {
    var theMenuDiv = document.getElementById("topmenu");
    if (theMenuDiv)
        {
        theMenuDiv.style.width = "840px";
        }
    }
}
/******/
function MORE01_onclick() {
	var obj = document.getElementById("TABLE2");
	if(obj)
	{	
	if (GetBrowserName()=="safari")  obj.style.display="table";
	else 
	obj.style.display="block";
	}
	obj = document.getElementById("TABLE3");
	if(obj)
	{	
		obj.style.display="none";
	}
}
/******/
function MORE02_onclick() {
	var obj = document.getElementById("TABLE3");
	if(obj)
	{	
	if (GetBrowserName()=="safari") obj.style.display="table"; 
	else 
	obj.style.display="block";
	}
	obj = document.getElementById("TABLE2");
	if(obj)
	{	
		obj.style.display="none";
	}
}
/******/
  
function openPopup(url,width,height,scrollbars,menubar,toolbar,statusbar,resizable)
{
	var winName = "popupWin";
	var winAttributes = "";
	winAttributes += (width && width > 0) ? "width=" + width : "width=526";
	winAttributes += (height && height > 0) ? ",height=" + height : ",height=400";
	winAttributes += (scrollbars && scrollbars == 1) ? ",scrollbars=yes" : ",scrollbars=no";
	winAttributes += (menubar && menubar == 1) ? ",menubar=yes" : ",menubar=no";
	winAttributes += (toolbar && toolbar == 1) ? ",toolbar=yes" : ",toolbar=no";
	winAttributes += (statusbar && statusbar == 1) ? ",status=yes" : ",status=no";
	winAttributes += (resizable && resizable == 1) ? ",resizable=yes" : ",resizable=no";
	var popupWin = window.open(url,winName,winAttributes);
	createCookie('tenbaaltso_popup','tenbaaltso_popup',0);
	popupWin.focus();	
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}


function closePopup(url)
{
	var winName = "popupWin";
	var popupWin = window.open(url,winName);
	popupWin.close();	
}
/******************/
   function playpiece01(pict, linkid, title)
   { 
               var so = new SWFObject("Images/" + pict, "movie", 320, 40,  "6", "#336699");
               so.addParam("quality", "high");
               so.addParam("wmode", "transparent");
               so.write("playercontent");
   	            var obj = document.getElementById(linkid);
	            if(obj)
	            {	
		            obj.style.backgroundColor="#999999";
		            if (oldlink) oldlink.style.backgroundColor="#202222";
	                oldlink = obj;
	            }
	            var obj2 = document.getElementById("MusicCaption");
	            if(obj2)
	            {	
		            obj2.innerHTML="Nu spelas " + title;
	            }
	}
function setMenuColor(id)
{
	var obj = document.getElementById(id);
	if(obj)
	{	
		obj.style.textDecoration="underline";
	}
	//AdjustMenu();
}
function AdjustMenu()
{
	var obj = document.getElementById("centermenu");
	if(obj && GetBrowserName()=="safari")
	{	
		obj.style.position="absolute";
	}
}
	
