<!--
//* Country ID
var SiteCode = "CH"

//* Variables formally web parameters
var DnBCopyRight = "© Dun & Bradstreet Inc., 2000-2009. All Rights Reserved"
// old telephones replaced "+41 (0)1 735 64 64"
var DnBTradeTel = "+41 44 735 62 84"
var DnBMarketingTel = "+41 (0)44 735 64 64"
var DnBCustomerServiceTel = "+41 (0)44 735 64 64"

//* e-mail addresses, old e-mail "info.ch@dnb.com" replaced
var CustServEmail = "info@dnbswitzerland.ch" ;
var TeleSalesEmail = "telesales@dnbswitzerland.ch" ;

var MarketingEmail = "info@dnbswitzerland.ch" ;
var UserAdminEmail = "info@dnbswitzerland.ch" ;
var HelpDeskEmail = "info@dnbswitzerland.ch" ;

//* Country Lietrals
var cntryEN = "Switzerland";
var cntryDE = "Schweiz";
var cntryFR = "Suisse";
var cntryIT = "Svizzera";
var cntryaEN = "Swiss";
var cntryaDE = "Schweizer";
var cntryaFR = "suisse";
var cntryaIT = "svizzer";

var mthEN = new Array("January","February","March","April","May","June","July","August","September","October","November","December")
var mthFR = new Array("janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre")
var mthDE = new Array("Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember")
var mthIT = new Array("gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre")

//*************************************************************
//* Show DunsRight Number in right format
//*************************************************************
function ShowNumber(num, ch) {
 ch2 = "";
 n2 = eval("DR" + num);

 for (i = 0; i < n2.length; i++)
 if (n2.charAt(i) ==',')
  ch2 += ch;
 else
  ch2 += n2.charAt(i);

 document.write(ch2);
}

//*************************************************************
//* Load Free products page in main + hide language bar
//*************************************************************
function loadFree(lang)
{
 LinkTop('onlineh.htm'); 
 location.replace('http://www.ch.dnb.com/IBusines/IBusines.asp?AC=LOGON&amp;UI=GUEST&amp;PD=GUEST&amp;LA=' + lang);
}

function Freefrench()
{
 LinkTop('onlineh.htm'); 
 location.replace('http://www.ch.dnb.com/francais/infos_sans_abo/index.html');
}

function Freegerman()
{
 LinkTop('onlineh.htm'); 
 location.replace('http://www.ch.dnb.com/deutsch/wirtschaftsinfos_ohne-abo/index.html');
}

function Free_FR()
{
 LinkTop('onlineh.htm'); 
 location.replace('http://www.ch.dnb.com/dbshab/shstart.asp?changelang=F');
}

function Free_DE()
{
 window.top.location.replace('../shab/default.htm');
}

//*************************************************************
//* functions to display a popup window set to the size of the 
//* selected picture.
//*************************************************************
var Photo1 = new Image();
var pURL
var pWindow

function OpenPhoto() { 
  ScrollBars = "no" ;
  ReSizable = "no" ;
  Width = Photo1.width ;
  Height = Photo1.height ;
  Left = screen.width - Width - 50
  day = new Date();
  id = day.getTime();
  eval("pWindow = window.open(pURL, '" + id + "', 'toolbars=no,scrollbars=" + ScrollBars + ",location=no,statusbars=no,menubar=no,resizable=" + ReSizable + ",width=" + Width + ",height=" + Height + ",left=" + Left + ",top=50');");
} 

function ViewPhoto(URL, root) {
  if (pWindow != null) {
    pWindow.close();
  }
  pURL = URL ;
  sArray = URL.split("=") ;
  pic = sArray[1] ;
  Photo1.onload = OpenPhoto;
  Photo1.src = root + pic ;
  }

//* NewsPopup
var newsPopupVersion = 3

//*************************************************************
//* This function checks to see if the preferred language has
//* already been set in a cookie - if so, the preferred home
//* page is displayed.  If not, the language selection page
//* is shown or a default language.
//*************************************************************
function checkNewsPop() {
  var NewsID = "pNews" + SiteCode ;
  var pNews = Get_Cookie(NewsID);
  if (pNews == null | pNews < newsPopupVersion) {
    popUpN('NewsPop.htm', 'No', 'No', '450', '490');

  }
}

function clearNewsPop() {
  var NewsID = "pNews" + SiteCode ;
  if (document.frmNewsSave.chkNewsSave.checked == true) {
    Delete_Cookie(NewsID, '/') ; 
    Set_Cookie(NewsID, newsPopupVersion, exp, '/') ; 
  }
}

//* Language Page or default home page
var defLangPage = "ChkLang.htm";

