
function openNewWindow(URLtoOpen, windowName, windowFeatures) { newWindow=window.open(URLtoOpen, windowName, windowFeatures); }

function addBookmark(title,url) { 
if (window.sidebar) { 
window.sidebar.addPanel(title, url,""); 
} else if( document.all ) { 
window.external.AddFavorite( url, title); 
} else if( window.opera && window.print ) { 
return true; 
} 
}

function new_freecap()
{
	// loads new freeCap image
	if(document.getElementById)
	{
		// extract image name from image source (i.e. cut off ?randomness)
		thesrc = document.getElementById("freecap").src;
		thesrc = thesrc.substring(0,thesrc.lastIndexOf(".")+4);
		// add ?(random) to prevent browser/isp caching
		document.getElementById("freecap").src = thesrc+"?"+Math.round(Math.random()*100000);
	} else {
		alert("Sorry, cannot autoreload freeCap image\nSubmit the form and a new freeCap will be loaded");
	}
}

function ready() {
    framecontent = document.getElementById('iframecontent');
    map24 = document.getElementById('map24');
    meteocontent = document.getElementById('meteocontent');
    
    if(framecontent){
    framecontent.innerHTML = '<iframe marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="http://meteo.suedtirolerland.it/?lang=it&amp;css_file=http://www.glanzhof.com/styles/meteo.css" name="meteo" id="meteo"></iframe>';
   }
   
   if(map24){
    map24.innerHTML = '<iframe src="http://www.it.map24.com/source/link2map/v2.0.0/cnt_pick_code.php?linksection=linkdestroute&lid=dcd5940c&ol=it-it&dstreet=N%F6rderstra%DFe%201&dzip=39020&dcity=Marling&dstate=&dcountry=it&ddescription=Wellnesshotel%20Glanzhof%3Cbr%3EN%F6rderstra%DFe%201%3Cbr%3E39020 Marling" width="200" height="241" scrolling="no" frameborder=0></iframe>';
    }
    
    if(meteocontent){
    meteocontent.innerHTML = '<iframe marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="http://meteo.suedtirolerland.it/?type=long&lang=it&amp;css_file=http://www.glanzhof.com/styles/meteobig.css" name="meteolong" id="meteolong"></iframe>';
    }
}

function loadCSS(basename)
{
	var e = document.createElement('link');
	e.setAttribute('rel', 'stylesheet');
	e.setAttribute('type', 'text/css');
	e.setAttribute('media', 'screen');
	e.setAttribute('href', basename);
	document.getElementsByTagName('HEAD')[0].appendChild(e);
}
