<!--


function JumpMenu(obj){
	sUrl = obj.value

	if (sUrl != "DISABLED"){
		window.location = sUrl;
	}
}




function PrintPlanner(){
	// Debug
	alert("PrintPlanner() triggered.")
	//return;
	
	var da = (document.all) ? 1 : 0;
	var pr = (window.print) ? 1 : 0;
	
	var sStart = "<html><head>";
	sStart += "<link rel=\"stylesheet\" type=\"text/css\" href=\"styles/print.css\">";
	sStart += "</head><body onload=\"javascript:window.print();\">";
	
	var sEnd = "</body></html>";
	
	// Make sure client supports window.print();
	if(!pr){
		alert("Your browser does not support the printing feature.");
		return;
	}

	// Define printable areas:
	
	// Logo
	var oLogo = document.getElementById("Logo");
	if(oLogo == null && da) oLogo = document.all.Logo;
	
	// Event info
	var oEventInfo = document.getElementById("EventInfo");
	if(oEventInfo == null && da) oEventInfo = document.all.EventInfo;
	
	
	// MainContents
	var oMainContents = document.getElementById("MainContentsDiv");
	if(oMainContents == null && da) oMainContents = document.all.MainContentsDiv;
	
	if(oMainContents){
		var w = window.open('about:blank','printWin','width=640,height=440,scrollbars=yes');
		wdoc = w.document;
		
		// Write to the new document.
		wdoc.open();
		wdoc.write(sStart);
		
		wdoc.write("<div id=Logo>")
		wdoc.write(oLogo.innerHTML);
		wdoc.write("</div>")
		
		wdoc.write("<div id=EventInfo>")
		wdoc.write(oEventInfo.innerHTML);
		wdoc.write("</div>")
		
		wdoc.write("<div id=MainContents>")
		wdoc.write(oMainContents.innerHTML);
		wdoc.write("</div>")
		
		wdoc.write("<br>");
		// wdoc.write("<h3>Välkommen till Hem & Villa!</h3>");
		
		wdoc.writeln(sEnd);
		wdoc.close();
	}
}


function ToggleDisplay(o){
	if(document.getElementById){
		var oElement = document.getElementById(o);
		if(oElement.style.display == "none"){
			oElement.style.display = "block";
		}
		else{
			oElement.style.display = "none";
		}
	}
	else if(document.all){

	}
	else{
	}
}



function FlashInstalled(){
	result = false;

	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]){
		result = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
	}
	else if (document.all && (navigator.appVersion.indexOf("Mac")==-1)){
		// IE Windows only -- check for ActiveX control, have to hide code in eval from Netscape (doesn't like try)
		eval ('try {var xObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if (xObj)	result = true; xObj = null;	} catch (e)	{}');
	}
	return result;
}


function FlashWrite(url,width,height){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" ');
	document.write(' width=' + width + ' height=' + height + '>');
	document.write('<param name=movie value="' + url + '">');
	document.write('<param name=quality value=high>');
	document.write('<param name=bgcolor value=#ffffff>');
	document.write('<param name=wmode value=transparent>');
	document.write('<embed src="' + url + '" quality=high bgcolor=#ffffff ');
	document.write(' swLiveConnect=false width=' + width + ' height=' + height);
	document.write(' type="application/x-shockwave-flash"');
	document.write(' wmode=transparent');
	document.write(' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
	document.write('</embed></object>');
}


function GenericWindowOpener(sURL,sName,nW,nH,bLocbar,bMenubar,bResize,bScrbar,bStatbar,bTitle,bToolbar,bHotkeys,bCenter,posX,posY) {
	
	if((parseInt(navigator.appVersion) >= 4 ) && (bCenter)){
		posX = (screen.width - nW) / 2;
		posY = (screen.height - nH) / 2;
	}
		
	args = "width=" + nW + ","
	+ "height=" + nH + ","
	+ "location=" + bLocbar + ","		// 0/1 
	+ "menubar=" + bMenubar + ","		// 0/1 
	+ "resizable=" + bResize + ","		// 0/1 
	+ "scrollbars=" + bScrbar + ","		// 0/1 
	+ "status=" + bStatbar + ","		// 0/1 
	+ "titlebar=" + bTitle + ","		// 0/1 
	+ "toolbar=" + bToolbar + ","		// 0/1 
	+ "hotkeys=" + bHotkeys + ","		// 0/1 
	+ "screenx=" + posX + ","  			//NN Only
	+ "screeny=" + posY + ","  			//NN Only
	+ "left=" + posX + ","     			//IE Only
	+ "top=" + posY;           			//IE Only
	
	window.open(sURL,sName,args);
}


function LaunchOverview(sUrl){
	var nW = screen.width - 100;
	var nH = screen.height - 150;
	
	oWin = GenericWindowOpener(sUrl,"Overview",nW,nH,0,0,1,1,0,1,0,0,1,0,0);
}


	
//-->