//========================================================================================================================
// Common
//========================================================================================================================

	document.onerror = function() {	return };

	var mouseEventDisabled = true;
	
	var range1;
	var range2;
	var styleObj;
	var isNS;

//========================================================================================================================
// Browser validation (NS6 - NS4 - IE4 - IE5)
//========================================================================================================================

	if(navigator.appName.indexOf("Netscape")!= -1){
		if(navigator.userAgent.indexOf("Netscape6")!= -1){
			// Netscape version 6
			range1 	 = "getElementById('";
			range2 	 = "')";
			styleObj = ".style";
			isNS 	 = false;
		}
		else {
			// Netscape - INTE version 6
			range1 	 = "layers.";
			range2 	 = "";
			styleObj = "";
			isNS = true;
		}
	}
	else {
		// INTE Netscape - Förhoppningsvis Internet Explorer >4 ;-)
		range1 	 = "all.";
		range2 	 = "";
		styleObj = ".style";
		isNS 	 = false;
	}
	if (typeof isNS != 'String') {
		var isNS = document.layers;
	}

	if (isNS) {
		var winH = document.height-18;
		var winW = document.width;
	}
	else if(navigator.userAgent.indexOf("Netscape6")!= -1) {
		var winH = screen.availHeight;
		var winW = screen.availWidth;
	}
	else {
		var winH = screen.availHeight-50;
		var winW = screen.availWidth;
	}

	
//=======================================================================================
// Window functions
//=======================================================================================
	
	function getWinHeight() {
		if (isNS) {
			return document.height-18;
		}
		else if(navigator.userAgent.indexOf("Netscape6")!= -1) {
			return document.body.clientY
		}
		else {
			return document.body.scrollHeight+40;
		}
	}
	
	function getWinWidth() {
		if (isNS) {
			return document.width-18;
		}
		else if(navigator.userAgent.indexOf("Netscape6")!= -1) {
			return document.body.clientX
		}
		else {
			return document.body.scrollWidth+29;
		}
	}
	
	var winExtras;
	var arrWin = new Array();

	function popupwin(name,prop) {
		this.name = name;
		this.prop = prop;
		this.obj  = '';
	}

	function createWin(url,name,prop) {
		if (!existsWin(url,name,prop)) {
			var index = arrWin.length+1
			arrWin[parseInt(index)] 		= new popupwin(name,prop);
			arrWin[parseInt(index)].obj 	= window.open(url,name,prop);
		}
	}

	function existsWin(url,name,prop) {
		for (var i=0; i<arrWin.length; i++)
		{
			if (arrWin[i]) {
				if (name == arrWin[i].name &! (isNS)) {
					arrWin[i].obj.close();
					arrWin[i].obj = window.open(url,name,prop);
					arrWin[i].obj.focus();
					return true;
					break;
				}
			}
		}
		return false
	}
	
	function popUpWinResizer(){
		var screenHmax = (screen.height-200)
		//winH = (ns4)? document.height-18 : document.body.scrollHeight+25;
		//winW = (ns4)? document.width : document.body.scrollWidth+29;
		winH = getWinHeight();
		winW = getWinWidth();
		if (winH > screenHmax){
			winH=screenHmax
		}
		window.resizeTo(winW,winH)
	}
	
	function confirmMess(string) {
		return (!(confirm(string))) ? false : true;
	}
	
	function Print(url)
	{
		document.location.href = url;
	}
	