//* Set expiry date for cookies. 
var today = new Date();
var exp = new Date(today.getTime() + 365 * 86400000);

function Google_track() {
 var Goog = new Array(6);
 Goog[0] = '<scr'+'ipt src="http://www.google-analytics.com/urchin.js" type="text/javascript">';
 Goog[1] = '</scr'+'ipt>';
 Goog[2] = '<scr'+'ipt type="text/javascript">';
 Goog[3] = '_uacct = "UA-1739233-1";';
 Goog[4] = 'urchinTracker();';
 Goog[5] = '</sc'+'ript>';

 loc = location.href.toLowerCase() ;
 sArray = loc.split("/");
 SiteName = sArray[2];
 if (SiteName == "blbr1310" || SiteName == "10.144.11.142") {
//  alert(loc+", "+SiteName); 
// }
// else
// { 
  alert(Goog[0]);
  document.writeln(Goog[0], Goog[1], Goog[2], Goog[3], Goog[4], Goog[5]);
 }
}

//*************************************************************
//* CopyRight, companies, tradeTel 
//*************************************************************
function copyRight() {
  document.write(DnBCopyRight);
}

function companies() {
//  document.write(DnBCompanies);  
 var cmp = eval("DR1");
 document.write(cmp);
}

function tradeTel() {
  document.write(DnBTradeTel);
}

function MarketingTel() {
  document.write(DnBMarketingTel);
}

function CustomerServiceTel() {
  document.write(DnBCustomerServiceTel);
}

//*************************************************************
//* Button Stuff
//*************************************************************

buttgCol="dddddd"
buttfCol="444444"

function MakeButton(text,id,link,target,wid,colStem,align){
  linkText = ""
  if (link != null){
    linkText = "'" + link + "'" ;
  }
  tgtText = "location.href=" + linkText;
  if (target != null){
    if (target == "_top"){
      tgtText = "top.location.href=" + linkText;
    }
    else if (target == "_blank"){
      tgtText = "window.open(" + linkText + ")";
    }
    else if (target != "") { 
      tgtText = "parent." + target + ".location.replace(" + linkText + ")";
    }
  }
  widText = ""
  if (wid != null && wid != ''){
    wid = wid - 12;
    widText = 'width="' + wid + '" ' ;
  }
  colText = "'butt'"
  if (colStem != null && colStem != ''){
    colText = "'" + colStem + "'";
  }
  alignText = "center"
  if (align != null){
    alignText = align ;
 }
 //alert('onmouseover="ShowBOver(this,' + colText + ')"')
  document.write('<table cellspacing="0" cellpadding="5" border="0" style="border-collapse: collapse" bordercolor="#cccccc">') ;
  document.write('<tr class="' + eval(colText) + '" onclick="' + tgtText + '" onmouseover="ShowBOver(this,' + colText + ')" onmouseout="HideBOver(this)">') ;
  document.write('<td class="butt" align="' + alignText + '"' + widText + 'id="' + id + '" style="cursor:pointer;">') ;
  document.write('<nobr><font face="Arial">&#9658;</font> ' + text + '</nobr></td>') ;
  document.write('</tr></table>') ;
}


function ShowBOver(sectionnumber,col) {
//alert(col);
  sectionnumber.style.backgroundColor=eval(col + 'gCol');
  sectionnumber.style.color=eval(col + 'fCol');
}
function HideBOver(sectionnumber) {
  sectionnumber.style.backgroundColor='';
  sectionnumber.style.color='';
}

//*************************************************************
//* This function shows the specified layer
//*************************************************************
function showLayer(lName) {
  document.getElementById([lName]).style.visibility='visible';
}

//*************************************************************
//* This function hides the specified layer
//*************************************************************
function hideLayer(lName) {
  document.getElementById([lName]).style.visibility='hidden';
}

//*************************************************************
//* This function pops up a layer at a specifed to position.
//*************************************************************
function popLayer(lName, pos){
  document.getElementById([lName]).style.top=pos;
  showLayer(lName);
}

//*************************************************************
//* This function activates an image to replace another
//*************************************************************
  function img_act(imgName, imgBase) {
    if (document.images) {
      imgOn = eval(imgName + "on.src");
      document[imgBase].src = imgOn ;
    }
  } 
  
  function img_inact(imgName) {
    if (document.images) {
      imgOff = eval(imgName + "off.src");
      document[imgName].src = imgOff ;
    }
  }

