

var isnMonths=new Array( "jan","feb","mar","apr","maj","jun","jul","aug","sept","okt","nov","dec" );
var isnDays= new Array( "Sön","Mån","Tis","Ons","Tors","Fre","Lör","Sön" );
today=new Date();

var requiredMajorVersion = 8;
var requiredMinorVersion = 0;
var requiredRevision = 0;



function PRO_popup( URL, width, height ){
	if ( parseInt( navigator.appVersion ) >= 3 ) {
		if ( navigator.appName == "Netscape" && parseInt( navigator.appVersion ) < 5 ) {
			var tools = new Packages.java.awt.Toolkit.getDefaultToolkit();
			screen=tools.getScreenSize();
		}
		x = screen.width;
		y = screen.height;
	}
	window.open( URL, "dummy", "top=" + parseInt( y/2 - height/2-16 ) + ", left=" + parseInt( x/2 - width/2-5 ) + ", width=" + width + ", height=" + height );
}
	
	
function PRO_popup_scroll( URL, width, height ){
	if ( parseInt( navigator.appVersion ) >= 3 ) {
		if ( navigator.appName == "Netscape" && parseInt( navigator.appVersion ) < 5 ) {
			var tools = new Packages.java.awt.Toolkit.getDefaultToolkit();
			screen=tools.getScreenSize();
		}
		x = screen.width;
		y = screen.height;
	}
	window.open( URL, "dummy", "top=" + parseInt( y/2 - height/2-16 ) + ",scrollbars=1,left=" + parseInt( x/2 - width/2-5 ) + ", resizable=1 width=" + width + ", height=" + height );
}	
	
	
function PRO_popup_resizable( URL, width, height ){
	if ( parseInt( navigator.appVersion ) >= 3 ) {
		if ( navigator.appName == "Netscape" && parseInt( navigator.appVersion ) < 5 ) {
			var tools = new Packages.java.awt.Toolkit.getDefaultToolkit();
			screen=tools.getScreenSize();
		}
		x = screen.width;
		y = screen.height;
	}
	window.open( URL, "dummy", "top=" + parseInt( y/2 - height/2-16 ) + ", left=" + parseInt( x/2 - width/2-5 ) + ", width=" + width + ", resizable=1, height=" + height );
}	


function PRO_modal( URL, width, height ) {
	if ( parseInt( navigator.appVersion ) >= 3 ) {
		if ( navigator.appName == "Netscape" && parseInt( navigator.appVersion ) < 5 ) {
			var tools = new Packages.java.awt.Toolkit.getDefaultToolkit();
			screen=tools.getScreenSize();
		}
		x = screen.width;
		y = screen.height;
	}
	if (window.showModalDialog) {
		window.showModalDialog( URL,'name',"name","dialogWidth:' + width + 'px;dialogHeight:' + height + 'px");
	} 
	else {
		window.open(URL,'name','height=' + height + 'px,width=' + width + 'px,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes');
	}
}



function PRO_popupImage( sPicURL ) { 
	window.open( "open_image.asp?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200"); 
} 


function pro_init_page() { 
	if (typeof sponsor_init=="function"){
		sponsor_init();
	}	
}




var gAutoPrint = true; // Tells whether to automatically call the print function

function printSelectedArea()
{
	if (document.getElementById != null)
	{
		var html = '<HTML>\n<HEAD>\n';

		if (document.getElementsByTagName != null)
		{
			var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0)
				html += headTags[0].innerHTML;
		}
		
		html += '\n</HEAD>\n<BODY>\n';
		
		var printReadyElem = document.getElementById("printAreaStart");
		
		if (printReadyElem != null)
		{
				html += printReadyElem.innerHTML;
		}
		else
		{
			alert("Could not find the printReady function");
			return;
		}
			
		html += '\n</BODY>\n</HTML>';
		
		var printWin = window.open("","printspecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint)
			printWin.print();
	}
	else
	{
		alert("Webbläsaren kan inte hitta vad som skall skrivas ut.");
	}
}
