function openWindow(url) 
{
	var winLeft = (screen.width - 500) / 2;
	var winUp = (screen.height - 150) / 2;
	popupWin = window.open(url, 'remote',  'menubar=0,toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,dependent=0,width=500,height=150,left='+ winLeft +',top='+ winUp )
}

function openWindow33(url) 
{
var winLeft = (screen.width - 500) / 2;
var winUp = (screen.height - 150) / 2;

window.showModalDialog(url,"","dialogHeight: 150px; dialogWidth: 500px; dialogTop: "+ winUp +"px; dialogLeft: "+ winLeft +"px; edge: Raised; center: Yes; help: No; resizable: No; status: No;");

document.write (window.dialogArguments);
}


function openWindow55(url) 
{
var winLeft = (screen.width - 500) / 2;
var winUp = (screen.height - 150) / 2;

//if (document.all&&window.print) //if ie5
window.showModelessDialog(url,self ,"help:0;resizable:1; dialogHeight: 150px; dialogWidth: 500px; dialogTop: "+ winUp +"px; dialogLeft: "+ winLeft +"px")
//else
//eval('window.open(url,"","width='+mwidth+'px,height='+mheight+'px,resizable=1,scrollbars=1")')
}



function openWindow23(url) 
{
function modelesswin(url,mwidth,mheight){
if (document.all&&window.print) //if ie5
eval('window.showModelessDialog(url,"","help:0;resizable:1;dialogWidth:'+mwidth+'px;dialogHeight:'+mheight+'px")')
else
eval('window.open(url,"","width='+mwidth+'px,height='+mheight+'px,resizable=1,scrollbars=1")')
}
//configure URL and window dimensions (width/height)
modelesswin("http://yahoo.com",600,600)
//To load via link, use something like below:
//<a href="javascript:modelesswin('http://yahoo.com',600,400)">Click here</a>
}


function viewPicture2(filename) 
{
    var myImage = new Image();
    myImage.src=filename;
    properties='height=20,width=100';
    var imgWindow = window.open('','',properties);
    
    html = '<html>';
    html += '<head>';
    html += '<link href="style.css" rel="stylesheet" type="text/css">';
    html += '<title>Bildvisning</title>';
    html += '</head>';
    html += '<body topmargin="0" marginheight="0" leftmargin="0" marginwidth="0">';
    html += '<br><center><A HREF="#" onClick=self.close()><img src="'+ myImage.src +'" onLoad="resizeTo(document.bild.width+60,document.bild.height+100);" name="bild" alt="Stäng fönstret">';
    html += '<br><br>[<b>Stäng</b></a>]</center>';
    html += '</body>';
    html += '</html>';
    
    imgWindow.document.write(html);
}

function showHideSpan(id)
{
	 if(document.getElementById(id).style.display == "") 
	 {
	 	document.getElementById(id).style.display = "none";
	 }
	 else 
	 {
	 	document.getElementById(id).style.display = ""; 
	 }
}


//Funktion som stänger ner ett fönster
var count=5
function myCountDown() {
  if(count>=0){
	document.getElementById('countDown').innerHTML = count
    count--;
    setTimeout("myCountDown()", 1000);
  } else {
    window.close();
  }
}