//*************************************************************
//* This functions pops up the DMI interactive demo window
//* that is located in the DBAI web site. 
//*************************************************************
function dmiPopup(Lang) {
  dmilink = "https://www.dbai.dnb.com/decmak/popup.asp?Lang=" ;
  dmilink = dmilink + Lang ;
  window.open(dmilink,'','directories=0,location=0,menubar=0,scrollbars=0,status=0,toolbar=0,resizable=0,width=650,height=550');
}

//*************************************************************
//* Writes out the country name
//*************************************************************
function CtryName(typ, Lang) {
  if (typ == "N") {
    cStr = eval("cntry" + Lang);	
    document.write(cStr);
  }
  if (typ == "A") {
    cStr = eval("cntrya" + Lang);	
    document.write(cStr);
  }
}

//*************************************************************
//* Writes out the correct email string based on the type of
//* address required.  
//*************************************************************
function MailAddr(typ, subj) {
  if (subj == null) {
    subj = " " ; }

  if (typ=="cs") {
    document.write('<a href="mailto:' + CustServEmail + '?Subject=' + subj + '">' + CustServEmail + '</a>');
  } 
  
  if (typ=="tele") {
    document.write('<a href="mailto:' + TeleSalesEmail + '?Subject=' + subj + '">' + TeleSalesEmail + '</a>');
  } 

  if (typ=="mk") {
    document.write('<a href="mailto:' + MarketingEmail + '?Subject=' + subj + '">' + MarketingEmail + '</a>');
  } 

  if (typ=="ua") {
    document.write('<a href="mailto:' + UserAdminEmail + '?Subject=' + subj + '">' + UserAdminEmail + '</a>');
  } 

  if (typ=="hd") {
    document.write('<a href="mailto:' + HelpDeskEmail + '?Subject=' + subj + '">' + HelpDeskEmail + '</a>');
  } 
}


//*************************************************************
//* This function is driven from the real estate (Frame Main)
//* to fill the left navigation bar (Frame Contents)
//*************************************************************
function LinkLeft(Page) {
  if (parent.frames.length!=0) {
    parent.frames['contents'].location.replace(Page);
  }
}

//*************************************************************
//* This function is driven from the real estate (Frame Main)
//* to fill the top navigation bar (Frame SectionHeader)
//*************************************************************
function LinkTop(Page) {
  if (parent.frames.length!=0) {
    parent.frames['sectionheader'].location.replace(Page);
  }
  else {
    var URLTemp ;
    URLTemp = location.pathname ;
  if (parent.location.search!=null) {
	var parms;
	parms = parent.location.search;
//	parms = parms.replace("?","&");

	URLTemp = URLTemp + parms;
  }
    window.location.href = "../default.htm?Loc=" + URLTemp;
  }
}

//*************************************************************
//* This function checks to see if the Loc parameter is 
//* specifed on the frame URL and then selects the correct
//* page.  It is used when a user calls a page in the web directly
//* so that the Frame environment can be loaded. 
//*************************************************************

function checkLoc() {
  if (parent.location.search) {
    NewLoc = parent.location.search;
    NewLoc = NewLoc.replace("?Loc=","");
    location.replace(NewLoc) ;
  }  
}

//*************************************************************
//* This replaces the page with the passed URL
//*************************************************************
function LinkNow(Page) {
  location.replace(Page) ;
}


//*************************************************************
//* This function pops up a new window with no toolbars etc.
//*************************************************************
function popUpN(URL, ScrollBars, ReSizable, Width, Height) {
  if (ScrollBars == null) { 
    ScrollBars = "yes" ;
  }
  if (ReSizable == null) { 
    ReSizable = "yes" ;
  }
  if (Width == null) { 
    Width = "640" ;
  }
  if (Height == null) { 
    Height = "400" ;
  }
  day = new Date();
  id = day.getTime();
  eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=no,scrollbars=" + ScrollBars + ",location=no,statusbars=no,menubar=no,resizable=" + ReSizable + ",width=" + Width + ",height=" + Height + ",left=1,top=1');");
}

//*************************************************************
//* This function pops up a new window with no toolbars etc.
//*************************************************************
function popUpTop(URL, ScrollBars, ReSizable, Width, Height) {
  if (ScrollBars == null) { 
    ScrollBars = "yes" ;
  }
  if (ReSizable == null) { 
    ReSizable = "yes" ;
  }
  if (Width == null) { 
    Width = "640" ;
  }
  if (Height == null) { 
    Height = "400" ;
  }
  day = new Date();
  id = day.getTime();
  eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=no,scrollbars=" + ScrollBars + ",location=no,statusbars=no,menubar=no,resizable=" + ReSizable + ",width=" + Width + ",height=" + Height + ",left=0,top=0');");
}

