var http_request   = false;
var resized        = false;
//
var ld             = new Image();
ld.src             = TEMPLATE_DIR + '/loading.gif';
//
//var trans          = new Image();
//trans.src          = TEMPLATE_DIR + "/transparent.png";
//
var sbbuttons      = new Array();
sbbuttons[0]       = new Image();
sbbuttons[0].src   = TEMPLATE_DIR + "/butt_agb_i.png";
sbbuttons[1]       = new Image();
sbbuttons[1].src   = TEMPLATE_DIR + "/butt_agb_a.png";
sbbuttons[2]       = new Image();
sbbuttons[2].src   = TEMPLATE_DIR + "/butt_datens_i.png";
sbbuttons[3]       = new Image();
sbbuttons[3].src   = TEMPLATE_DIR + "/butt_datens_a.png";
sbbuttons[4]       = new Image();
sbbuttons[4].src   = TEMPLATE_DIR + "/butt_impress_i.png";
sbbuttons[5]       = new Image();
sbbuttons[5].src   = TEMPLATE_DIR + "/butt_impress_a.png";
sbbuttons[6]       = new Image();
sbbuttons[6].src   = TEMPLATE_DIR + "/butt_login_i.png";
sbbuttons[7]       = new Image();
sbbuttons[7].src   = TEMPLATE_DIR + "/butt_login_a.png";
sbbuttons[8]       = new Image();
sbbuttons[8].src   = TEMPLATE_DIR + "/butt_logout_i.png";
sbbuttons[9]       = new Image();
sbbuttons[9].src   = TEMPLATE_DIR + "/butt_logout_a.png";
sbbuttons[10]      = new Image();
sbbuttons[10].src  = TEMPLATE_DIR + "/butt_account_i.png";
sbbuttons[11]      = new Image();
sbbuttons[11].src  = TEMPLATE_DIR + "/butt_account_a.png";
//
var mediaimg       = new Array();
var startinfotmp;
var bigcontentbox;
var transscreen;
//
var bgbig          = new Image();
bgbig.src          = TEMPLATE_DIR + "/box_900_400_white_3_50.png";
var bgmed          = new Image();
bgmed.src          = TEMPLATE_DIR + "/box_600_280_white_3_50.png";
var contact        = new Image();
contact.src        = TEMPLATE_DIR + "/box_580_380_white_3_50.png";
var recomm         = new Image();
recomm.src         = TEMPLATE_DIR + "/box_800_370_white_3_50.png";
var itemlistbg     = new Array();
itemlistbg[0]      = new Image();
itemlistbg[0].src  = TEMPLATE_DIR + "/box_730_90_grey_3_50.png";
itemlistbg[1]      = new Image();
itemlistbg[1].src  = TEMPLATE_DIR + "/box_730_90_grey_2_30.png";
//
var bannerimg      = new Image();
bannerimg.src      = TEMPLATE_DIR + "/banner.png";
var contactimg     = new Image();
contactimg.src     = TEMPLATE_DIR + "/contact_btn.png";
var contentbottimg = new Image()
contentbottimg.src = TEMPLATE_DIR + "/content_bott.png";
var contentcentimg = new Image()
contentcentimg.src = TEMPLATE_DIR + "/content_center.png";
var contenttopimg  = new Image();
contenttopimg.src  = TEMPLATE_DIR + "/content_top.png";

//var copyrightimg   = new Image();
//contenttopimg.src  = TEMPLATE_DIR + "/copyr.png";

var germanmap      = new Image();
contenttopimg.src  = KARTEN_DIR   + "/d_karte2.png";
var footerimg      = new Image();
contenttopimg.src  = TEMPLATE_DIR + "/footer.png";
var infoboximg     = new Image();
contenttopimg.src  = TEMPLATE_DIR + "/infobox.png";
var logoimg        = new Image();
contenttopimg.src  = TEMPLATE_DIR + "/logo.png";
var recommimg      = new Image();
contenttopimg.src  = TEMPLATE_DIR + "/recomm_btn.png";
var startsearchimg = new Image();
contenttopimg.src  = TEMPLATE_DIR + "/startsearchbox.png";
//
var regimg         = new Image();
regimg.src         = KARTEN_DIR + '/region_1.png';
//
var tabimgs        = new Array();
tabimgs[0]         = new Image();
tabimgs[0].src     = TEMPLATE_DIR + "/menu_hd_a.png";
tabimgs[1]         = new Image();
tabimgs[1].src     = TEMPLATE_DIR + "/menu_gh_a.png";
//
var normkat        = new Array();
var overkat        = new Array();
//normkat[x]        = new Image();
//normkat[x].src    = 'katimg.php?filename=cat_16.jpg&grayscale=1&sig=2.5&op=40';
//
/******************************************************************************/
function HideObj( ObjID ) { 
 var PObj = document.getElementById( ObjID );
 if ( PObj ) { PObj.style.display ='none'; } 
 }
/******************************************************************************/
function ShowObj( ObjID ) { 
 var PObj = document.getElementById( ObjID );
 if ( PObj ) { PObj.style.display ='block'; }
 }
/******************************************************************************/
function VisibleObj( ObjID ) { 
 var PObj = document.getElementById( ObjID );
 if ( PObj ) { PObj.style.visibility='visible'; }
 }
/******************************************************************************/
function UnVisibleObj( ObjID ) { 
 var PObj = document.getElementById( ObjID );
 if ( PObj ) { PObj.style.visibility='visible'; }
 }
/******************************************************************************/
function ColorObj( ObjID, ObjColor ) { 
 var PObj = document.getElementById( ObjID );
 if ( PObj ) { PObj.style.color = ObjColor; } 
 }
/******************************************************************************/
function BackColorObj( ObjID, ObjColor ) { 
 var PObj = document.getElementById( ObjID );
 if ( PObj ) { PObj.style.backgroundColor = ObjColor; } 
 }
/******************************************************************************/
function setObjValue( ObjID, ObjValue ) {
  Obj = document.getElementById(ObjID);
  if ( Obj ) { Obj.value = ObjValue; }
 }
/******************************************************************************/
function setObjHtml( ObjID, ObjHTML ) {
  Obj = document.getElementById(ObjID);
  if ( Obj ) { Obj.innerHTML = ObjHTML; }
 }
/******************************************************************************/
function GetCenterLeft( ObjWidth ) {
  return ( screen.width / 2 ) - ( ObjWidth / 2 );
 }
