

// 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);

//flashabfrage
/*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.pharmaton-capsules.com/com/Meta/LocalSites/flash.jsp?localsites=0');
	} else {
	    document.location.href= 'http://www.pharmaton-capsules.com/com/Meta/Contact/noflash.jsp';
	}
}

function localFlashCheck(){
if (flashOK) {
	 	popContact('http://www.pharmaton-capsules.com/com/Meta/LocalSites/flash.jsp?localsites=1');
	} else {
	    document.location.href= 'http://www.pharmaton-capsules.com/Meta/LocalSites/noflash.jsp';
	}
} 


// positionierter Contact
function popContact(page) { 
  if(screen.height<=600){
    var posY=10;
    var posX=10;
  	win=window.open (page,'Contact','width=673,height=550,scrollbars=no,top=0,left=0'); 
  	win.focus();
  }else{
   var posY=180;
   var posX=170;
   win=window.open (page,'Contact','width=673,height=550,scrollbars=no,top=210,left=170'); 
   win.focus();
  }
}

function popContactEs(page) { 
  if(screen.height<=600){
    var posY=10;
    var posX=10;
  	win=window.open ('https://www.contacto-web.es/Contacto.aspx?f8234PC=HgrD46F9iT3d&WEB_ID=2','Contact','width=695,height=630,scrollbars=yes,top=0,left=0'); 
  	win.focus();
  }else{
   var posY=180;
   var posX=170;
   win=window.open ('https://www.contacto-web.es/Contacto.aspx?f8234PC=HgrD46F9iT3d&WEB_ID=2','Contact','width=900,height=630,scrollbars=yes,top=210,left=170'); 
   win.focus();
  }
}






function popContactIt(page) { 
  if(screen.height<=600){
    var posY=10;
    var posX=10;
  	win=window.open (page,'Contact','width=695,height=570,scrollbars=yes,top=0,left=0'); 
  	win.focus();
  }else{
   var posY=180;
   var posX=170;
   win=window.open (page,'Contact','width=695,height=570,scrollbars=yes,top=210,left=170'); 
   win.focus();
  }
}

// positioniertes popup 
function popUp(page,name,param) { 
  if(screen.height<=600){
    var posY=10;
    var posX=10;
  	var win = window.open (page,name,param+',top=0,left=0'); 
  	win.focus();
  }else{
   var posY=180;
   var posX=170;
   var win = window.open (page,name,param+',top=210,left=170'); 
   win.focus();
  }
}


//popup Global Website

popCom = function() {
  fe = window.open('http://www.pharmaton-capsules.com','fenster');
  fe.focus();
}
 
 
popBIuk = function() {
  fe = window.open('http://www.boehringer-ingelheim.co.uk','company');
  fe.focus();
}


//popup glossary
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();
}

} 