//*************************************************************
//* This function takes a value from a pull down combo box and then 
//* calls the popUpN function to put that page into a new window.
//*************************************************************
function changePageTo(selector) {
  var s = selector.options[selector.selectedIndex].value;
  if (s) { popUpN(s)  }
}

//*************************************************************
//* This function takes a value from a pull down combo box and
//* then drives that page into the parent.
//*************************************************************
function changePage(selector) {
  var s = selector.options[selector.selectedIndex].value;
  if (s) { 
    selector.selectedIndex = 0 ;
    parent.location = s ;
  }
}

//*************************************************************
//* This function takes the two letter country code from a 
//* pull down list, constructs the URL and drives that in the 
//* _Top frame. 
//*************************************************************
function countryPage(selector) {
  var s = "http://www.dnb.com/" + selector.options[selector.selectedIndex].value;
  if (s) { parent.location = s  }
}


//*************************************************************
//* This function checks to see if the preferred lanaguage has
//* already been set in a cookie - if so, the preferred home
//* page is displayed.  If not, the language selection page
//* is shown or a default language.
//*************************************************************
function checkLang_old() {
  var LangID = "pLang" + SiteCode ;
  var pLang = Get_Cookie(LangID);
  if (pLang == null) {
    window.location.replace(defLangPage)
  }
  else {
    var pPage = pLang + "/default.htm"  
    window.location.replace(pPage)
  }
}

function checkLang() {
  var LangID = "pLang" + SiteCode ;
  var pLang = Get_Cookie(LangID);
  if (pLang == null) {
   pLang = "German";
  }
    var pPage = pLang + "/default.htm";  
    window.location.replace(pPage);
}

//*************************************************************
//* This function sets the preferred langauge in a cookie and
//* then displays the correct home page - from the chklang.htm
//* page
//*************************************************************
function setLang(sLang) {
  var LangID = "pLang" + SiteCode ;
  if (document.frmLangSave.chkLangSave.checked == true){
    Delete_Cookie(LangID, '/') ;
    Set_Cookie(LangID, sLang, exp, '/') ;
  }
  var pPage = sLang + "/default.htm"  ;
  window.location.replace(pPage) ;
}

//*************************************************************
//* This function sets the preferred language in a cookie and
//* then displays the correct home page - from the main menu.
//*************************************************************
function setNLang(sLang) {
  var LangID = "pLang" + SiteCode ;
  var pLang = Get_Cookie(LangID);
  if (pLang != null) { 
    Delete_Cookie(LangID, '/') ;
    Set_Cookie(LangID, sLang, exp, '/') ;
  }
  var pPage = "../" + sLang + "/default.htm"  ;
  parent.location.replace(pPage) ;
}

//*************************************************************
//* This function gets a cookie value
//*************************************************************
function Get_Cookie(name) {
  var start = document.cookie.indexOf(name+"=");
  var len = start+name.length+1;
  if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
  if (start == -1) return null;
  var end = document.cookie.indexOf(";",len);
  if (end == -1) end = document.cookie.length;
  return unescape(document.cookie.substring(len,end));
}

//*************************************************************
//* This function sets a cookie value
//*************************************************************
function Set_Cookie(name,value,expires,path,domain,secure) {
  if (path == "undefined" || path == null) {
    path = "/" ;    	
  }
  document.cookie = name + "=" +escape(value) +
    ( (expires) ? ";expires=" + expires.toGMTString() : "") +
    ( (path) ? ";path=" + path : "") + 
    ( (domain) ? ";domain=" + domain : "") +
    ( (secure) ? ";secure" : "");
}

//*************************************************************
//* This function deletes a cookie value
//*************************************************************
function Delete_Cookie(name,path,domain) {
  if (Get_Cookie(name)) document.cookie = name + "=" +
    ( (path) ? ";path=" + path : "") +
    ( (domain) ? ";domain=" + domain : "") +
    ";expires=Thu, 01-Jan-70 00:00:01 GMT";
}

//*************************************************************
//* This function checks to see if cookies are enabled. 
//*************************************************************
function isCookieEnabled() {
   if (document.all) return navigator.cookieEnabled;
   var today = new Date();
   Set_Cookie('testcookie',today.getTime());
   var tc = Get_Cookie('testcookie');
   Delete_Cookie('testcookie');
   return (tc == today.getTime());
}

//*************************************************************
//* This function is only used in Isabel to select the correct 
//* after the terms and conditions have been accepted. 
//*************************************************************
function AcceptTC(Lang) {
  if (Lang == 'EN') { location.href = "../Isabel2DBAI/servlet/Isabel2DBAI?Lang=English&Origin=TC" }
  if (Lang == 'DU') { location.href = "../Isabel2DBAI/servlet/Isabel2DBAI?Lang=Dutch&Origin=TC" }
  if (Lang == 'FR') { location.href = "../Isabel2DBAI/servlet/Isabel2DBAI?Lang=French&Origin=TC" }
}

