// placerer og sætter størelsen på billeder til netscapefix
function toppict(element){
ns = (document.layers? true : false)
winW = (ns? window.innerWidth : document.body.offsetWidth)
winH = (ns? window.innerHeight : document.body.offsetHeight)
pictH = (ns? winH-85 : winH-85) 
pict = (ns? winW-796 : winW-796)
stan = (ns? '5' : '5')
if (winW<=776){
pictW = stan;
}
else{
pictW = pict/2;
}
document.write('<IMG height="0" border="0" width="'+pictW+'" src="/gfx/spaser.gif">');
//document.write('<IMG height="'+pictH+'" border="0" width="'+pictW+'" src="/gfx/spaser.gif">');
//window.alert(pictW);
}

function SetdocumentHeight(startvalue){
ns = (document.all? true : false)
winH = (ns? document.body.offsetHeight : window.innerHeight )
Mac = (navigator.appVersion.indexOf("Mac")!=-1)
pictH = (ns?  (winH-startvalue-(Mac?0:10)) : winH-startvalue ) 

document.write('<IMG height="'+pictH+'" border="0" width="1" src="/gfx/spaser.gif">');
//window.alert(ns);
//window.alert(startvalue);

}

function show(height,width,phpx,phpy, prodId, hotelId, hotelname, regionId,language,specialmap){
ns = (document.layers? true : false)
winW = (ns? window.innerWidth : document.body.offsetWidth)
pict = (ns? winW-795 : winW-770)
stan = (ns? '5' : '5')
xStart = (ns? '12' : '12')
yStart = (ns? '47' : '47')
if (winW<=770){
pictW = stan;
}else{
pixtW = eval(pict/2);
}
x = eval(pictW)+eval(phpx)+eval(xStart);
y = eval(yStart)+eval(phpy);

	
	document.write( '<div id='+hotelId+' style="position:absolute;height:'+height+'px;width:'+width+'px;left:'+x+'px; top:'+y+'px;"><a href="/resultat.php?language='+language+'&specialMap='+specialmap+'&regionId='+regionId+'&show='+hotelId+'" title="'+hotelname+'" alt="'+hotelname+'">');
	document.write( '<image border="0" height="'+height+'" width="'+width+'" src="/gfx/number/'+hotelId+'.gif"></a></div>');

}

function region(height,width,phpx,phpy,prodId,hotelId,hotelname,regionId,language,specialmap){
ns = (document.layers? true : false)
winW = (ns? window.innerWidth : document.body.offsetWidth)
pict = (ns? winW-795 : winW-770)
stan = (ns? '5' : '5')
xStart = (ns? '30' : '30')
yStart = (ns? '57' : '57')
if (winW<=770){
pictW = stan;
}else{
pixtW = eval(pict/2);
}
x = eval(pictW)+eval(phpx)+eval(xStart);
y = eval(yStart)+eval(phpy);

	//window.alert(x);
	document.write( '<div id='+hotelId+' style="position:absolute;height:'+height+'px;width:'+width+'px;left:'+x+'px; top:'+y+'px;"><a href="/resultat.php?language='+language+'&specialMap='+specialmap+'&regionId='+regionId+'&show='+hotelId+'" title="'+hotelname+'" alt="'+hotelname+'">');
	document.write( '<image border="0" height="'+height+'" width="'+width+'"  src="/gfx/dots/'+prodId+'.gif"></a></div>');

}

function submitForm(theForm)
{
	theForm.submit();
}

function bookingLink(url) {
mywin = window.open(url,"Booking",'toolbar=1,location=1,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=450,height=500');
}

function productline(url) {
mywin = window.open(url,"Info",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=450,height=520');
}

function goTo(script){
window.location=script;
}

function blnk() {}

function changeImage(imgName,imgObj) {

	if (document.images) {
		if (document.layers && layer!=null) eval('document.'+layer+'.document.images["'+imgName+'"].src = '+imgObj+'.src')
		else document.images[imgName].src = eval(imgObj+".src")
	}
}

img = new Image;
function changeImg(imgName, target) {
				img.src = imgName;
				document[target].src = img.src;
			}
