	var clkmessage="Function Disabled\nPlease use left clicks only";

	if (document.layers) {
		document.captureEvents(Event.MOUSEDOWN);
	}
//	document.onmousedown=chkClick;

	function checkLogin() {
		try {
			e = window.event;
			if (e.keyCode) {
				keyCode = e.keyCode;
			} else {
				if (e.which) keyCode = e.which;
			}
		}
		catch(e) { return; }
		if (keyCode == 13) {
			if (!e) {
				event.cancelBubble = true;
				event.returnValue = false;
			}
			if (top.Categories.document.getElementById('loginButton')) top.location.href = 'login.asp';
		}
	}
	function checkLoginExtended(e) {
		if (!e) { e = window.event; }
		try {
			if (e.keyCode) {
				keyCode = e.keyCode;
			} else {
				if (e.which) keyCode = e.which;
			}
		}
		catch(e) { return; }
		if (keyCode == 13) {
			if (!e) {
				event.cancelBubble = true;
				event.returnValue = false;
			}
			if (top.Categories.document.getElementById('loginButton')) top.location.href = 'login.asp';
		}
		if (keyCode == 82) {
			if (top.Search.document.getElementById('rwButton')) {
				top.Search.openTarget('',1,'Content',1);
			}
		}
	}


	function initMain() {
		window.status="Select a category or enter a address or search query";
	}
	function setClass(obj,clsName) {
		obj.className = clsName;
	}
	function chkClick(evnt) {
		if (document.all) { if (event.button==2||event.button==3) { alert(clkmessage); return false; } }
		if (document.layers) { if (evnt.which == 3) { alert(clkmessage); return false; } }
	}
	function chkCategoryPage(hPage) {
	/*	try {
			if (top.Categories.location.href.indexOf("optmenu.asp")>=0 || top.Categories.location.href.indexOf("categories.asp")<0){
				top.Categories.location.replace(hPage+'categories.asp');
			}
		}
		catch(e) {
			window.location.href = hPage;
		}*/
	}
	function Hover(nr,pobj) { 
	        document.images[nr].src = pobj.src; 
	} 
	function hideTips(t_msg) {
		alert(t_msg);
		document.notipsForm.submit();
	}
	function selectCat(cID,pID) {
		document.catSelForm.Searchtext.value = "";
		document.catSelForm.CID.value = cID;
		document.catSelForm.CParentID.value = pID;
		document.catSelForm.action = '<%= Application("Root") & Application("DefaultList") %>';
		document.catSelForm.method = "get"
		document.catSelForm.submit();
	}
	function openTarget(url,id,ptarget,icat) {
		var s_tmp = url.slice(url.lastIndexOf("/"));
		var s_tmp = s_tmp.toLowerCase();
		var intOpenFlag = s_tmp=="/" || s_tmp.indexOf(".htm")!=-1 || s_tmp.indexOf(".shtm")!=-1 || s_tmp.indexOf(".asp")!=-1 || s_tmp.indexOf(".php")!=-1 || s_tmp.indexOf(".cfm")!=-1 || s_tmp.indexOf(".pdf")!=-1 || s_tmp.indexOf(".doc")!=-1 || s_tmp.indexOf(".xls")!=-1 || s_tmp.indexOf(".ppt")!=-1 || s_tmp.indexOf(".jsp")!=-1;
		if (!ptarget || ptarget=='') {
			document.openlinkForm.target = (iOpenWin=='new') ? "_blank" : (iOpenWin=='actual') ? "_top" : (intOpenFlag) ? "_blank" : "_top";
		} else {
			document.openlinkForm.target = (iOpenWin=='new') ? "_blank" : (iOpenWin=='actual') ? "_top" : ptarget;
		}
		document.openlinkForm.urltarget.value = document.openlinkForm.target;
		document.openlinkForm.urllink.value = url;
		document.openlinkForm.urlid.value = id;
		if (icat) {
			try {
				top.Categories.toggleSelect('CID=' + icat+ '&');
			}
			catch(e) {}
			document.openlinkForm.CID.value = icat;
		}
		document.openlinkForm.submit();
	}
	function toggleDivOn(id, THRef) {
		var oRect = THRef.getBoundingClientRect();
		if (id) {
			if (id.style.display == "none") {
				id.style.top = oRect.bottom - 2;
				id.style.left = oRect.left + 26;
				id.style.display = "block"
			}
		}
	}
	function toggleDivOff(id) {
		if (id) id.style.display = "none";
	}
	function Hi(obj) {
		obj.style.backgroundColor = '#ffffcc';
	}
	function Lo(obj) {
		obj.style.backgroundColor = '';
	}
	function Lo1(obj) {
		obj.style.backgroundColor = '#eeeeee';
	}
	function writeDateD() {
		var today = new Date();
		var dayNames = new Array();
		dayNames[0] = 'Sonntag';
		dayNames[1] = 'Montag';
		dayNames[2] = 'Dienstag';
		dayNames[3] = 'Mittwoch';
		dayNames[4] = 'Donnerstag';
		dayNames[5] = 'Freitag';
		dayNames[6] = 'Samstag';
		dayNames[7] = 'Sonnatg';
	
		var monthNames = new Array();
		monthNames[0] = 'Januar';
		monthNames[1] = 'Februar';
		monthNames[2] = 'März';
		monthNames[3] = 'April';
		monthNames[4] = 'Mai';
		monthNames[5] = 'Juni';
		monthNames[6] = 'Juli';
		monthNames[7] = 'August';
		monthNames[8] = 'September';
		monthNames[9] = 'Oktober';
		monthNames[10] = 'November';
		monthNames[11] = 'Dezember';
	
		var dateTh = '.';
		document.write(dayNames[today.getDay()] + ', ' + today.getDate() + dateTh + ' ' + monthNames[today.getMonth()] + ' ' + today.getFullYear());
	}
	function toggleImg(objI,toImg) {
		objI.src = toImg;
	}
	function addToFavorites(linkID) {
		document.addFavoriteForm.ID.value = linkID;
		document.addFavoriteForm.submit();
	}
	function checkClass(obj,cls,nr) {
		if (nr==selectItem) setClass(obj,'formSubCell2')
		else setClass(obj,cls);
	}
	function hideDivs() {
		var d1 = document.getElementsByTagName('DIV');
		if (d1.length) {
			for (var i=0; i<d1.length; i++) {
				if ((d1[i].id.substr(0,2)=='ud' || d1[i].id.substr(0,2)=='vd') && d1[i].style.display!='none') d1[i].style.display = 'none';
			}
		}
		try { hideMenu(); }
		catch(e) {}
	}
	function showUrlInfo(dNode, iNode) {
		hideDivs();
		document.getElementById(dNode).style.display = 'inline';
	}