//*************************************************************
//* This function is only used in Isabel to return to the
//* home page if the terms and conditions are rejected.
//*************************************************************
function DeclineTC(Lang) {
  eval(location.href = "../default.asp?Lang="+Lang)
}

//*************************************************************
//* This function takes a value from a pull down combo box and
//* then drives that page into specified target.
//*************************************************************
function changePageNews(selector) {
  var s = selector.options[selector.selectedIndex].value;
  sArray = s.split(",")
  if (sArray[0]) { 
    selector.selectedIndex = 0 ;
    if (sArray[1] == "_top") {
      parent.location = sArray[0] ;
    }
    else {
      if (sArray[1] == "_blank") {
        window.open(sArray[0]);
      }
      else {
        parent.main.location.href = sArray[0] ;
      }
    }
  }
}

//***************************************************************
//* This functions pops up the OLA search window for Switzerland
//***************************************************************
function OlaPopup(Lang, Search) {

//   olalink = "http://dnb" + Lang + ".custhelp.com/cgi-bin/dnb"+ Lang + ".cfg/php/enduser/std_alp.php?p_new_search=1&p_scf_c_country_" ;
  olalink = 'http://dnb'+ Lang + '.custhelp.com/cgi-bin/dnb'+ Lang + '.cfg/php/enduser/std_alp.php?p_new_search=1&p_scf_' ;

 if (Lang=="en") {
   olalink = olalink + "3=" + "36" ;
  } 
 if (Lang=="ge") {
   olalink = olalink + "5=" + "61" ;
  } 
 if (Lang=="fr") {
   olalink = olalink + "5=" + "102" ;
  } 
 if (Lang=="it") {
   olalink = olalink + "5=" + "66" ;
  } 
  
 if (Search != null) {
    strSearch = ""
    for (i=0; i<Search.length; i++) {
      t = Search.charAt(i);
      if (t == '+') {
        t='%2B'
      }
      strSearch = strSearch + t
    }
    olalink = olalink + '&p_search_text=xSTA %2B' + strSearch ;
  }

  window.open(olalink);
}

function Ola_en() {
 OlaPopup('en',null); }
 
function Ola_it() {
 OlaPopup('it',null); }
 
function Ola_ge() {
 OlaPopup('ge',null); }
 
function Ola_fr() {
 OlaPopup('fr',null); }
 
function ItsFull(lng) {
 fultxt = '&nbsp;<span class="full">&nbsp;';
 switch (lng) 
 { 
   case "FR" : 
    fultxt = fultxt + 'Complet!';
    break; 
   case "DE" : 
    fultxt = fultxt + 'Ausgebucht!';
    break; 
   default : 
    fultxt = fultxt + 'Full';
 } 
 fultxt = fultxt + '&nbsp;</span>';
 document.write(fultxt);
}

// Javascript
var SelTab
function OverTab(butn) {
  butnam="Tab"+butn
  document.getElementById(butnam).style.color='#000066';
  document.getElementById(butnam).style.fontWeight='bold';
}

function OutTab(butn) {
  butnam="Tab"+butn
  document.getElementById(butnam).style.color='#000000';
	if (butn != SelTab) {  
 	 document.getElementById(butnam).style.fontWeight='normal'; }  
}

function ClicTab(butn) {
// First Unclick all Buttons
  for (i=1; i<5; i++) {
   UnclicTab(i)  }
  butnam="Tab"+butn
//  document.getElementById(butnam).style.background = "url('Yellow_100.gif')" ;
  document.getElementById(butnam).style.background = "url('../../images/Yellow_tab_100x20.gif')" ;
  document.getElementById(butnam).style.color='#000000';
  document.getElementById(butnam).style.fontWeight='bold';
  divnam="Div"+butn
  document.getElementById(divnam).style.visibility='visible';  
  document.getElementById(divnam).style.display='block'; 
  SelTab = butn
}

function UnclicTab(butn) {
  butnam="Tab"+butn
//  document.getElementById(butnam).style.background = "url('Grey_100.gif')" ;
  document.getElementById(butnam).style.background = "url('../../images/Grey_tab_100x20.gif')" ;
  document.getElementById(butnam).style.color='#000000';
  document.getElementById(butnam).style.fontWeight='normal';
  divnam="Div"+butn
  document.getElementById(divnam).style.visibility='hidden';  
  document.getElementById(divnam).style.display='none';
}
// -->