/******************************************************************************/
function GetCenterTop( ObjHeight ) {
  return ( screen.height / 2 ) - ( ObjHeight / 2 );
 }
/******************************************************************************/
/******************************************************************************/
/******************************************************************************/
function IsLoadetScript( SrcURL ) {
  RetValue = false;
  HeadData = document.getElementsByTagName('HEAD');
  if ( HeadData ) { ScriptTags = HeadData[0].getElementsByTagName("SCRIPT"); for( var no = 0; no < ScriptTags.length; no++ ) { if ( ScriptTags[no].src == SrcURL ){ RetValue = true; } } }
  return RetValue;
 }
/******************************************************************************/
function includeExt ( sFileName ) {
	var objHead    = document.getElementsByTagName('head');
  if ( IsLoadetScript( sFileName ) == false ) {	
	   var objScript  = document.createElement('script');
	   objScript.type = 'text/javascript';
	   objScript.src  = sFileName;
	   objHead[0].appendChild(objScript);
	  } //else { alert( 'Script wurde bereits geladen' ); }
 }
/******************************************************************************/ 
function Change_Tab( TabObjID, NewPage ) {
  var OldTab;
  ShowPan = null; 
  OldEdit = document.getElementById( TabObjID );
   if( OldEdit ) {
      var DivTags = OldEdit.getElementsByTagName("DIV");
      for( var no = 0; no < DivTags.length; no++ ) { 
          Attr  = DivTags[no].getAttribute("panel"); 
          ObjID = DivTags[no].id; 
          if ( Attr ){ DivTags[no].style.display = 'none'; }
         }
      ShowPan = document.getElementById( 'panel_' + NewPage );
      if ( ShowPan ) { ShowPan.style.display = 'block'; }
     }
 }
/******************************************************************************/
 function ShowVideo( VideoID ) {
  var theVideo     = document.getElementById( VideoID );
   if( theVideo ) { 
      theVideo.style.display = 'table-row';
     }
 }   
/******************************************************************************/
 function HideVideo( VideoID ) {
  var theVideo     = document.getElementById( VideoID );
   if( theVideo ) { 
      theVideo.style.display = 'none';
     }
 } 
/******************************************************************************/
function pageloaded() {
	document.getElementById('site').style.visibility='visible';
	ItemObj = document.getElementById('loadingimg');
	if ( ItemObj ) { document.body.removeChild(document.getElementById('loadingimg')); };
  //ORIG document.body.removeChild(document.getElementById('loadingimg'));	
 }
/******************************************************************************/
function itemloaded() { 
  ItemObj = document.getElementById('trans');
	if ( ItemObj ) { ItemObj.style.visibility='visible';	}
 }
/******************************************************************************/
function sbover(caller) {
	if(caller.id=="agbbtn")     { caller.src=sbbuttons[1].src;  }
	if(caller.id=="datensbtn")  { caller.src=sbbuttons[3].src;  }
	if(caller.id=="impressbtn") { caller.src=sbbuttons[5].src;  }
	if(caller.id=="loginbtn")   { caller.src=sbbuttons[7].src;  }
	if(caller.id=="logoutbtn")  { caller.src=sbbuttons[9].src;  }
	if(caller.id=="accountbtn") { caller.src=sbbuttons[11].src; }
 }
/******************************************************************************/
function sbout(caller) {
	if(caller.id=="agbbtn")     { caller.src=sbbuttons[0].src;  }
	if(caller.id=="datensbtn")  { caller.src=sbbuttons[2].src;  }
	if(caller.id=="impressbtn") { caller.src=sbbuttons[4].src;  }
	if(caller.id=="loginbtn")   { caller.src=sbbuttons[6].src;  }
	if(caller.id=="logoutbtn")  { caller.src=sbbuttons[8].src;  }
	if(caller.id=="accountbtn") { caller.src=sbbuttons[10].src; }
 }
/******************************************************************************/
function regout() {
  ItemObj = document.getElementById('inforegion');
	if ( ItemObj ) { ItemObj.style.visibility='hidden';	}
 }
/******************************************************************************/
function regover() {
  ItemObj = document.getElementById('inforegion');
	if ( ItemObj ) { ItemObj.style.visibility='visible';	}
 }
/******************************************************************************/
/******************************************************************************/
/******************************************************************************/
 function Init_GM( ) {
      Params = 'action=get_googlebox' +
               '';
  makePOSTRequestDetail( 'server.common.php', Params );
 }
/******************************************************************************/
 function ShowImpress( ) {
  makePOSTRequestDetail( 'server.common.php', 'action=get_impressum' );
 }
/******************************************************************************/
 function Print_Win( FilePrint  ) {
	var editEvent = window.open( '/print.dokument.php' + '?' + FilePrint ,'Drucken', 'width=620,height=600,' + 'left=' + GetCenterLeft( 620 ) + ',top=' + GetCenterTop( 600 ) + ',scrollbars=yes,status=no,locationbar=no,location=no,menubar=yes,directories=no,dependent=yes');
	//editEvent.focus();
 }
/******************************************************************************/
 function setSiteHSize( ) {
	var browserheight;
  //
	if(navigator.appName=="Microsoft Internet Explorer") {
		 browserheight=document.documentElement.clientHeight;
	  } else { browserheight=window.innerHeight; }
  //
	cch = browserheight - 421;
	//cch = browserheight - 421;

	cbt = 261 + cch;

	//ft  = browserheight - 40;
	ft  = browserheight - 40;

	ch  = browserheight - 181;
	//
	document.getElementById('site').style.marginTop='0px';
	document.getElementById('site').style.top='0px';
	document.getElementById('content_center').style.height = cch +'px';
	document.getElementById('content_bottom').style.top =cbt + 'px';
	document.getElementById('footer').style.top =ft + 'px';
	document.getElementById('content').style.height=ch + 'px';
	document.getElementById('content').style.overflow='auto';
/**/
  //
  if (document.getElementById('toolbar')) {
     document.getElementById('toolbar').style.height=( ch-50 )+'px';
	   VisibleObj( 'regionbtn' );
	   VisibleObj( 'recommbtn2' );
	   VisibleObj( 'contactbtn2' );
	   VisibleObj( 'regionsearchbox' );
    }
  //  
	var katimgs = document.getElementsByTagName('div');
	for(var i = 0; i < katimgs.length;i++) { 
      var katimg = katimgs[i];
      if(katimg.className == 'katimg') { katimg.style.visibility='visible'; }
	   }	
   resized=true;	
  }
