/*************************************************************/
/******************* default .js *****************************/
/*************************************************************/


	function $(str) {
		return document.getElementById(str);
	}

	// nav links nachladen
	function changeLeftNavi(sMode) {

		/*

		sNav = top.frames['leftFrame'].location.href;

		if(sMode=='edit') {
			if(basename(sNav)=='navigation.htm') {
				top.frames['leftFrame'].location = 'navigation.php';
			}
		}else{
			if(basename(sNav)=='navigation.php') {
				top.frames['leftFrame'].location = '../shared/html/navigation.htm';
			}

		}

		*/

	}

	function basename(path, suffix) {
	    // http://kevin.vanzonneveld.net
	    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
	    // +   improved by: Ash Searle (http://hexmen.com/blog/)
	    // +   improved by: Lincoln Ramsay
	    // +   improved by: djmix
	    // *     example 1: basename('/www/site/home.htm', '.htm');
	    // *     returns 1: 'home'

	    var b = path.replace(/^.*[\/\\]/g, '');
	    if (typeof(suffix) == 'string' && b.substr(b.length-suffix.length) == suffix) {
	        b = b.substr(0, b.length-suffix.length);
	    }
	    return b;
	}

//************************************************************
// Tabelle Linie MousOver / MousOut



	function MouseOverLine(obj,sKlasse) {

		if (obj != null && sKlasse != null)
		{
			obj.className = sKlasse;
		}
	}


	function MouseOutLine(obj,sKlasse) {

		if (obj != null && sKlasse != null)
		{
			obj.className = sKlasse;
		}
	}






//************************************************************
// Popup


	function hald_openwin(myfile,width,height){
		if( !width ) width = 400;
		if( !height ) height = 400;
		var now=new Date()
		winname="a" + now.getTime()
		params = "width="+width+",height="+height+",resizable=1,status=1,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0 ";
		newwin = window.open( myfile, winname , params)
		if( window.focus ) newwin.focus();
	}

	function hald_openwinfix(myfile,width,height){
		if( !width ) width = 400;
		if( !height ) height = 400;
		var now=new Date()
		winname="a" + now.getTime()
		params = "width="+width+",height="+height+",resizable=0,status=1,scrollbars=0,toolbar=0,location=0,directories=0,menubar=0 ";
		newwin = window.open( myfile, winname , params)
		if( window.focus ) newwin.focus();
	}

	function openObjectEdit(iPK) {
		hald_openwin('gewerbeobjekt-edit.php?obj_pk='+iPK+'&PHPSESSID='+sPhpSessionID, 960, 650);
	}

	function openObjectRead(iPK) {
		hald_openwin('gewerbeobjekt.php?obj_pk='+iPK+'&PHPSESSID='+sPhpSessionID, 960, 650);
	}

	function openAnfrage(iPK) {
		hald_openwin('anfrage-detail.php?anfr_pk='+iPK+'&PHPSESSID='+sPhpSessionID, 960, 650);
	}

	function openWeiterleiten(iPK) {
		hald_openwin('gewerbeobjekt-weiterleiten.php?obj_pk='+iPK+'&PHPSESSID='+sPhpSessionID, 550, 550);
	}

//************************************************************
