﻿// JScript-Datei


var ex = null;


/**
  * open the language specific dealer.
  */
function openWizzard(selval)
{
  var popurl = (selval ? selval : window.event.srcElement.href);
  try {
    var win = window.open(popurl, "_mirror", "width=730,height=440,toolbar=no,location=no,directories=no,scrollbars=yes,status=yes,menubar=no,resizable=yes");
    win.focus();
  } catch(ex) {
    /* TODO */
  }
} // openSource


/**
  * open the language specific web assistant.
  */
function openWebassistant()
{
  var popurl = "";
  try {
      switch (compcty) {
        case "jp":
        popurl = "http://servicefunctions.bosch.com/user/webassistant/search.asp?country=jp&lang=ja";
        break;
      default:
        popurl = "http://servicefunctions.bosch.com/user/webassistant/search.asp?country=" + compcty + "&lang=" + complng;
        break;
    }
    
    window.open(popurl, "wa", "width=564,height=528,toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=no,resizable=no");
  } catch(ex) {
    /* TODO */
  }
} // openWebassistant


/**
  * diffrent urls for some countries.
  */
function openContact()
{
  var popurl = "";
  
  try {
    switch (compcty) {
        case "jp":
        popurl = "https://ssl.bosch.com/jp/contact/";
        break;
      case "cn":
        popurl = "http://header.bosch.com.cn/web/site/dealer_locator.jsp?lan=" + complng + "-" + compcty.toUpperCase();
        break;
      case "xx":
        popurl = "https://ssl.bosch.com/xx/contact/xx.php";
        break;
      case "br":
        popurl = "http://www.bosch.com.br/br/contato/index.html?lang=" + complng;
        break;
      default:
        popurl = "http://servicefunctions.bosch.com/user/contactdealer/index.asp?country=" + compcty + "&lang=" + complng + "&app=contact";
        break;
    }
    
    window.open(popurl, "contact", "width=564,height=528,toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=no,resizable=yes");
  } catch(ex) {
    /* TODO */
  }

} // openContact


/**
  * open the language specific dealer.
  */
function openSource()
{
  var popurl = "";
  
  try {
    switch (compcty) {
      case "jp":
        popurl  = "http://www.bosch.co.jp/jp/header/dealer_locator/";
        break;
    }
    window.open(popurl, "dealer", "width=564,height=528,toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=no,resizable=yes");
  } catch(ex) {
    /* TODO */
  }
} // openSource


/**
  * open the language specific newsletter abo.
  */
function openNewsletter()
{
  var popurl = "";
  
  try {
    switch (compcty) {
      default:
        popurl = "http://www.newsletter-bosch.com/index.cfm?fuseaction=subnew&l=3&cl=" + complng + "-" + compcty.toUpperCase();
        break;
    }        
    window.open(popurl, "newsletter", "width=787,height=700,toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=no,resizable=yes");
  } catch(ex) {
    /* TODO */
  }
} // openNewsletter


/**
  * open the language specific about popup.
  */
function openAbout()
{
  var popurl = "";
  
  try {
    switch (complng) {
      case "de":
        popurl = "http://www.bosch.com/content/language1/html/1062.htm";
        break;
      default:
        popurl = "http://www.bosch.com/content/language2/html/1062.htm";
        break;
    }        
    window.open(popurl, "newsletter", "width=420,height=600,toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=no,resizable=yes");
  } catch(ex) {
    /* TODO */
  }
} // openAbout