/******************************************************************************/
function MakeRequestData(url, parameters) {
	http_request = false;
  if (window.XMLHttpRequest) { // Mozilla, Safari,...
      http_request = new XMLHttpRequest();
      if (http_request.overrideMimeType) {
      	// set type accordingly to anticipated content type
        //http_request.overrideMimeType('text/xml');
        http_request.overrideMimeType('text/html');
      }
    } else if (window.ActiveXObject) { // IE
       try {
          http_request = new ActiveXObject("Msxml2.XMLHTTP");
       } catch (e) {
          try {
             http_request = new ActiveXObject("Microsoft.XMLHTTP");
          } catch (e) {}
       }
    }
    if (!http_request) {
       alert('Cannot create XMLHTTP instance');
       return false;
    }
    //http_request.onreadystatechange = alertContents;
    http_request.onreadystatechange = function() {//Call a function when the state changes.
  	if(http_request.readyState == 4 && http_request.status == 200) {
       eval(http_request.responseText);
	    }
    }    
    //http_request.open('POST', url, false);
    http_request.open('POST', url, true);
    http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    http_request.setRequestHeader("Content-length", parameters.length);
    http_request.setRequestHeader("Connection", "close");
    http_request.send(parameters);
 }
/******************************************************************************/
function makePOSTRequestDetail(url, parameters)
{
	http_request = false;
    if (window.XMLHttpRequest) { // Mozilla, Safari,...
       http_request = new XMLHttpRequest();
       if (http_request.overrideMimeType) {
       	// set type accordingly to anticipated content type
          //http_request.overrideMimeType('text/xml');
          http_request.overrideMimeType('text/html');
       }
    } else if (window.ActiveXObject) { // IE
       try {
          http_request = new ActiveXObject("Msxml2.XMLHTTP");
       } catch (e) {
          try {
             http_request = new ActiveXObject("Microsoft.XMLHTTP");
          } catch (e) {}
       }
    }
    if (!http_request) {
       alert('Cannot create XMLHTTP instance');
       return false;
    }
    //http_request.onreadystatechange = alertContents;
    
    http_request.onreadystatechange = function() {//Call a function when the state changes.
  	if(http_request.readyState == 4 && http_request.status == 200) {
      eval(http_request.responseText);
	    }
    }    
    //http_request.open('POST', url, false);
    http_request.open('POST', url, true);
    http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    http_request.setRequestHeader("Content-length", parameters.length);
    http_request.setRequestHeader("Connection", "close");
    http_request.send(parameters);
 }
/******************************************************************************/
function ShowDetail( DeatilID ) {
 ItemObj = document.getElementById('trans_');
	if ( ItemObj ) { 
     ItemObj.style.display='block';
     makePOSTRequestDetail( 'server.common.php', 'action=show_details' + '&id=' + DeatilID );	
    }
 }
/******************************************************************************/
function HideDetail( DeatilID ) {
  HideObj('itembox_id');
  HideObj('trans_');
 }
/******************************************************************************/
 function Set_CatBackGr( ObjID, ImgUrl, BorderCol ) {
   Obj = document.getElementById( ObjID );
   if ( Obj ) { 
     Obj.style.backgroundImage="url("+ImgUrl+")";
    }
  } 
/******************************************************************************/
function katover(img) {
   Obj = document.getElementById( 'katimg_' + img );
   if ( Obj ) { 
     Obj.style.backgroundImage="url("+overkat[img].src+")";
    }   
  document.getElementById('kattxt_'+img).style.fontWeight='bold';
 }
/******************************************************************************/
function katout(img) {
  if ( DEFAULT_COLOR == 'GRAY' ) {
      Set_CatBackGr( 'katimg_'+img , MEDIA_DIR + '/categorien/' + 'cat_' + img + '_gray.jpg' , '#000000' );
     } else {
            Set_CatBackGr( 'katimg_'+img , MEDIA_DIR + '/categorien/' + 'cat_' + img + '.jpg' , '#000000' );
            }
  document.getElementById('kattxt_'+img).style.fontWeight='normal';
 }
/******************************************************************************/
function SendMail( ToMail, MailBetr ) {
  var body  = '';//Sehr geehrte Damen und Herren,%0A%0A';
      //body+ = ''
  location.href = "mailto:"+ToMail+"?subject="+MailBetr+"&body=" + body;
 }
/******************************************************************************/
function changeMedia(caller) { 
 switch(caller.id) {
  case "medimg1":
   document.getElementById("bigmedia").src = mediaimg[0].src;
   break;
  case "medimg2":
   document.getElementById("bigmedia").src = mediaimg[1].src;
   break;
  case "medimg3":
   document.getElementById("bigmedia").src = mediaimg[2].src;
   break;
  }
}
/******************************************************************************/
function showRegionInfo(name,text,img) {
	startinfotmp=document.getElementById('startinfobox').innerHTML;
	//document.getElementById('startinfobox').innerHTML = "<h1>"+name+"</h1><img style=\"float:left;padding-top:5px;\" src=\"" + KARTEN_DIR + "/"+img+"\" alt=\""+name+"\" title=\""+name+"\"/><div style=\"float:left;padding-left:10px;\">"+text+"</div>";
	document.getElementById('startinfobox').innerHTML = "<center><h1>"+name+"</h1><img style=\"padding-top:5px;padding-right:5px;\" src=\"" + KARTEN_DIR + "/"+img+"\" alt=\""+name+"\" title=\""+name+"\"/><div>"+text+"</div></center>";

}
/******************************************************************************/
function hideRegionInfo() {
	document.getElementById('startinfobox').innerHTML = startinfotmp;
 }
