
//base 
this_url = location.href;
if ( this_url.indexOf( "buscopan_edit" ) != -1 ) {
	rootpath = this_url.replace( /buscopan_edit.*/, "buscopan_edit" );
	actualpath = this_url.substr(0, this_url.lastIndexOf("/")+1);
} else if ( this_url.indexOf( "buscopan_prod" ) != -1 ) {
	rootpath = this_url.replace( /buscopan_prod.*/, "buscopan_prod" );
	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=200'); 
   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.buscopan.com','fenster');
  fe.focus();
}
 

//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.buscopan.com/com/Meta/localsites/flash.jsp?localsites=0');
	} else {
	    document.location.href= 'http://www.buscopan.com/com/Meta/contact/noflash.jsp';
	}
}

function localFlashCheck(){
if (flashOK) {
	 	popContact('http://www.buscopan.com/com/Meta/localsites/flash.jsp?localsites=1');
	} else {
	    document.location.href= 'http://www.buscopan.com/com/Meta/localsites/noflash.jsp';
	}
} 
function contactFlashCheckEs(){
if (flashOK) {
	 	popContact('http://ingweb12.ing.de.bic/buscopan_edit/com_es/Meta/localsites/flash.jsp?localsites=0');
	} else {
	    document.location.href= 'http://ingweb12.ing.de.bic/buscopan_edit/com_es/Meta/contact/noflash.jsp';
	}
}

function localFlashCheckEs(){
if (flashOK) {
	 	popContact('http://ingweb12.ing.de.bic/buscopan_edit/com_es/Meta/localsites/flash.jsp?localsites=1');
	} else {
	    document.location.href= 'http://ingweb12.ing.de.bic/buscopan_edit/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=550,scrollbars=no,top=0,left=0'); 
  	win.focus();
  }else{
   var posY=180;
   var posX=170;
   win=window.open (page,'Contact','width=670,height=550,scrollbars=no,top=210,left=170'); 
   win.focus();
  }
}

// positionierter grossen Contact
function popContactLargeES(page) { 
  if(screen.height<=600){
    var posY=10;
    var posX=10;
  	win=window.open ('https://www.contacto-web.es/Contacto.aspx?f8234PC=3125hsD9a7x2&WEB_ID=1','Contacto','width=760,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=3125hsD9a7x2&WEB_ID=1','Contacto','width=900,height=650,scrollbars=yes,top=10,left=10'); 
   win.focus();
  }
}


function popContactLarge(page) { 
  if(screen.height<=600){
    var posY=10;
    var posX=10;
  	win=window.open (page,'Contact','width=670,height=470,scrollbars=yes,top=0,left=0'); 
  	win.focus();
  }else{
   var posY=180;
   var posX=170;
   win=window.open (page,'Contact','width=900,height=500,scrollbars=yes,top=10,left=10'); 
   win.focus();
  }
}

// positionierter grossen Casos Practicos
function popCasos(page) { 
  if(screen.height<=600){
    var posY=10;
    var posX=10;
  	win=window.open ('http://www.buscapina.es/es/Main/casos_practicos/popupentry.jsp','Boehringer Ingelheim','width=670,height=470,scrollbars=yes,top=0,left=0'); 
  	win.focus();
  }else{
   var posY=180;
   var posX=170;
   win=window.open ('http://www.buscapina.es/es/Main/casos_practicos/popupentry.jsp','Boehringer Ingelheim','width=900,height=600,scrollbars=yes,top=10,left=10'); 
   win.focus();
  }
}

// positionierter grossen Contact
function popNews(page) { 
  if(screen.height<=600){
    var posY=10;
    var posX=10;
  	win=window.open (page,'Noticia','width=670,height=470,scrollbars=yes,top=0,left=0'); 
  	win.focus();
  }else{
   var posY=180;
   var posX=170;
   win=window.open (page,'Noticia','width=900,height=600,scrollbars=yes,top=10,left=10'); 
   win.focus();
  }
}



function openDisclaimerWindow(sUrl)
{
	window.open(sUrl, "Disclaimer", "width=500, height=400, dependent=yes, resizable=yes");
}
