<!--
function open_link(contenttype, object, language){
	if (false) {
	   page = "index.cfm?contentid=" + object + "&language=" + language + "&rd=" + Math.random();
	} else {
	   page = object + ".html";
	}
	document.location.href = page;
}

function open_popup(page){
	page = page + "&rd=" + Math.random();
	window.open (page, 'adminConsole', 'left=20,top=50,width=700,height=600,scrollbars=yes,resizable=1,status=yes,menubar=no,directories=np');
}
function gotoAnchor(anchorname) {
	document.location.hash = anchorname;
	void(0);
}
function confirm_action (page){
	if (confirm("Are you sure you want to do this ?")) {
		page = page + "&rd=" + Math.random();
		open_popup (page, 'adminConsole', 'left=20,top=50,width=700,height=600,scrollbars=yes,resizable=1,status=no,menubar=no,directories=np');
		return false;}
	else {
		return false;
	}
}

function setCookie(name, value, expire) 
{   
    document.cookie = name + "=" + escape(value)   + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));
}

function saveLanguage(name) 
{
    var today = new Date();
    var expires = new Date();
    expires.setFullYear(today.getFullYear() + 1);
    setCookie("e-galexis", name, expires);
}


function getCookie(Name)
{
    var search = Name + "=";
    if (document.cookie.length > 0)
    { // if there are any cookies
        offset = document.cookie.indexOf(search);
        if (offset != -1)
        { // if cookie exists
            offset += search.length;
            // set index of beginning of value
            end = document.cookie.indexOf(";", offset);
            // set index of end of cookie value
            if (end == -1)
            {
                end = document.cookie.length;
            }
	    return unescape(document.cookie.substring(offset, end));
	}
    }
}

function popUp(url)
{ 
    sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=450');
    self.name = "mainWin";
}

function popUpVeriSign()
{ 
    popUp('https://digitalid.verisign.com/as2/704cf6fa630a8e837006a9d4aab8780c');
}

function imageWindow(file,w,h) 
{ 
if (this.focus == null) return;
var win= open('','Image', 'width='+(w+0)+',height='+(h+0)+',status=no,toolbar=no,menubar=no,resizable=yes'); 
var d=win.document;
d.open(); 
if (win.moveTo != null) win.moveTo(0,0);
win.focus();
d.write("<html><head><title>Galenica Distribution AG</title></HEAD><body  bgcolor=#ffffff marginwidth=0 marginheight=0 leftmargin=0 topmargin=0>");
d.write('<img src="'+file+'" width="'+w+'" height="'+h+'">');
d.close(); 
}

function openWinOnTheFly(imgPathAndFileName,w,h) { 
myWin= open('','Image', 'width='+(w+0)+',height='+(h+0)+',status=no,toolbar=no,menubar=no,resizable=yes'); 
myWin.document.open(); 
if (parseInt(navigator.appVersion) >= 4 ){myWin.moveTo(0,0)};
myWin.document.write('<html><head><title>Plan</title></head><body  bgcolor="#ffffff" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">');
myWin.document.write('<img src="'+imgPathAndFileName+'" width="'+w+'" height="'+h+'">');
myWin.document.write('</body></html>');
myWin.document.close(); }

function openWindow(pageURL,myWidth,myHeight,options){
	opt = 'width='+myWidth+',height='+myHeight+","+options;
	popUp = window.open(pageURL,'popUpWindow',opt);
}

function checkMailForm()
{
   for (var i = 0; i < document.forms[0].elements.length; i++)
   {
      if ((document.forms[0].elements[i].name.substr(0,10) == "_galNMF_M_") &&
         (document.forms[0].elements[i].value == ''))
      {
	 document.forms[0].elements[i].focus();
         if ((document.forms[0].language.value.substr(0,2)) == "DE")
         {
            alert("Bitte erforderliche Felder eingeben \n");
         }
         else
         {
            alert("Veuillez taper les champs requis \n");
         }
         return false;
      }
   }
}

//-->



