	/******************************************************************
    Javascript common functions
    version 1.0.1
    (c) Matthias Oberthür for Doccheck
    
    last changed: 11.3.2005
    
    Functions: popup(String url, String name, integer width, integer height, boolean scrollbar)
                   opens a new window
               myResizeFix 
                   fixes the Netscape 4.x resize problem
                   call in in the body event handler onResize="myResizeFix()"
        
    ******************************************************************/
	
 // open popups	
 //workarounds für popup grössen und breiten nachträglich reingefrickelt (anmerkung: die ehemaligen masse sind auf zuvielen templates verstreut ;o( )
 // w == 330 ist infopopup, w == 430 ist kleinespopup, w == 579 ist grossespopup
var newfenster;
 
function openwin(w,h,loc,nam)
{
var hneu = h;
var wneu = w;

	if ((navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)<=4)) {
	
		if (w == 330) {
		 	hneu = h - 18;
		 	wneu = w + 2;
		} 
		if (w == 430) {
		 	//hneu = h + 94;
			hneu = h - 90;
		  	wneu = w + 2;
		} 
		if (w == 579) {
			//hneu = h + 104;
			hneu = h + 40;
			wneu = w;
		}	
		newfenster = window.open(loc, nam, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,top=2,left=2,innerWidth='+wneu+',innerHeight='+hneu+'');

	} else {

		if (w == 330) {
		 	hneu = h + 12;
			wneu = w + 15;
		} 
		if (w == 430) {
		 	//hneu =h + 122;
			hneu =h - 70;
		  	wneu = w + 15;
		} 
		if (w == 579) {
			//hneu = h + 135;
			hneu = h + 70;
			wneu = w + 12;
		}	
		newfenster = window.open(loc, nam, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,top=2,left=2,width='+wneu+',height='+hneu+'');
	}

newfenster.resizeTo(wneu,hneu);
newfenster.focus();
}

//open topten_infopopup	
function wsdetailpop(url)
{
var hneu2 = 0;
var wneu2 = 0;

		if ((navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)<=4)) {
			hneu2 = 302;
			wneu2 = 332;
			newfenster2 = window.open(url,'wsdetail','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,top=2,left=2,innerWidth='+wneu2+',innerHeight='+hneu2+'');
			} else {
			hneu2 = 332;
			wneu2 = 345;			
			newfenster2 = window.open(url,'wsdetail','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,top=2,left=2,width='+wneu2+',height='+hneu2+'');
	
		}
		newfenster2.resizeTo(wneu2,hneu2);
		newfenster2.focus();
		return true;
}

//open agb_druckversion_popup	
function popup_drucken(url)
{
		if ((navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)<=4)) {
			hneu3 = 540;
			wneu3 = 800;
			newfenster3 = window.open(url,'fensterledruck','toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,top=2,left=2,innerWidth='+wneu3+',innerHeight='+hneu3+'');
			} else {
			hneu3 = 570;
			wneu3 = 800;			
			newfenster3 = window.open(url,'fensterledruck','toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,top=2,left=2,width='+wneu3+',height='+hneu3+'');
		}
		newfenster3.resizeTo(wneu3,hneu3);
		newfenster3.focus();
		//return true;
}

 // open site in parent window	
function openinparent(site)
{
	window.opener.location.href = site;
	self.close();
}
    
    // Netscape resize fix
	var windowWidth;
	var windowHeight;
	
	function setResizeFix() {
		windowWidth = window.innerWidth;
		windowHeight = window.innerHeight;
	}
	
	function myResizeFix() { 
	/*
		if ((navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)==4)) {
			if ((windowWidth!=window.innerWidth)||(windowHeight!=window.innerHeight)) location.reload();
			window.setTimeout("myResizeFix()",1000);
		}
	*/
		return true;
	}
	
// blinker
	function high(name,image)
    {
	    if (document.images) {
	        document.images[name].src = image;
	    }
	}
	
// blinker navigation
	function highthree(namea,imagea,nameb,imageb,namec,imagec)
    {
	    if (document.images) {
	        document.images[namea].src = imagea;
	        document.images[nameb].src = imageb;
	        document.images[namec].src = imagec;
	    }
	}
	
// open popups	(not used)
    function popup(url,name,width,height,scrollbar)
	{
        var w = (width)? width : 550;
		var h = (height)? height : 500;
        var scrolling = (scrollbar)? "yes" : "no";
        var flags = "fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + scrolling + ",resizable=no,copyhistory=no,width="+w+",height="+h+",screenX=20,screenY=20";
        var dcpop = window.open(url,name,flags);
		dcpop.moveTo(20,20);
		dcpop.resizeTo(w,h);
		dcpop.focus();
	}
	

	



	
