var Sep_Window=new Object();
//---------------------------------------------------------
// Open Eigenes Window für Links
//---------------------------------------------------------  
function Hib_Open_Window(theURL) {
	window.status = '';
	var eigenes_fenster = 1;
	var s_width  = 0;
	var s_height = 0;
	var tools = '';
	var features = '';
	var std_size = 'width=710,height=505,status=no';

	if (Hib_Open_Window.arguments.length > 1) {
		if (Hib_Open_Window.arguments[1] == '0') eigenes_fenster = 0;
		
		if (!Hib_Open_Window.arguments[2]) ; else s_width = Hib_Open_Window.arguments[2];
		if (!Hib_Open_Window.arguments[3]) ; else s_height = Hib_Open_Window.arguments[3];
		if (!Hib_Open_Window.arguments[4]) ; else tools = Hib_Open_Window.arguments[4];
	}
	
	if (tools != '') {
      features = tools;
   }else{
      features = 'status=yes,toolbar=no,scrollbars=yes,resizable=yes,' + std_size;
      if (theURL.indexOf('SVC=MABLISTE') != -1) features = 'width=350,height=270,toolbar=no,scrollbars=no,resizable=no,status=yes';
      if (theURL.indexOf('/hdlr/info') != -1) features = 'width=330,height=360,toolbar=no,scrollbars=yes,resizable=yes,status=yes';
      if (theURL.indexOf('SVC=KONTAKT') != -1) features = 'width=630,height=500,toolbar=no,scrollbars=yes,resizable=yes,status=yes';
	}
	if (theURL.indexOf('Parameter=RRK') != -1) {
	   eigenes_fenster = 1;
	   var zwHost = 'http://' + window.location.host;
	   if (window.location.pathname.substr(0,9) == '/Haendler') {
         zwHost += window.location.pathname.substr(0,16) + '/';
	   }   
	   theURL = theURL.replace('(**HDLURL**)',zwHost);
   }
	if (theURL.indexOf('(**HDLURL**)') != -1) {
	   var l_host = window.location.host;
	   l_host = l_host.replace(':83','');
	   var zwHost = 'http://' + l_host;
	   if (window.location.pathname.substr(0,9) == '/Haendler') {
         zwHost += window.location.pathname.substr(0,16) + '/';
	   }   
	   theURL = theURL.replace('(**HDLURL**)',zwHost);
   }
	if (theURL.indexOf('/hdlr/unternehmen') != -1) eigenes_fenster = 0;
	if (theURL.indexOf('/news/') != -1) {
   	if (window.name != 'hib_content') eigenes_fenster = 1;
   	else eigenes_fenster = 0;
   }
	if (window.location.pathname.indexOf('ROOTPAGE') != -1) {
         //eigenes_fenster = 1;
	}   

	if (parent.frames.length <= 0 && theURL.indexOf('SVC=MABLISTE') == -1)	{ // Seite ist bereits als eigenes Window geöffnet
		this.location = theURL;
		return false;
	}else{ // Seite ist im PopUp
   	if (eigenes_fenster == 1) {
   		var time = new Date();
   		time = time.getTime();
   		if(Sep_Window.closed == false) Sep_Window.close();
   		var winName  = 'InfoSeite' + time;
   		Sep_Window = window.open(theURL,winName,features);
   		Sep_Window.focus();
   		//return false;
      }else{
   		if (s_width != 0) self.resizeTo(s_width,s_height)	
   		this.location = theURL;
   		return false;
      }
   }
}
//---------------------------------------------------------
// Resize Bug-Fix for Netscape
//---------------------------------------------------------  
	var doAll = (document.all != null)
	var YY_oldX = window.innerWidth; var YY_oldY = window.innerHeight;
function YY_ns4refresh() { }

//----------------------------------------------------------------
// showWindow
//----------------------------------------------------------------
function showWindow(url,winSizeX,winSizeY,noToolbar,noResize){
	var windowOptions = 'status=yes,toolbar=yes,resizable=yes,width=710,height=500';
	if(winSizeX) 
		windowOptions = windowOptions.replace('width=710','width=' + winSizeX);
	if(winSizeY) 
		windowOptions = windowOptions.replace('height=500','height=' + winSizeY);
	if(noResize) 
		windowOptions = windowOptions.replace('resizable=yes','resizable=no');
	if(noToolbar) 
		windowOptions = windowOptions.replace('toolbar=yes','toolbar=no');
   var theWindow = window.open(url,'theWindow',windowOptions); 
   theWindow.focus();
}   