function popUp(URL) {
	window.open(URL,'popup','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=420,height=650');
}

function resize_images() { 
	for (i = 1; i < document.images.length; i++) 
	{ 
	  while ( !document.images[i].complete ) 
	  { 
	    break;
	  } 
	  if ( document.images[i].height > 175 ) 
	  { 
	    document.images[i].height = 175; 
	  } 
	} 
} 


function skalabild() { 

	var maxhojden = 500; // Maxhöjden
	var maxvidden = 200; // Maxhöjden
	var nyahojden = 500; // Höjd om den skall skalas
	var nyavidden = nyahojden*(document.images.bilden.width/document.images.bilden.height);

	if ( document.images.bilden.height > maxhojden && document.images.bilden.width > maxvidden )
	{ 
		document.images.bilden.height = nyahojden;
		document.images.bilden.width  = nyavidden;
	} 
	  
}

function resize_window() { 
     
//Superduper resize window av Mats Vieru för alla webläsare ;)

    	var arrTemp=self.location.href.split("?"); 
		var picUrl = (arrTemp.length>0)?arrTemp[1]:""; 
		var NS = (navigator.appName=="Netscape")?true:false; 
	
		iWidth =  (NS)?window.innerWidth:document.body.clientWidth; 
		iHeight = (NS)?window.innerHeight:document.body.clientHeight;
       				
			if(window.opera){
				  // Opera
				  fixw=25
				  fixh=0
				  //alert ("Opera")
				  
			} else if(navigator.appName == 'Konqueror'){
				  // Konqueror
				  fixw=25
				  fixh=0
				  //alert ("Konqueror")
				  
			} else if(navigator.appName == 'Microsoft Internet Explorer'){
			
						
				if ( navigator.userAgent.indexOf('Mac') != -1 ){ 
								
				// IE MAC
					  
				} else {
				
				// IE PC
				fixw=0
				fixh=0				
				//alert ("IE - PC")
				  
				}	
				  
			} else if(navigator.userAgent.indexOf('Safari') != -1){
				  // Safari
				  fixw=300
				  fixh=0
				  //alert ("Safari")
				  
			} else if(navigator.userAgent.indexOf('Firebird') != -1){
				  // Firebird
				  fixw=25
				  fixh=55
				  //alert ("Firebird")
				  
			} else if(navigator.appName == 'Netscape'){
				  // Netscape Navigator, Communicator
				  fixw=25
				  fixh=0
				  //alert ("Netscape Communicator")
				  
			} else if(navigator.userAgent.indexOf('Netscape') != -1){
				  // Netscape
				  fixw=25
				  fixh=0
				  //alert ("Netscape")
				  
			} else if(navigator.userAgent.indexOf('Gecko') != -1){
				  // Mozilla
				  fixw=25
				  fixh=15
				  //alert ("Gecko, Firefox")
				  
			} else {
				  // Else
				  fixw=0
				  fixh=0
				  //alert ("Vet ej!")
				  
			}
		
	    if(navigator.appName == 'Netscape'){	
			iWidth =  document.images[0].width - iWidth + 300; 
	        iHeight = document.images[0].height - iHeight + 75;
	        window.resizeBy(iWidth, iHeight);
	                
	    } else if(navigator.userAgent.indexOf('Mac') != -1 ){ 
			window.resizeBy(100, 130);
         
		} else {

			if (x.clientHeight > 600) { 				
			 h = 600	  
			} else {
			 h = x.clientHeight	  
			}

			 w = x.clientWidth
		iWidth = document.images[0].width - iWidth + w + fixw - document.images[0].width; 
	        iHeight = document.images[0].height - iHeight + h + fixh - document.images[0].height;

	        window.resizeBy(iWidth, iHeight); 
		}
       
       self.focus();
     }; 

