<!--

// VISILOG Allgemeine Javascript-Funktionen
// Stand 29.08.2011 Version 1.4.42

function LogvisWindow(Url)
 {
  winlv = window.open(Url,"visilog", '');
  winlv.focus();
 }

function hidestatus()
{
 window.status='';
 return true; 
}

function SetStatus(value)
{
 window.status=value;
 return true; 
}

function visilog_window(b,h,url)
{
  var Mass = "width="+b+",height="+h+",";
      Extras =",resizable=yes,status=no,titlebar=no,left=20,top=20,dependent=yes";

  win1 = window.open(url,"W1", Mass+Extras);
  win1.focus();
}

function visilog_print(url)
{
 var Mass = "width=730,height=600";
 Extras =",resizable=1,scrollbars=1,status=no,titlebar=no,menubar=yes,left=20,top=20,dependent=yes";
 win2 = window.open(url,"Print", Mass+Extras);
 win2.focus();
}

function newwindow(url)
{
 var Mass = "width=730,height=600";
 Extras =",resizable=1,scrollbars=1,status=no,titlebar=no,menubar=no,locationbar=no,left=20,top=20,dependent=yes";
 win2 = window.open(url,"Print", Mass+Extras);
 win2.focus();
}

function mailwindow(url,target)
{
 var Mass = "width=400,height=320";
 Extras =",left=150,top=50,location=no,resizable=no,directories=no,scrollbar=no,toolbar:no;status=no,titlebar=no,menubar=no,dependent=yes";
 win2 = window.open(url,target, Mass+Extras);
 win2.focus();
}

function visilog_windowedit(url)
{
 var Extras = "width=850,height=580,resizable=0,dependent=yes,status=no,titlebar=no,left=20,top=20";
 win3 = window.open(url,"W1", Extras);
 win3.focus();
}
 
function visilog_windowdebug(dir)
{
 var Extras = "width=650,height=500,scrollbars=1,resizable=0,dependent=yes,status=no,titlebar=no,left=20,top=20";
 url=dir+"_visilog/kern/debug.php"; 
 win4 = window.open(url,"W3",Extras);
 win4.focus();
}

function visilog_windowpdf(url)
{
 var Extras = "width=650,height=500,scrollbars=1,resizable=1,dependent=yes,status=no,titlebar=no,left=40,top=40";
 win5 = window.open(url,"pdf", Extras);
 win5.focus();
}

function printPage()
{
 if (typeof(window.print) != 'undefined') { window.print();}
}

function selfWindow(url)
{
 window.open(url,'_self','');
}

function check(action)
{
  var checked=true;
  var pattern=/.*\@.*\..*/;
   
  if (checked)
   {
    if ((pattern.test(document.sendform.email.value))==false)
     {
	  document.sendform.email.focus();
	  document.sendform.email.select();
      alert ("Bitte geben Sie eine gültige E-Mail-Adresse ein.");
      checked=false;
      }
    }
  
   if (checked)
	{
	 if (document.sendform.email.value=="")
      {
	   document.sendform.email.focus();
	   document.sendform.email.select();
       alert ("Bitte geben Sie ihren Nachnamen an.");
       checked=false;
       }
	 }
	  
  if (checked)
   {
    document.sendform.method="POST";
    document.sendform.action="";
	document.sendform.submit;
   }
   
  return checked;
} 

// Iframe 

function loadIframe(theURL)
{
 document.getElementById("mainContent").src=theURL;
}
	
function resizeMe(obj,height)
{ 
 docHeight = document.height || document.body.scrollHeight;
 docHeight = docHeight + height;
 obj.style.height = docHeight + 'px';
} 
 
function visilog_visilog_SetBrowserPage(url)
{
 document.style.behavior='url(#default#homepage)';
 document.setHomePage(url);
}

// Cookie lesen 

function GetCookie (name)
{
 var Value = '';
 if (document.cookie && document.cookie != '') 
 {
   var cookies = document.cookie.split(';');
   for (var i = 0; i < cookies.length; i++)
    {
     var cookie = jQuery.trim(cookies[i]);
     if (cookie.substring(0, name.length + 1) == (name + '=')) 
      {
        Value = decodeURIComponent(cookie.substring(name.length + 1)); break;
       }
     }
 }
 return Value;
}


// Cookie setzen 

function  SetCookie (name, value, options)
{
 options = options || {};
 if (value === null) { value = ''; options.expires = -1; }
        
 var expires = '';
 if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) 
 {
  var date;
  if (typeof options.expires == 'number') 
   {
    date = new Date();
    date.setTime(date.getTime() + (options.expires * 86400000));
   } else { date = options.expires; }
 
  expires = '; expires=' + date.toUTCString(); 
 }
        
 var path = options.path ? '; path=' + (options.path) : '';
 var domain = options.domain ? '; domain=' + (options.domain) : '';
 var secure = options.secure ? '; secure' : '';
 document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    
}

//-->


