/*-------------------------------------------------------------------------------------------------
		-------------------------------------------------------------------
		----------------- © 2001 New Impact AG - micMouse -----------------
		------------------------------------------------------------------- 
--------------------------------------------------------------------------------------------------*/
/*-------- PIC ---------*/
pic = new Array();
function setPic(pfad,sName)	{
	if (document.images)	{
		pic[sName]= new Image();
		pic[sName].src = pfad+sName+".gif"; 
	}
}
function mouseOver(src,target)	{
	var thisTarget= target || src;
	if(pic[thisTarget+"_h"] && pic[thisTarget+"_h"].width!=0) document.images[src].src=pic[thisTarget+"_h"].src;
}
function mouseOut(src,target)	{
	var thisTarget= target || src;
	if(pic[thisTarget+"_l"] && pic[thisTarget+"_l"].width!=0) document.images[src].src=pic[thisTarget+"_l"].src;
}
/*-------- POPUP ---------*/
function getPopup(sUrl,iWidth,iHeight,isResizeable,isScrollable,sName,IsCenter)	{
	if(!sName)sname="Edit";
	if(isResizeable==null){
		isResizable="no"
	}
	if(isScrollable==null){
		isScrollable="no"
	}

	// axh 2003-10-01 - center Popup window
	if (!(IsCenter)){
		isCenter="no"
	}
	if(!opener || typeof(oPopup)=='undefined')	{
		oPopup=window.open(sUrl,sName,"undefined,width="+iWidth+",height="+iHeight+",resizable="+isResizeable+",scrollbars="+isScrollable+",left=120,top=120");
		oPopup.focus();
		oPopup.opener = self;
	}
	else window.location=sUrl;
	
	// axh 2003-10-01 - center Popup window
	if(IsCenter=="yes")
	{
		if (oPopup.outerHeight) oPopup.moveTo((screen.availWidth-oPopup.outerWidth)/2, (screen.availHeight-oPopup.outerHeight)/2);
		else oPopup.moveTo((screen.availWidth-iWidth)/2, (screen.availHeight-iHeight)/2);
	}
   	oPopup.focus();

}
function closeAndLoad(sUrl)	{
	opener.window.location=sUrl;
	self.close();
}
/*-------- CONFIRM LINK ---------*/
function confirmLink(sUrl,confirmText)	{
	if(confirm(confirmText))
		window.location=sUrl;
}
/*-------- PRINT THIS ---------*/
// Write a Active X Object in IE 4.x
if(document.all && !document.getElementById)
	document.write('<object id="webbrowser1" width="0" height="0" classid="clsid:8856f961-340a-11d0-a96b-00c04fd705a2" style="visibility:hidden"></object>');

function printThis()	{
	// IE >= 5 && NS >= 4
	if(document.getElementById || document.layers)window.print();
	// IE 4.x Catch if Active X Call are not allowed
	else if(document.all) {
		try	{
			webbrowser1.execwb(6,2);
		}catch(err)	{}
	}
}
/*-------------------------------------------------------------------------------------------------
				----------------- COOKIE ----------------- 
--------------------------------------------------------------------------------------------------*/
function classCookie()	{
	this.getCookie=getCookie;
	this.setCookie=setCookie;
	this.deleteCookie=deleteCookie;
	this.isDefined=isDefined;
}
	function setCookie(sName, sValue,iDay)	{
		var days = iDay || 365;
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000))
		var expires = "; expires="+date.toGMTString()
		document.cookie = sName+"="+sValue+expires+"; path=/"
	}
	function getCookie(sName)	{
		var nameEQ = sName + "="
		var aCookie = document.cookie.split(';')
		for(var i=0;i<aCookie.length;i++) {
			var c = aCookie[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length)
				if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length)
		}
	return "";
	}
	function deleteCookie(sName)	{
		this.setCookie(sName,"",-1)
	}
	function isDefined(sName)	{
		if(getCookie(sName)=="")return false;
		else return true;
	}
cookies = new classCookie();