/* INIT */
var width=screen.width;
var height=screen.height;
var br = getBrowser();

/* GET BROWSER */
function getBrowser(){
	var agt=navigator.userAgent.toLowerCase();

   if((agt.indexOf("msie") != -1)&&
   	(agt.indexOf("netscape/8") == -1)&&	 //making sure we are not detecting NN8 in IE mode
   	(agt.indexOf("opera") == -1)){       //making sure we are not detecting older opera-versions
   	return "IE";	
   }	
   if(agt.indexOf("firefox") != -1){
   	return "FIREFOX";
   }
    if(agt.indexOf("safari") != -1){
   	return "SAFARI";	
   }
   if((agt.indexOf("netscape/8") != -1)&&(agt.indexOf("msie") != -1)){
   	return "NETSCAPE 8 - IE RENDERING";
   }
   if((agt.indexOf("netscape/8") != -1)&&(agt.indexOf("msie") == -1)){
   	return "NETSCAPE 8 - FF RENDERING";
   }
   if(agt.indexOf("netscape/7") != -1){
   	return "NETSCAPE 7";
   }
   if(agt.indexOf("opera") != -1){
   	return "OPERA";
   }
   if(agt.indexOf("camino") != -1){
   	return "CAMINO";
   }	
}

/* PNG IE 6 SUPPORT */
function processPNGs()
{	if((br=='IE')||(br=='NETSCAPE 8 - IE RENDERING'))
	{	imgs=document.getElementsByTagName('img');
		for(var i=imgs.length-1;i>=0;i--)
		{	if(imgs[i].className=='png')
			{	var src=imgs[i].src;
				src=src.replace(/%26/,'%2526');
				imgs[i].outerHTML='<span style="font-size:0px;display:inline; width:1;height:1;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='+src+', sizingMethod=\'image\');"></span>';
			}
		}
	}
}

/* GENERAL ROLLOVER*/
function swap(obj,bild){
	obj.firstChild.src = bild;
}

/* SEDCARD OPENER */
swf=0;
swf2=0;
function openSedcard(id)
{	swfwin=window.open("sedcard.php?id="+id, "sedcard_model_"+id, "status=no,menubar=no,resizable=no,scrollbars=no,width=595,height=420");
	if (swf2>20)
		swf2=0;
	swfwin.moveTo(0+swf2*15,0+swf2*20);
	swfwin.focus();
	swf++;
	swf2++;
}

/* POPUP MANAGEMENT */
function openStartPage() 
{	var url='http://www.nextcompany.com/';
	var startWindow=popx(url,'startWindow',width,height,0,0);
}

/* POPUP */
function popx(url,name,w,h){
	newWin = window.open(url,name,"width="+w+",height="+h,"toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no");
	newWin.focus();
}
function popup(url,name,w,h,x,y){
	newWin = window.open(url,name,"width="+w+",height="+h,"toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no");
	newWin.moveTo(x,y);
	newWin.focus();
}
function popups(url,name,w,x,y)
{	//alert('popups scrips.js');
	var hs = screen.availHeight-80;
	if (!document.layers)
	{	hs=hs+20;
	}
	if(hs >= 919)
	{	hs = 919;
	} 
	//hs=850;
	newWin = window.open(url,name,"width="+w+",height="+hs,"toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no");//
	newWin.moveTo(x,y);
	newWin.focus();
}
function popOutOfFlash(url)
{	alert(url);
	
}
/*
function popups(url,name,w,x,y)
{	//alert('popups nav.php4');
	var hs = screen.availHeight-50;
  if(hs>=820){hs = 820;} 
	newWin = window.open(url,name,"width="+w+",height="+hs,"toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no");
	newWin.moveTo(x,y);
	newWin.focus();
}

function drucken()
{	lc = parent.main.location.href.split("?");
	printWin = window.open("print.php4?"+lc[1],"printWin","width=640,height=550,toolbar=no,location=no,status=no,menubar=yes,scrollbars=yes,resizable=yes");
}
*/