/******************************************************************************/
function getBigContentBox(title,source) {
	if(bgbig.complete==true) {
		transscreen = document.createElement('div');
		transscreen.setAttribute('id', 'trans');
		document.body.appendChild(transscreen);
		bigcontentbox = document.createElement('div');
		bigcontentbox.setAttribute('id', 'bigcontentbox');
		transscreen.appendChild(bigcontentbox);
		bigcontentcontent = document.createElement('div');
		bigcontentcontent.setAttribute('id', 'bigcontentcontent');
		bigcontentbox.appendChild(bigcontentcontent);
		var headline = document.createElement('h1');
		var headcontent = document.createTextNode(title);
		bigcontentbox.appendChild(headline);
		headline.appendChild(headcontent);
		var loadingimg = document.createElement('img');
		loadingimg.setAttribute('src', TEMPLATE_DIR + '/loading.gif');
		loadingimg.setAttribute('id', 'loadingimg');
		bigcontentcontent.appendChild(loadingimg);
		var req = null;
		try { req=new XMLHttpRequest(); }
		catch(ms) {
			try { req=new ActiveXObject("Msxml2.XMLHTTP"); }
			catch(nonms) {
				try {	req = new ActiveXObject("Microsoft.XMLHTTP");	}
				catch(failed) { req=null;
				}
			}
		}
		req.open("GET", source, true);
		req.onreadystatechange=function()
		{
			switch(req.readyState)
			{
				case 4:
					if(req.status!=200)
					{
						alert("Fehler: "+req.status);
					}
					else
					{
						document.getElementById('bigcontentcontent').innerHTML=req.responseText;
						closelnk = document.createElement('a');
						closelnk.setAttribute('href', '#');
						
						closeimg = document.createElement('img');
						closeimg.setAttribute('src', TEMPLATE_DIR + '/close.png');
						closeimg.setAttribute('style','position:absolute; left:865px;top:5px;border:none 0px;');
						closeimg.onclick=function()
						{
							closeContentBox();
						}
						closelnk.appendChild(closeimg);
						bigcontentbox.appendChild(closelnk);
					}
					break;
				default:
					return false;
					break;
			}
		}
		req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		req.send(null);
	}
}
function getMedContentBox(title,source)
{
	if(bgmed.complete==true)
	{
		transscreen = document.createElement('div');
		transscreen.setAttribute('id', 'trans');
		document.body.appendChild(transscreen);
		medcontentbox = document.createElement('div');
		medcontentbox.setAttribute('id', 'medcontentbox');
		transscreen.appendChild(medcontentbox);
		medcontentcontent = document.createElement('div');
		medcontentcontent.setAttribute('id', 'medcontentcontent');
		medcontentbox.appendChild(medcontentcontent);
		var headline = document.createElement('h1');
		headline.setAttribute('style', 'padding-left:20px;');
		var headcontent = document.createTextNode(title);
		medcontentbox.appendChild(headline);
		headline.appendChild(headcontent);
		var req = null;
		try
		{
			req=new XMLHttpRequest();
		}
		catch(ms)
		{
			try
			{
				req=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch(nonms)
			{
				try
				{
					req = new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch(failed)
				{
					req=null;
				}
			}
		}
		req.open("GET", source, true);
		req.onreadystatechange=function()
		{
			switch(req.readyState)
			{
				case 4:
					if(req.status!=200)
					{
						alert("Fehler: "+req.status);
					}
					else
					{
						document.getElementById('medcontentcontent').innerHTML=req.responseText;
						closelnk = document.createElement('a');
						closelnk.setAttribute('href', 'javascript:void(0);');
						closeimg = document.createElement('img');
						closeimg.setAttribute('src', TEMPLATE_DIR + '/close.png');
						closeimg.onclick=function()
						{
							closeContentBox();
						}
						closelnk.appendChild(closeimg);
						medcontentbox.appendChild(closelnk);
					}
					break;
				default:
					return false;
					break;
			}
		}
		req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		req.send(null);
	}
}
/******************************************************************************/
function closeContentBox() {
	document.body.removeChild(document.getElementById('trans'));
}
/******************************************************************************/
var Contact_Box = 'contactbox';
function Check_DataContact()
{      
 RetCode = true;
 contactbox_ = document.getElementById(Contact_Box);
 if ( contactbox_ ) {
    ErrorTxT = 'Bitte ';Seper = '';
    if ( document.getElementById( 'contact_name' ).value == '' ) { RetCode = false; document.getElementById( 'conname_txt' ).style.color = '#ff0000'; ErrorTxT = ErrorTxT  + 'Namen'; Seper = Seper + ', '; }
    if ( document.getElementById( 'contact_txt' ).value == '' )  { RetCode = false; document.getElementById( 'con_txt' ).style.color = '#ff0000'; ErrorTxT = ErrorTxT  + Seper + 'Nachricht'; Seper = Seper + ', '; }
    ErrorTxT = ErrorTxT  + ' angeben.';
    if ( RetCode == false ) { Obj = document.getElementById( 'status_txt' );Obj.style.color='#ff0000'; Obj.innerHTML = ErrorTxT; setTimeout("HideObj( 'status_txt' )", 20000 ); setTimeout("ColorObj( 'conname_txt', '#000000' )", 20000 ); setTimeout("ColorObj( 'con_txt', '#000000' )", 20000 );  }
    }
 return RetCode;   
}
/******************************************************************************/
function send_contact() {
 contactbox_ = document.getElementById(Contact_Box);
 Params        = '';
  if ( contactbox_ ) {
   document.getElementById( 'send_btn' ).disabled = true;

   if ( Check_DataContact() == true ) {  
      Params = 'action=send_contact' +
               '&from='     + encodeURIComponent( document.getElementById( 'contact_name' ).value ) +
               '&fromtel='  + encodeURIComponent( document.getElementById( 'contact_tel' ).value )  +
               '&frommail=' + encodeURIComponent( document.getElementById( 'contact_mail' ).value ) +
               '&fromtxt='  + encodeURIComponent( document.getElementById( 'contact_txt' ).value )  +
               '&phone_me=' + encodeURIComponent( document.getElementById( 'contact_phoneme' ).checked ) +
               '';
      makePOSTRequestDetail( 'server.common.php', Params );
     } else { document.getElementById( 'send_btn' ).disabled = false; }
    } //else { alert( 'Fehler' ); }
}
/******************************************************************************/
function Check_DataLogin() {
 RetCode = true;
 //
 NObj = document.getElementById( 'user_name' );
 PObj = document.getElementById( 'user_pass' );
 if ( NObj ) { 
  if ( PObj ) { 
     if ( NObj.value == '' ) { RetCode = false; }
     if ( PObj.value == '' ) { RetCode = false; }
     } else { RetCode = false; }
    } else { RetCode = false; }
 return RetCode;        
}
/******************************************************************************/
function exit_input( Obj ) {
  if ( Obj ) {
      if( Obj.id == 'user_name' ) { if( Obj.value == '' ) { Obj.value = 'Benutzername'; } }
      if( Obj.id == 'user_pass' ) { if( Obj.value == '' ) { Obj.value = 'Passwort'; } }
     }
 }
/******************************************************************************/
function focus_input( Obj ) {
  if ( Obj ) {
      if( Obj.id == 'user_name' ) { if( Obj.value == 'Benutzername' ) { Obj.value = ''; } }
      if( Obj.id == 'user_pass' ) { if( Obj.value == 'Passwort' )     { Obj.value = ''; } }
     }
 }
/******************************************************************************/
function send_login() {
  if ( Check_DataLogin() == true ) {  
      MakeRequestData( 'server.common.php', 'action=send_login' + '&user='+ encodeURIComponent( document.getElementById( 'user_name' ).value ) + '&pass=' + encodeURIComponent( document.getElementById( 'user_pass' ).value ) );
     }
 }
/******************************************************************************/
function send_logout() {
  MakeRequestData( 'server.common.php', 'action=send_logout'  );
 }
/******************************************************************************/
function showLoginBox() {
  MakeRequestData( 'server.common.php', 'action=get_loginbox' );
 }
/******************************************************************************/
function hideLoginBox() {
  MakeRequestData( 'server.common.php', 'action=close_loginbox' );
 } 
/******************************************************************************/
function get_myaccount() {
  MakeRequestData( 'server.common.php', 'action=get_myaccount' );
 } 
/******************************************************************************/
function showVideoBox( ShID ) {
  MakeRequestData( 'server.common.php', 'action=get_videobox' + '&id=' + ShID );
 }
/******************************************************************************/
function hideVideoBox() {
  MakeRequestData( 'server.common.php', 'action=close_videobox' );
 } 
/******************************************************************************/
function showContactBox() {
	if(recomm.complete==true)
	{
    contactbox_ = document.getElementById(Contact_Box);
    if ( contactbox_ ) {
        OnClick_      = "send_contact()";
        OnClickClose_ = "hideContactBox()";
        /**********************************************************************/
        OutTblInp = '<table cellspacing="0" cellpadding="0" border="0" style="border:0px;padding:0px;margin:0px;height:20px;font-size:12px;font-family:Arial, Helvetica;"><tbody>';
        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td style="width:100px;vertical-align:middle;text-align:left;padding-left:2px;padding-top:2px;"><b id="conname_txt">Ihr Name:</b></td>';
        OutTblInp = OutTblInp + '</tr>';
        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td style="vertical-align:middle;text-align:right;padding-left:2px;padding-right:12px;"><input name="name" id="contact_name" type="text" style="width:250px;border:1px solid #000000;"></td>';
        OutTblInp = OutTblInp + '</tr>';
        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td style="width:100px;vertical-align:middle;text-align:left;padding-left:3px;padding-top:2px;"><b>Ihre eMailadresse:</b></td>';
        OutTblInp = OutTblInp + '</tr>';
        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td style="vertical-align:middle;text-align:right;padding-left:2px;padding-right:12px;"><input name="email" id="contact_mail" type="text" style="width:250px;border:1px solid #000000;"></td>';
        OutTblInp = OutTblInp + '</tr>';
        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td style="vertical-align:middle;text-align:left;padding-left:2px;padding-top:3px;"><b>Ihre Telefonnummer:</b></td>';
        OutTblInp = OutTblInp + '</tr>';
        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td style="vertical-align:middle;text-align:right;padding-left:2px;padding-right:12px;"><input name="tel" id="contact_tel" type="text" style="width:250px;border:1px solid #000000;"></td>';
        OutTblInp = OutTblInp + '</tr>';
        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td style="vertical-align:middle;text-align:left;height:4px;font-size:1px;">&nbsp;</td>';
        OutTblInp = OutTblInp + '</tr>';
        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td style="vertical-align:middle;text-align:left;padding-left:2px;"><b>Wünschen Sie einen Rückruf?</b>&nbsp;&nbsp;<input style="width:20px;" id="contact_phoneme" name="phoneme" type="checkbox"></td>';
        OutTblInp = OutTblInp + '</tr>';
        OutTblInp = OutTblInp + '<tbody></table>';
        /**********************************************************************/
        OutTblBtn = '<table cellspacing="0" cellpadding="0" border="0" style="border:0px;padding:0px;margin:0px;height:20px;" align="right"><tbody>';
        OutTblBtn = OutTblBtn + '<tr>';
        //OutTblBtn = OutTblBtn + '<td style="width:100px;vertical-align:middle; text-align:left;"><input id="send_btn" name="sendbtn" value="Senden" type="button" style="width:100px;" onclick="' + OnClick_ + '"></td>';
        //OutTblBtn = OutTblBtn + '<td style="width:100px;vertical-align:middle; text-align:left ;padding-left:5px;"><input id="cancel_btn" name="cancelbtn" value="Abbrechen" type="button" style="width:100px;" onclick="' + OnClickClose_ + '"></td>';
        OutTblBtn = OutTblBtn + '<td style="width:100px;vertical-align:middle; text-align:right;padding-right:5px;"><input id="send_btn" name="sendbtn" value="Senden" type="button" style="width:100px;" onclick="' + OnClick_ + '"></td>';
        OutTblBtn = OutTblBtn + '<td style="width:100px;vertical-align:middle; text-align:right;"><input id="cancel_btn" name="cancelbtn" value="Abbrechen" type="button" style="width:100px;" onclick="' + OnClickClose_ + '"></td>';
        OutTblBtn = OutTblBtn + '</tr>';
        OutTblBtn = OutTblBtn + '<tbody></table>';
        /**********************************************************************/
        /**********************************************************************/
        OutTbl = '<table cellspacing="5" cellpadding="0" border="0" style="width:100%;height:100%; border:0px;padding:0px;margin:0px;"><tbody>';
        OutTbl = OutTbl + '<tr>';
        OutTbl = OutTbl + '<td style="width:50%;height:28px;vertical-align:middle; text-align:left;padding-left:8px;font-size:16px;font-weight:bold;">Senden Sie uns eine Nachricht</td>';
        OutTbl = OutTbl + '<td style="vertical-align:middle; text-align:right;padding-right:18px;padding-top:2px;"><img src="' + TEMPLATE_DIR + '/close.png" alt="close" onclick="hideContactBox()"></td>';
        OutTbl = OutTbl + '</tr>';
        OutTbl = OutTbl + '<tr>';
        OutTbl = OutTbl + '<td style="height:100px;vertical-align:middle;text-align:center;padding:0px;margin:0px;padding-left:20px;"><img style="vertical-align:middle;text-align:center;" src="' + TEMPLATE_DIR + '/contact_big.jpg" alt="Nehmen Sie konntakt mit uns auf..." Title="Nehmen Sie konntakt mit uns auf..." /></td>';
        OutTbl = OutTbl + '<td style="vertical-align:middle; text-align:left;padding-right:8px;">' + OutTblInp + '</td>';
        OutTbl = OutTbl + '</tr>';
        OutTbl = OutTbl + '<tr>';
        OutTbl = OutTbl + '<td colspan="2" style="height:25px;vertical-align:bottom; text-align:left;padding-left:20px;"><b id="con_txt">Ihre Nachricht:</b></td>';
        OutTbl = OutTbl + '</tr>';
        OutTbl = OutTbl + '<tr>';
        OutTbl = OutTbl + '<td colspan="2" style="vertical-align:top; text-align:center;padding-right:8px;"><textarea name="contacttxt" id="contact_txt" style="border:1px solid #000000;height:115px;width:520px;overflow:scroll;"></textarea></td>';
        OutTbl = OutTbl + '</tr>';
        OutTbl = OutTbl + '<tr>';
        //OutTbl = OutTbl + '<td style="width:50%;height:20px;vertical-align:middle; text-align:left;padding:0px;margin:0px;padding-left:25px;padding-bottom:15px;">'+OutTblBtn+'</td>';
        //OutTbl = OutTbl + '<td style="vertical-align:middle; text-align:left;padding-bottom:12px;"><div id="status_txt">&nbsp;</div></td>';
        OutTbl = OutTbl + '<td style="width:50%;height:20px;vertical-align:middle; text-align:left;padding-bottom:12px;padding-left:20px;"><div id="status_txt">&nbsp;</div></td>';
        OutTbl = OutTbl + '<td style="vertical-align:middle;text-align:right;padding:0px;margin:0px;padding-right:30px;padding-bottom:15px;">'+OutTblBtn+'</td>';
        OutTbl = OutTbl + '</tr>';
        OutTbl = OutTbl + '</tbody></table>';            
        /**********************************************************************/
        contactbox_.innerHTML = OutTbl;
        ShowObj('trans_');
        ShowObj('contactbox');
       } 
   }
 }
/******************************************************************************/
function hideContactBox() {
 contactbox_ = document.getElementById(Contact_Box);
 if ( contactbox_ ) {
    HideObj(Contact_Box);
    HideObj('trans_');
    contactbox_.innerHTML = '';
   }
 }
/******************************************************************************/
function Check_DataEmpfehl() {      
 RetCode = true;
 contactbox_ = document.getElementById('recommbox');
 if ( contactbox_ ) {
    ErrorTxT = 'Bitte ';Seper = '';
    if ( document.getElementById( 'recomm_for' ).value == '' ) { RetCode = false; document.getElementById( 'name_txt' ).style.color = '#ff0000'; ErrorTxT = ErrorTxT  + 'Firmen-Namen'; Seper = Seper + ', '; }
    if ( document.getElementById( 'comment' ).value == '' )  { RetCode = false; document.getElementById( 'comment_txt' ).style.color = '#ff0000'; ErrorTxT = ErrorTxT  + Seper + 'Nachricht'; Seper = Seper + ', '; }
    ErrorTxT = ErrorTxT  + ' angeben.';                                                                                                                                                         
    if ( RetCode == false ) { Obj = document.getElementById( 'status_txt' );Obj.style.color='#ff0000'; Obj.innerHTML = ErrorTxT; ShowObj( 'status_txt' ); setTimeout("HideObj( 'status_txt' )", 20000 ); setTimeout("ColorObj( 'name_txt', '#000000' )", 20000 ); setTimeout("ColorObj( 'comment_txt', '#000000' )", 20000 ); }
    }
  return RetCode;        
 }
/******************************************************************************/
function send_empfehlung() {
 recommbox_ = document.getElementById('recommbox');
 Params        = '';
 if ( recommbox_ ) {
   document.getElementById( 'send_btn' ).disabled = true;

   if ( Check_DataEmpfehl() == true ) { 
      Params = 'action=send_empfehlung' +
               '&firma='     + encodeURIComponent( document.getElementById( 'recomm_for' ).value ) +
               '&branche='  + encodeURIComponent( document.getElementById( 'recomm_branche' ).value )  +
               '&strasse=' + encodeURIComponent( document.getElementById( 'recomm_street' ).value ) +
               '&plz='  + encodeURIComponent( document.getElementById( 'recomm_plz' ).value )  +
               '&ort='  + encodeURIComponent( document.getElementById( 'recomm_ort' ).value )  +
               '&comment=' + encodeURIComponent( document.getElementById( 'comment' ).value ) +
               '';
       makePOSTRequestDetail( 'server.common.php', Params );
      } else { document.getElementById( 'send_btn' ).disabled = false; }
    }
 }
/******************************************************************************/
function showRecommBox() {
	if(recomm.complete==true) {
    recommbox_ = document.getElementById('recommbox');
    if ( recommbox_ ) {
        OnClick_      = "send_empfehlung()";
        OnClickClose_ = "hideRecommBox()";
        /**********************************************************************/
        OutTblInp = '<table cellspacing="0" cellpadding="0" border="0" style="border:0px;padding:0px;margin:0px;height:20px;font-size:12px;font-family:Arial, Helvetica;"><tbody>';
        
        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td colspan="4" style="padding:0px;margin:0px;font-size:1px;line-height:0px;height:5px;">&nbsp;</td>';
        OutTblInp = OutTblInp + '</tr>';
        
        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td style="width:170px;vertical-align:middle;text-align:left;padding-left:2px;padding-top:2px;"><b id="name_txt">Name Ihrer Empfehlung</b></td>';
        OutTblInp = OutTblInp + '<td colspan="3" style="vertical-align:middle;text-align:left;padding-left:2px;padding-right:12px;"><input name="name" id="recomm_for" type="text" style="width:250px;border:1px solid #000000;"></td>';
        OutTblInp = OutTblInp + '</tr>';/**/

        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td colspan="4" style="padding:0px;margin:0px;font-size:1px;line-height:0px;height:5px;">&nbsp;</td>';
        OutTblInp = OutTblInp + '</tr>';

        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td style="vertical-align:middle;text-align:left;padding-left:2px;padding-top:2px;"><b id="recomm_branchetxt">Branche</b></td>';
        OutTblInp = OutTblInp + '<td colspan="3" style="vertical-align:middle;text-align:left;padding-left:2px;padding-right:12px;"><input type="text" name="recommbranche" id="recomm_branche" style="width:250px;border:1px solid #000000;"></td>';
        OutTblInp = OutTblInp + '</tr>';/**/
        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td colspan="4" style="padding:0px;margin:0px;font-size:1px;line-height:0px;height:5px;">&nbsp;</td>';
        OutTblInp = OutTblInp + '</tr>';

        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td style="vertical-align:middle;text-align:left;padding-left:2px;padding-top:2px;"><b id="recomm_streettxt">Strasse / Haus-Nr.</b></td>';
        OutTblInp = OutTblInp + '<td colspan="3" style="vertical-align:middle;text-align:left;padding-left:2px;padding-right:12px;"><input type="text" name="street" id="recomm_street" style="width:250px;border:1px solid #000000;"></td>';
        OutTblInp = OutTblInp + '</tr>';/**/

        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td colspan="4" style="padding:0px;margin:0px;font-size:1px;line-height:0px;height:5px;">&nbsp;</td>';
        OutTblInp = OutTblInp + '</tr>';
        
        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td style="vertical-align:middle;text-align:left;padding-left:2px;padding-top:2px;"><b>Postleitzahl / Ort</b></td>';
        OutTblInp = OutTblInp + '<td style="padding-left:2px;"><input style="width:62px; border:1px solid #000000;" type="text" name="recommplz" id="recomm_plz"></td>';
        OutTblInp = OutTblInp + '<td>&nbsp;</td>';
        OutTblInp = OutTblInp + '<td style="vertical-align:middle;text-align:right;padding-right:12px;"><input name="name" id="recomm_ort" type="text" style="width:173px;border:1px solid #000000;"></td>';
        OutTblInp = OutTblInp + '</tr>';

        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td colspan="4" style="padding:0px;margin:0px;font-size:1px;line-height:0px;height:10px;">&nbsp;</td>';
        OutTblInp = OutTblInp + '</tr>';

        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td colspan="4" style="vertical-align:middle;text-align:left;padding-left:2px;padding-right:12px;" id="comment_txt">Kommentar (z.B. Telefonnummer, E-Mailadresse, etc.):</td>';
        OutTblInp = OutTblInp + '</tr>';

        OutTblInp = OutTblInp + '<tr>';
        OutTblInp = OutTblInp + '<td colspan="4" style="padding:0px;padding-left:2px;padding-right:12px;margin:0px;font-size:12px;line-height:0px;height:5px;"><textarea id="comment" name="commenttxt" style="border:1px solid #000000;width:420px;height:90px;overflow:scroll;"></textarea></td>';
        OutTblInp = OutTblInp + '</tr>';

        OutTblInp = OutTblInp + '<tbody></table>';
        /**********************************************************************/
        OutTblBtn = '<table cellspacing="0" cellpadding="0" border="0" style="border:0px;padding:0px;margin:0px;height:20px;" align="right"><tbody>';
        OutTblBtn = OutTblBtn + '<tr>';
        //OutTblBtn = OutTblBtn + '<td style="width:100px;vertical-align:middle; text-align:left;"><input id="send_btn" name="sendbtn" value="Senden" type="button" style="width:100px;" onclick="' + OnClick_ + '"></td>';
        //OutTblBtn = OutTblBtn + '<td style="width:100px;vertical-align:middle; text-align:left;padding-left:5px;"><input id="cancel_btn" name="cancelbtn" value="Abbrechen" type="button" style="width:100px;" onclick="' + OnClickClose_ + '"></td>';
        OutTblBtn = OutTblBtn + '<td style="width:100px;vertical-align:middle; text-align:right;padding-right:5px;"><input id="send_btn" name="sendbtn" value="Senden" type="button" style="width:100px;" onclick="' + OnClick_ + '"></td>';
        OutTblBtn = OutTblBtn + '<td style="width:100px;vertical-align:middle; text-align:right;"><input id="cancel_btn" name="cancelbtn" value="Abbrechen" type="button" style="width:100px;" onclick="' + OnClickClose_ + '"></td>';

        OutTblBtn = OutTblBtn + '</tr>';
        OutTblBtn = OutTblBtn + '<tbody></table>';
        /**********************************************************************/
        /**********************************************************************/
        OutTbl = '<table cellspacing="5" cellpadding="0" border="0" style="width:100%;height:100%; border:0px;padding:0px;margin:0px;"><tbody>';
        OutTbl = OutTbl + '<tr>';
        OutTbl = OutTbl + '<td style="width:300px;height:28px;vertical-align:middle; text-align:left;padding-left:8px;font-size:16px;font-weight:bold;">Senden Sie uns Ihre Empfehlung</td>';
        OutTbl = OutTbl + '<td style="vertical-align:middle; text-align:right;padding-right:18px;padding-top:2px;"><img src="' + TEMPLATE_DIR + '/close.png" alt="Schließen" onclick="' + OnClickClose_ + '"></td>';
        OutTbl = OutTbl + '</tr>';
        OutTbl = OutTbl + '<tr>';
        OutTbl = OutTbl + '<td colspan="2" style="vertical-align:top; text-align:justify; padding-right:30px;padding-left:20px;height:4px;">Vermissen Sie Ihre Lieblingsunternehmen auf unserer Seite? Dann haben Sie hier die Möglichkeit uns eine Empfehlung zukommen zu lassen. Alle Empfehlungen werden durch unsere Redakteure bearbeitet.<br><b>Füllen Sie einfach das folgende Formular aus und senden Sie es an uns.</b></td>';
        OutTbl = OutTbl + '</tr>';
        OutTbl = OutTbl + '<tr>';
        OutTbl = OutTbl + '<td style="height:130px;vertical-align:bottom;text-align:left;padding:0px;margin:0px;padding-left:50px;"><img style="vertical-align:middle;text-align:center;" src="' + TEMPLATE_DIR + '/recomm.png" alt="" Title="" /></td>';
        OutTbl = OutTbl + '<td rowspan="2" style="vertical-align:middle; text-align:left;padding-right:12px;">' + OutTblInp + '</td>';
        OutTbl = OutTbl + '</tr>';
        OutTbl = OutTbl + '<tr>';
        OutTbl = OutTbl + '<td style="padding:0px;margin:0px;font-size:1px;line-height:0px;height:35px;">&nbsp;</td>';
        OutTbl = OutTbl + '</tr>';
        OutTbl = OutTbl + '<tr>';
        //OutTbl = OutTbl + '<td style="vertical-align:bottom; text-align:left;padding-left:25px;padding-bottom:17px;height:20px;">'+OutTblBtn+'</td>';
        //OutTbl = OutTbl + '<td style="vertical-align:bottom; text-align:left;padding-bottom:20px;"><div id="status_txt">&nbsp;</div></td>';
        OutTbl = OutTbl + '<td style="width:50%;height:20px;vertical-align:middle; text-align:left;padding-bottom:12px;padding-left:20px;"><div id="status_txt">&nbsp;</div></td>';
        OutTbl = OutTbl + '<td style="vertical-align:middle;text-align:right;padding:0px;margin:0px;padding-right:27px;padding-bottom:15px;">'+OutTblBtn+'</td>';

        OutTbl = OutTbl + '</tr>';
        OutTbl = OutTbl + '</tbody></table>';            
        /**********************************************************************/
        recommbox_.innerHTML = OutTbl;
        ShowObj('trans_');
        ShowObj('recommbox');
       }
	}
 }
/******************************************************************************/
function hideRecommBox() {
 recommbox_ = document.getElementById('recommbox');
 if ( recommbox_ ) {
    HideObj('recommbox');
    HideObj('trans_');
    recommbox_.innerHTML = '';
   }
 }
/******************************************************************************/
function makePOSTRequest(url, parameters) {
	http_request = false;
    if (window.XMLHttpRequest) { // Mozilla, Safari,...
       http_request = new XMLHttpRequest();
       if (http_request.overrideMimeType) {
       	// set type accordingly to anticipated content type
          //http_request.overrideMimeType('text/xml');
          http_request.overrideMimeType('text/html');
       }
    } else if (window.ActiveXObject) { // IE
       try {
          http_request = new ActiveXObject("Msxml2.XMLHTTP");
       } catch (e) {
          try {
             http_request = new ActiveXObject("Microsoft.XMLHTTP");
          } catch (e) {}
       }
    }
    if (!http_request) {
       alert('Cannot create XMLHTTP instance');
       return false;
    }
    http_request.onreadystatechange = alertContents;
    http_request.open('POST', url, false);
    http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    http_request.setRequestHeader("Content-length", parameters.length);
    http_request.setRequestHeader("Connection", "close");
    http_request.send(parameters);
 }
/******************************************************************************/
function chkrecommformular() {
 var poststr = "recommname=" + encodeURI( document.getElementById("recommname").value ) +
    		       "&recommbranche=" + encodeURI( document.getElementById("recommbranche").value ) +
    		       "&recommstreet=" + encodeURI( document.getElementById("recommstreet").value ) +
               "&recommplz=" + encodeURI( document.getElementById("recommplz").value ) +
               "&recommort=" + encodeURI( document.getElementById("recommort").value ) +
               "&comment=" + encodeURI( document.getElementById("comment").value );
  makePOSTRequest('saverecomm.php', poststr);
	closeContentBox();
 }
/******************************************************************************/
function alertContents() {
    if (http_request.readyState == 4) {
       if (http_request.status == 200) {
          //alert(http_request.responseText);
          result = http_request.responseText;
          document.getElementById('myspan').innerHTML = result;     
       } else {
          /*alert('There was a problem with the request.');*/
       }
    }
 }
/******************************************************************************/
function showLkBox(regid) {
	transscreen = document.createElement('div');
	transscreen.setAttribute('id', 'trans');
	document.body.appendChild(transscreen);
	transscreen.setAttribute('style', 'position:absolute;width:100%;height:100%;left:0px;top:0px; overflow:hidden;background: transparent url(' + TEMPLATE_DIR + '/transparent.png) no-repeat;  z-index:15;');
	var regimg = new Image();
	regimg.src= KARTEN_DIR + '/region_'+regid+'.png';
	regimg.style.position='absolute';
	regimg.style.top='50%';
	regimg.style.left='50%';
	regimg.style.marginTop='-'+(regimg.height/2)+'px';
	regimg.style.marginRight='0';
	regimg.style.marginBottom='0';
	regimg.style.marginLeft='-'+(regimg.width/2)+'px';
	regimg.setAttribute('width', regimg.width+'px');
	regimg.setAttribute('height', regimg.height+'px');
	regimg.setAttribute('border','0');
	regimg.setAttribute('usemap', '#regmap');
	transscreen.appendChild(regimg);
 }
/******************************************************************************/
function overItem(caller) {
	caller.parentNode.style.background = 'transparent url('+itemlistbg[1].src+') no-repeat';
 }
/******************************************************************************/
function outItem(caller) {
	caller.parentNode.style.background = 'transparent url('+itemlistbg[0].src+') no-repeat';
 }
/******************************************************************************/
function overItem_new(caller) {
  caller.style.background = 'transparent url('+itemlistbg[1].src+') no-repeat';
 }
/******************************************************************************/
function outItem_new(caller) {
  caller.style.background = 'transparent url('+itemlistbg[0].src+') no-repeat';
 }
/******************************************************************************/
function showMap() {
	document.getElementById('googlebox').style.visibility='visible';
 }
/******************************************************************************/
function closeMap() {
	document.getElementById('googlebox').style.visibility='hidden';
 }
/******************************************************************************/
function showRoute() {
	document.getElementById('routebox').style.visibility='visible';
 }
/******************************************************************************/
function closeRoute() {
	document.getElementById('routebox').style.visibility='hidden';
 }
/******************************************************************************/
function getRoute(to) {
	var street=document.getElementById('gstreet').value;
	var plz=document.getElementById('gplz').value;
	var location=document.getElementById('glocation').value;
	var from=street +', '+plz+' ' + location;
	var map=new GMap2(document.getElementById('route_canvas'));
	var dir=document.getElementById('text_canvas');
	var geocoder=new GClientGeocoder();
	geocoder.getLatLng(to,function(point1)
	{
		if(!point1)
		{
			alert("Zieladresse nicht gefunden");
		}
		else
		{
			map.setCenter(point1,14);
			geocoder.getLatLng(from,function(point2)
			{
				if(!point2)
				{
					alert("Startadresse nicht gefunden");
				}
				else
				{
					var directions=new GDirections(map,dir);
					directions.load("from: "+from+ " to:"+to);
				}			
			}
			)
		}
	})
}
/******************************************************************************/
 function LoadSite_( SiteType ) {
  //
  if ( SiteType == 0 ) {
   setSiteHSize();
   pageloaded();  
   } else
  if ( SiteType == 1 ) { 
   setSiteHSize();
   itemloaded();
   initializegm();
   pageloaded();
  }
 }
//
 function UnLoadSite_() {
  GUnload(); 
 }
/*function saveRecomm()
{

}*/

