// netscape resize
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
if (init==true) with (navigator) {
	if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; 
	}
}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


//popup Global Website

popCom = function() {
  fe = window.open('http://www.antistax.com','fenster');
  fe.focus();
}


/*Contact/LocalSites  with flashcheck*/
//Netscape 

var ver = 0;
var flashOK = false;

if (navigator.plugins && navigator.plugins['Shockwave Flash']) {
  var words = navigator.plugins["Shockwave Flash"].description.split(" ");
  for (var a = 0; a < words.length; ++a) {
	  if (isNaN(parseInt(words[a]))) continue;
		ver = parseInt(words[a]);
  }
} 

//Internet Explorer
if (document.all) {
  document.write(''+
  '<s'+'cript language="VBScript">\nOn error resume next\n'+
  'ver=0\n'+
  'For i=7 to 3 step -1\n'+
  'Set x = CreateObject("ShockwaveFlash.ShockwaveFlash." & i)\n'+
  'v = IsObject(x)\n'+
  'if v then \n'+
  'ver=i\n'+
  'Exit For\n'+
  'End If\n'+
  'next\n'+
  '</scrip'+'t>')
}

//hier wird die Version angegeben
flashOK = (ver >= 6)? true : false;

function contactFlashCheck(){
if (flashOK) {
	 	popContact('http://www.antistax.com/com/Meta/Contact/flash1.jsp?localsites=0');
	} else {
	    document.location.href= 'http://www.antistax.com/com/Meta/Contact/noflash.jsp';
	}
}

function localFlashCheck(){
if (flashOK) {
	 	popContact('http://www.antistax.com/com/Meta/Contact/flash1.jsp?localsites=1');
	} else {
	    document.location.href= 'http://www.antistax.com/com/Meta/localsites/noflash.jsp';
	}
}


 
 /* Rollout Contact Popup*/
 function popContact(page) { 
  if(screen.height<=600){
    var posY=10;
    var posX=10;
  	win=window.open (page,'contact','width=670,height=520,scrollbars=no,top=0,left=0'); 
  	win.focus();
  }else{
   var posY=180;
   var posX=170;
   win=window.open (page,'contact','width=670,height=520,scrollbars=no,top=170,left=170'); 
   win.focus();
  }
}

 function popContactOrder(page) { 
  if(screen.height<=600){
    var posY=10;
    var posX=10;
  	win=window.open (page,'contact','width=670,height=470,scrollbars=no,top=0,left=0'); 
  	win.focus();
  }else{
   var posY=180;
   var posX=170;
   win=window.open (page,'contact','width=670,height=470,scrollbars=no,top=170,left=170'); 
   win.focus();
  }
}



 /* Rollout Contact Popup Italy*/
 function popContactIt(page) { 
  if(screen.height<=600){
    var posY=10;
    var posX=10;
  	win=window.open (page,'contact','width=670,height=549,scrollbars=no,top=0,left=0'); 
  	win.focus();
  }else{
   var posY=180;
   var posX=170;
   win=window.open (page,'contact','width=670,height=549,scrollbars=no,top=170,left=170'); 
   win.focus();
  }
}

 /* Rollout Contact Popup NL*/
 function popContactNL(page) { 
  if(screen.height<=600){
    var posY=10;
    var posX=10;
  	win=window.open (page,'contact','width=670,height=486,scrollbars=no,top=0,left=0'); 
  	win.focus();
  }else{
   var posY=180;
   var posX=170;
   win=window.open (page,'contact','width=670,height=486,scrollbars=no,top=170,left=170'); 
   win.focus();
  }
}

//  allgemein positioniertes popup 

function popUp(page,name,param) { 
  if(screen.height<=600){
    var posY=10;
    var posX=10;
  	win=window.open (page,name,param+',top=0,left=0'); 
  	win.focus();
  }else{
   var posY=180;
   var posX=170;
   win=window.open (page,name,param+',top=170,left=170'); 
   win.focus();
  }
}


function popWin() { 
   win=window.open ('http://www.antistax.at/at/p_win.jsp','win','width=570, height=500,top=170,left=170,scrollbars=yes'); 
   win.focus();
} 
// relativ positioniertes Glossary Popup

if(document.layers) {
	var ns = true;
} else if (document.getElementById&&!document.all) {
	var ns6 = true;
} else {
	var ie = true;
}

var woher;
var schonmalda = 0;
if (ns) {
	var nixdrin = null;
} else var nixdrin = "";

function ladeSeite(welche) {
		if (opener && !opener.closed) {
			opener.location.href=welche;
			opener.focus();
		} else if (!schonmalda || woher.closed) {
			woher=window.open(welche,'','toolbar=yes,location=yes,status=yes,menubar=yes');
			schonmalda = 1;
		} else {
			woher.location.href=welche;
			woher.focus();
		}
}
 
if (ns){window.captureEvents(Event.MOUSEMOVE);	window.onMouseMove = setpos;}
if (ns6){if (typeof(document.addEventListener)=="function") document.addEventListener("mousemove",setpos,true);}

function setmousepos(){
	if (ie) {
		mouseX = window.event.screenX;
		mouseY = window.event.screenY;
	}
}
function setpos(ev){
	if (ns || ns6) {
		mouseX=ev.screenX;
		mouseY=ev.screenY;
	}
}

function openGlossary(htmlPage) { 

if (window['Glossary'] && !window['Glossary'].closed) {
	setmousepos();
	window['Glossary'].moveTo(mouseX+80,mouseY-30);
	window['Glossary'].location.href=htmlPage;
	window['Glossary'].focus();
} else {
	setmousepos();
	Glossary=window.open (htmlPage,'Glossary','toolbar=0,location=0,directories=0,menubar=0,status=0,scrollbars=yes,resizable=0,width=235,height=180,left='+(mouseX+80)+',top='+(mouseY-30)); 
	Glossary.focus();
}

} 