this_url = location.href;
if ( this_url.indexOf( "WebSite" ) != -1 ) {
	rootpath = this_url.replace( /WebSite.*/, "WebSite" );
	actualpath = this_url.substr(0, this_url.lastIndexOf("/")+1);
} else {
	rootpath = "";
	actualpath = "";
}

// 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=210,left=170'); 
   win.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.pharmaton-kiddi.com/com/Meta/localsites/flash.jsp?localsites=0');
	} else {
	    document.location.href= 'http://www.pharmaton-kiddi.com/com/Meta/contact/noflash.jsp';
	}
}

function localFlashCheck(){
if (flashOK) {
	 	popContact('http://www.pharmaton-kiddi.com/com/Meta/localsites/flash.jsp?localsites=1');
	} else {
	    document.location.href= 'http://www.pharmaton-kiddi.com/com/Meta/localsites/noflash.jsp';
	}
} 
function contactFlashCheckEs(){
if (flashOK) {
	 	popContact('http://www.pharmaton-kiddi.com/com_es/Meta/localsites/flash.jsp?localsites=0');
	} else {
	    document.location.href='http://www.pharmaton-kiddi.com/com_es/Meta/contact/noflash.jsp';
	}
}

function contactFlashCheckRU(){
if (flashOK) {
	 	popContact('http://www.pharmaton-kiddi.com/ru/Meta/contact/contactform.jsp');
	} else {
	    document.location.href='http://www.pharmaton-kiddi.com/ru/Meta/contact/index.jsp';
	}
}

function contactFlashCheckUA(){
if (flashOK) {
	 	popContact('http://www.pharmaton-kiddi.com/ua/Meta/contact/contactform.jsp');
	} else {
	    document.location.href='http://www.pharmaton-kiddi.com/ua/Meta/contact/index.jsp';
	}
}

function contactFlashCheckBG(){
if (flashOK) {
	 	popContact('http://www.pharmaton-kiddi.com/ua/Meta/contact/contactform.jsp');
	} else {
	    document.location.href='http://www.pharmaton-kiddi.com/ua/Meta/contact/index.jsp';
	}
}

function localFlashCheckEs(){
if (flashOK) {
	 	popContact('http://www.pharmaton-kiddi.com/com_es/Meta/localsites/flash.jsp?localsites=1');
	} else {
	    document.location.href= 'http://http://www.pharmaton-kiddi.com/com_es/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=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=210,left=170'); 
   win.focus();
  }
}
// positionierter Disclaimer
function disclaimer(page) { 
  if(screen.height<=600){
    var posY=10;
    var posX=10;
  	win=window.open (page,'Disclaimer','width=520,height=410,scrollbars=no,top=0,left=0'); 
  	win.focus();
  }else{
   var posY=180;
   var posX=170;
   win=window.open (page,'Disclaimer','width=520,height=410,scrollbars=no,top=210,left=170'); 
   win.focus();
  }
}

//popup Global Website

popCom = function() {
  fe = window.open('http://www.pharmaton-kiddi.com','fenster');
  fe.focus();
}

// Splashscreen: open Country Website 
    function countrySite(url){
      if(url == "") {
        document.site.reset();
        document.site.country.blur();
        return;
      } else {
       document.location.href=url;
      }
    } 
 

