/*	
	Generic javascript for popup-windows
	--------------------------------------------
	The last argument controll if the window should be resizeable or not
	<a href="" onclick="axisPopUp('http://www.axis.com/','hej',500,200,false); return false;">test</a>
	
	Created by Jonas Elmqvist in 2004-12-02
*/

function axisPopUp(url,windowname,width,height,resize) {
	
	if (resize) {
		window.open(url,windowname,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=' + width + ',height=' + height);
	} else {
		window.open(url,windowname,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=' + width + ',height=' + height);
	}
	
	return false;
}

function axisImageShow(URL){
	window.open(URL,"axisImageShow","toolbar=no,scrollbars=no,status=no,width=700,height=700");
	return false;
}


/*
	axisRollOver function set
	------------------------------------------------
	Simple set off functions whish adds preload and mouseOver functinality
*/

var axisRollOverArray = new Array();

function axisRollOverAddImage(onImage,offImage,path) {
	if (path.substring(path.length-1,path.length) != "/") {
		path += "/";
	}
			
	axisRollOverArray[onImage] = path + offImage;
	axisRollOverArray[offImage] = path + onImage;	
} 			
		
function axisRollOver(imgObject) {
	arrayItemIndex = imgObject.src.substring(imgObject.src.lastIndexOf('\/')+1,imgObject.src.length);
	imgObject.src = axisRollOverArray[arrayItemIndex];
}

function axisRollOverLink(aTag){
	if(aTag.style.backgroundImage == "none")
		aTag.style.backgroundImage = "url(/core/indexpage/img/gray.jpg)";
	else{
		aTag.style.backgroundImage = "none";
		aTag.style.backgroundColor = "#e7e7e7";
	}
}

function axisRollOverLinkTwo(aTag){
	if(aTag.style.backgroundImage == "none")
		aTag.style.backgroundImage = "url(/core/indexpage/img/gray2.jpg)";
	else{
		aTag.style.backgroundImage = "none";
		aTag.style.backgroundColor = "#e1e1e1";
	}
}

var axisPreloadImageID = 0;
		
function axisPreloadImage(imageArray) {	
	axisPreloadImageID++;
 		
	for(a=0; a<imageArray.length; a++) {
		var imageName = "image_" + axisPreloadImageID + "_" + a;
			imageName = new Image();
			imageName = imageArray[a];
	}				
}






/*
window.open(url,title,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=" + width + ",height=" + height);
	
*/

/*
	Old function for popup-windows
	---------------------------------------------
	This function should be removed after the migration to new web in 2004/2005
*/

function ftpwin(HTMLPage) {
	displayWindow=this.open (HTMLPage,"displayWindow", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=360,height=200");
}

function grafwin(HTMLPage) {
	displayWindow=this.open (HTMLPage,"displayWindow","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=560,height=550")
}

