/**
	javascript-definitions & function for the homepage from felss gmbh (not for rotaform)
	copyright 2002 by digit interactive & toolpi webdevelopment
	autor: andreas van loock / bonnerstrasse 28 / 50677 koeln
	
	last modified:
	
	2002-07-25 erstellung der datei
	
**/
	
	/**
		Where is the UserAgent?
	**/
	var ns4 = (document.layers)? 1 : 0;
	var ie4 = (document.all)? 1 : 0;
	var w3c = ((document.getElementById) && (!ie4))?1:0; // ie5 's got getElementbyId as well

	/**
		Declare Variables
	**/
	var isFalse, isTrue;
	
	/**
		this function will check if the homepage is nesaccary in frame from other pages
	**/
	function pc_withOutFrames(){

	}
	
	/**
		this function will open an new window
	**/
	function pc_openWindow(url, name, width, height, preferences) {
		
		var winHeight;
		var winWidth;
		var popupWindow;
		var preferences = preferences + ",width="+width+",height="+height;
						
		//winHeight = screen.availHeight;
		//winWidth  = screen.availWidth;
		
		popupWindow = window.open(url, name, preferences);
		popupWindow.focus();
		popupWindow.moveTo((screen.availWidth-width)/2,(screen.availHeight-height)/2);
	}
	
	/**
		this funcation will alert the printdialog of a browser
	**/
	function pc_printActive(target) {

	}
	
	/**
		this function will open a window within the homepage in printmode
	**/
	function pc_printScreen() {
		
		if ((!ns4) && (!w3c)){
			// Focus auf den Frame lenken welcher gedruckt werden soll              
			parent.content.focus();
			// BrowserObject ,,Print Box,, anlegen
			var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
			document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
			WebBrowser1.ExecWB(6, 2); //Use a 1 vs. a 2 for a prompting dialog box 
			WebBrowser1.outerHTML = "";             
		} else {
			parent.content.focus();
			parent.frames['content'].print();
		}
	}
	
	/**
		this function will check if the user has fillout the search inputform
	**/
	function pc_checkSearchBox() {
	
	}
	
	/**
		Highlight the MouseOver when coming
	*/
	function butRubber (PicName,PicObj){
		if (PicName != isTrue){
			window.document.images[PicName].src = PicObj.src;
		}
		return;
	}
	
	/**
		Stop the MouseOver if User is klicking a link
	*/
	function stopRubber (PicName,PicObj){
		if (isFalse == false){
			window.document.images[isTrue].src = butLow.src;
		} 
		window.document.images[PicName].src = PicObj.src;
		isTrue  = PicName;
		isFalse = false;
		return;
	}
	
	/**
		Start ShowRoom Popup's
	**/
	function showroomStart(selectedEngine){
	
		var winHeight;
		var winWidth;
		var popupWindow;
		var preferences = "toolbar=no,location=no,scrollbars=no,width=570,height=530";
		
		var showRoomFrame = "siteShowRoomFrame.html?engine=" + escape(selectedEngine);
		
		popupWindow = window.open(showRoomFrame, "showRoom", preferences);
		popupWindow.focus();
		popupWindow.moveTo((screen.availWidth-550)/2,(screen.availHeight-500)/2);
		
	}
	
	/**
		Start Zertifiakte Popup's
	**/
	function zertiStart(selectedEngine){
	
		var winHeight;
		var winWidth;
		var popupWindow;
		var preferences = "toolbar=no,location=no,scrollbars=no,width=570,height=500";
		
		var showRoomFrame = "siteZertifikateFrame.html?engine=" + escape(selectedEngine);
		
		popupWindow = window.open(showRoomFrame, "zertifikate", preferences);
		popupWindow.focus();
		popupWindow.moveTo((screen.availWidth-550)/2,(screen.availHeight-500)/2);
		
	}
	
	/**
		Show the next Room
	**/
	function showNextRoom(){
	
		parent.content.location.href = parent.content.nextSite;
	}
	
	/**
		Show the back Room
	**/
	function showBackRoom(){
		parent.content.location.href = parent.content.backSite;
	}
	
	/**
		Highlight a Layer
	**/
	function setLayer(layerID){
		
		if (isSet == 1){
			return;
		}
		/**
		* dont change anything
		*/
		this.ns  = ( document.layers )? true : false;
		this.w3c = ( document.getElementById ) && ( !document.all ) ? true : false;
		this.ms  = ( document.all ) ? true : false;
	
		if ( ns )       this.LayObjText = eval("window.document."+layerID);
		else if ( ms )  this.LayObjText = eval(layerID+".style");
		else if ( w3c ) this.LayObjText = document.getElementById( layerID ).style;
		
		this.LayObjText.visibility = "visible";
		
		isSet = 1;
	}
	
	/**
		Disabled a Layer
	**/
	function closeLayer(){
	
		this.LayObjText.visibility = "hidden";
		isSet = 0;
	}
	
	/**
		Highlight a Layer on the mousemover
	**/
	var aktivLayer;
	function setLayerOnMouse(layerID){
		
		if (isSet == 1){
			this.aktivLayer.visibility = "hidden";
		}
		/**
		* dont change anything
		*/
		this.ns  = ( document.layers )? true : false;
		this.w3c = ( document.getElementById ) && ( !document.all ) ? true : false;
		this.ms  = ( document.all ) ? true : false;
	
		if ( ns )       this.LayObjText = eval("window.document."+layerID);
		else if ( ms )  this.LayObjText = eval(layerID+".style");
		else if ( w3c ) this.LayObjText = document.getElementById( layerID ).style;
		
		this.LayObjText.visibility = "visible";
		
		if (w3c || ns){
			this.LayObjText.left = mouseX;  
			this.LayObjText.top  = mouseY;
		} else {
			this.LayObjText.left = window.event.x;  
			this.LayObjText.top = window.event.y;
		}
		isSet = 1;
		this.aktivLayer = this.LayObjText;
		window.setTimeout("closeLayer()",60000);
	}
	
	
/**
	end of document
**/