/*
		***********************************************************************************
		
		URL:			http://www.studiosdigital.at
		Copyright:		studiosdigital © vienna 2004
		Author:			gerwalt leitner, maximilian uhl
		Contact:		please use the email form provided on the page
		
		Description:	javascript for opening popup window
						
		***********************************************************************************	
*/
/*
		***************************************************************
		PopUp Function
		***************************************************************
*/

function popUp(popUpURL,popUpName,popUpWidth,popUpHeight,popUpScrollbars,popUpStatus,popUpResize) {
	
	var popUpTop = (screen.height - popUpHeight)/2;
	var popUpLeft = (screen.width - popUpWidth)/2;
	
	var features = 'width='+popUpWidth+',height='+popUpHeight+',top='+popUpTop+',left='+popUpLeft+',scrollbars='+popUpScrollbars+',status='+popUpStatus+',resizable='+popUpResize;
	window.open(popUpURL,popUpName,features);	
}

/*
		***************************************************************
		DualFrames Function
		***************************************************************
*/


function DualFrames(URI1,F1,URI2,F2) {
  Frame1=eval("parent."+F1);
  Frame2=eval("parent."+F2);
  Frame1.location.href = URI1;
  Frame2.location.href = URI2;
}

/*
		***************************************************************
		SetActive Function
		***************************************************************
*/

var activeItem = '';

function RollOver(name,imgpath){
	var goal = document.getElementById(name);
	goal.src = imgpath;
}

function RollOut(name,imgpath){
	
	if(name != activeItem){
		var goal = document.getElementById(name);
		goal.src = imgpath;
	}
}

function Activate(name){
	activeItem = name;
	imagepath = activeItem.substring(1);
	newpath = 'img/'+imagepath+'_r.gif';
	for(i=1;i<=8;i++){
		document.getElementById('x'+i).src = 'img/'+i+'_n.gif';
	}
	document.getElementById(activeItem).src = newpath;
}

function PreloadImages(){
	var preloadImages = new Array('img/1_r.gif','img/2_r.gif','img/3_r.gif','img/4_r.gif','img/5_r.gif','img/6_r.gif','img/7_r.gif','img/8_r.gif');
	var preIoadImagesVars = new Array();
	for(i = 0; i < preloadImages.length; i++){
		preIoadImagesVars[i] = new Image();
		preIoadImagesVars[i].src = preloadImages[i];
	}
}