﻿/* $Change: 2075428 $ $DateTime: 2007/10/22 14:38:08 $ $Revision: #10 $ */

/*******************************************************************
*
* File    : contactandassistance.js
* Created : January 24, 2006
* Creator : Jeremy Brown
* Purpose : Creates the appropriate translation of "Assistance & Contact" based on lang attribute in html tag
***********************************************************************/
/* Window Launcher */
function openNewWindow(URL){
	var strReplaceAll = URL;
	var intIndexOfMatch = strReplaceAll.indexOf( "&" );
	 
	// Loop over the string value replacing out each matching
	// substring.
	while (intIndexOfMatch != -1)
	{
		// Relace out the current instance.
		strReplaceAll = strReplaceAll.replace( "&", "%26" )
	
		// Get the index of any next matching substring.
		intIndexOfMatch = strReplaceAll.indexOf( "&" );
	}
    var parent_url = URL
    var amp = '&'
    NewWindow=window.open("https://sine.ni.com/apps/utf8/nicc.call_me?p_action=call&p_form_id=CALLME&p_url=" + strReplaceAll , "awindow", "width=825,height=600,scrollbars=1, resizable=1");}
    function get_url(URL){
    alert (URL)
}

/* Determines lang value */
var contentLanguage = document.getElementsByTagName("html")[0].lang;
var callmelang = 'en';
var globalLanguage = (contentLanguage != 'undefined') ? contentLanguage : callmelang;

var title = 'Questions?';
var content = 'Get real-time assistance now!';
if (globalLanguage == 'en') {title = 'Questions?'; content = 'Get real-time assistance now!'}
if (globalLanguage == 'de' || globalLanguage == 'de-DE' || globalLanguage == 'de-AT'){title = 'Fragen?'; content = 'Wir rufen sofort zurück!'}
if (globalLanguage == 'de-NL'){title = 'Vragen?'; content = 'Gebruik de GRATIS terugbelservice!'}
if (globalLanguage == 'de-CH'){title = 'Fragen?'; content = 'Wir rufen sofort zurück!'}
if (globalLanguage == 'es'){title = '¿Preguntas?'; content = 'Haga clic aquí, llene el formulario y un representante técnico le llamará dentro de dos horas.'}
if (globalLanguage == 'es-MX'){title = '¿Preguntas?'; content = 'Haga clic aquí, llene el formulario y un representante técnico le llamará dentro de dos horas.'}
if (globalLanguage == 'es-ES'){title = '¿Tiene alguna pregunta?'; content = '¡Le llamaremos en pocos minutos!'}
if (globalLanguage == 'fi'){title = 'Kysymyksi?'; content = 'Saat apua saman tien!'}
if (globalLanguage == 'sv'){title = 'Frågor?'; content = 'Vi hjälper dig direkt!'}
if (globalLanguage == 'pt'){title = 'Dúvidas?'; content = 'Obtenha ajuda imediata!'}
if (globalLanguage == 'fr' || globalLanguage == 'fr-FR' || globalLanguage == 'fr-CH'){title = 'Des questions commerciales ?'; content = 'Nous vous contactons dans quelques minutes.'}
if (globalLanguage == 'fr-LU' || globalLanguage == 'fr-BE'){title = 'Des Questions?'; content = 'Utilisez notre service de rappel Gratuit'}
if (globalLanguage == 'de-LU' || globalLanguage == 'de-BE'){title = 'Vragen?'; content = 'Gebruik de GRATIS terugbelservice'}
if (globalLanguage == 'it'){title = 'Domande?'; content = 'Richiedi assistenza in tempo reale!'}
if (globalLanguage == 'zh-CN'){title = '&#24744;&#26377;&#20160;&#20040;&#38382;&#39064;?'; content = '&#31435;&#21363;&#30003;&#35831;NI&#30340;&#23454;&#26102;&#24110;&#21161;&#65281;'}
if (globalLanguage == 'zh-TW'){title = '&#26377;&#20219;&#20309;&#37197;&#32622;&#31995;&#32113;&#30340;&#21839;&#38988;&#21966;?'; content = '&#25353;&#36889;&#35041;&#21487;&#24471;&#37559;&#21806;&#21069;&#30340;&#21363;&#26178;&#22238;&#35206;'}
if (globalLanguage == 'ru'){title = '&#1045;&#1089;&#1090;&#1100; &#1074;&#1086;&#1087;&#1088;&#1086;&#1089;&#1099;?'; content = '&#1054;&#1073;&#1088;&#1072;&#1090;&#1080;&#1090;&#1077;&#1089;&#1100; &#1079;&#1072; &#1087;&#1088;&#1103;&#1084;&#1086;&#1081; &#1090;&#1077;&#1093;&#1085;&#1080;&#1095;&#1077;&#1089;&#1082;&#1086;&#1081; &#1087;&#1086;&#1076;&#1076;&#1077;&#1088;&#1078;&#1082;&#1086;&#1081; &#1089;&#1077;&#1081;&#1095;&#1072;&#1089;!'}
if (globalLanguage == 'ja'){title = '&#12372;&#36074;&#21839;&#12399;&#20170;&#12377;&#12368;LIVE&#12504;&#12523;&#12503;&#12408;&#65281;'; content = '&#12486;&#12463;&#12491;&#12459;&#12523;&#12450;&#12489;&#12496;&#12452;&#12470;&#12540;&#12364;&#12372;&#36899;&#32097;&#12356;&#12383;&#12375;&#12414;&#12377;&#12290;'}
if (globalLanguage == 'ko'){title = 'Call me now!'; content = '&#49892;&#49884;&#44036;&#51204;&#54868;&#49345;&#45812;&#51012; &#48155;&#51004;&#49901;&#49884;&#50724;'}

var CandALabel = 'Assistance and Contact';
if (globalLanguage == 'en') {CandALabel = 'Assistance and Contact ';}
if (globalLanguage == 'de' || globalLanguage == 'de-DE' || globalLanguage == 'de-AT'){CandALabel = 'Unterstützung und Kontakt';}
if (globalLanguage == 'de-NL'){}
if (globalLanguage == 'de-CH'){CandALabel = 'Unterstützung und Kontakt';}
if (globalLanguage == 'es'){CandALabel = 'Asistencia Técnica y Cómo Contactarnos';}
if (globalLanguage == 'es-MX'){CandALabel = 'Asistencia Técnica y Cómo Contactarnos';}
if (globalLanguage == 'es-ES'){CandALabel = 'Asistencia Técnica y Cómo Contactarnos';}
if (globalLanguage == 'fi'){}
if (globalLanguage == 'sv'){}
if (globalLanguage == 'pt'){}
if (globalLanguage == 'fr' || globalLanguage == 'fr-FR' || globalLanguage == 'fr-CH'){CandALabel = 'Aide et ressources';}
if (globalLanguage == 'fr-LU' || globalLanguage == 'fr-BE'){CandALabel = 'Aide et ressources';}
if (globalLanguage == 'de-LU' || globalLanguage == 'de-BE'){CandALabel = 'Aide et ressources';}
if (globalLanguage == 'it'){CandALabel = 'Assistenza e contatti';}
if (globalLanguage == 'zh-CN'){CandALabel = '&#32034;&#21462;&#24403;&#22320;NI&#24037;&#31243;&#24072;&#30340;&#20813;&#36153;&#25216;&#26415;&#21672;&#35810;';}
if (globalLanguage == 'zh-TW'){CandALabel = '&#23563;&#27714;&#21332;&#21161; &#33287; NI&#32879;&#32097;';}
if (globalLanguage == 'ja'){CandALabel = '&#12362;&#21839;&#12356;&#21512;&#12431;&#12379;';}
if (globalLanguage == 'ko'){CandALabel = '&#44256;&#44061; &#51648;&#50896; &#48143; &#47928;&#51032;';}

var gci = 'Global Contact Information';
if (globalLanguage == 'en') {gci = 'Global Contact Information';}
if (globalLanguage == 'de' || globalLanguage == 'de-DE' || globalLanguage == 'de-AT'){gci = 'Internationale Kontaktinformationen';}
if (globalLanguage == 'es'){gci = 'Informaci&oacute;n de Contacto Mundial';}
if (globalLanguage == 'es-MX'){gci = 'Informaci&oacute;n de Contacto Mundial';}
if (globalLanguage == 'es-ES'){gci = 'Informaci&oacute;n de Contacto Mundial';}
if (globalLanguage == 'fr' || globalLanguage == 'fr-FR' || globalLanguage == 'fr-CH'){gci = 'Contact : informations g&eacute;n&eacute;rales';}
if (globalLanguage == 'fr-LU' || globalLanguage == 'fr-BE'){gci = 'Contact : informations g&eacute;n&eacute;rales';}
if (globalLanguage == 'de-LU' || globalLanguage == 'de-BE'){gci = 'Contact : informations g&eacute;n&eacute;rales';}
if (globalLanguage == 'it'){gci = 'Informazioni e contatti';}
if (globalLanguage == 'zh-CN'){gci = '&#20840;&#29699;&#21508;&#20998;&#25903;&#26426;&#26500;&#32852;&#31995;&#20449;&#24687;';}
if (globalLanguage == 'zh-TW'){gci = '&#26597;&#35426;&#20840;&#29699;&#21508;&#20998;&#20844;&#21496;&#30340;&#32879;&#32097;&#26041;&#24335;';}
if (globalLanguage == 'ja'){gci = '&#19990;&#30028;&#21508;&#22320;&#12398;&#12362;&#21839;&#12356;&#21512;&#12431;&#12379;&#20808;';}
if (globalLanguage == 'ko'){gci = '&#54644;&#50808; &#51648;&#49324; &#50672;&#46973;&#52376;';}

function contact_assistance()
{
    document.write('			<h2 class="assistance">' + CandALabel + '</h2>');
	document.write('			<div id="callme">');
	if(globalLanguage == 'ko')
    {
        document.writeln ('<table border="0" cellspacing="0" cellpadding="0" width="98%">');
        document.writeln ('  <tr valign="top">');
        document.writeln ('    <td width="30"><a href="javascript:openNewWindow(window.location.href);"><img src="/images/global/us/callme.gif" width="30" height="32" border="0" alt=""></a></td>');
        document.write ('    <td valign="middle" style="padding-left:5px;"><a href="javascript:openNewWindow(window.location.href);"><strong>');
        document.write(title);
        document.write ('</strong></a>');
        document.write (' ');
        document.write(content);
        document.write ('</td>');
        document.writeln ('  </tr>');
        document.writeln ('</table>');
    }
	else if(globalLanguage == 'ja')
    {
        document.writeln ('<table border="0" cellspacing="0" cellpadding="0" width="98%">');
        document.writeln ('  <tr valign="top">');
        document.writeln ('    <td width="30"><a href="javascript:openNewWindow(window.location.href);"><img src="/images/global/us/callme.gif" width="30" height="32" border="0" alt=""></a></td>');
        document.write ('    <td valign="middle" style="padding-left:5px;"><span style="color: #bb0000;"><strong>');
        document.write(title);
        document.write ('</strong></span><br><a href="javascript:openNewWindow(window.location.href);" style="text-decoration: none;">');
        document.write(content);
        document.write ('</a></td>');
        document.writeln ('  </tr>');
        document.writeln ('</table>');
    }
    else
    {
        document.writeln ('<table border="0" cellspacing="0" cellpadding="0" width="98%">');
        document.writeln ('  <tr valign="top">');
        document.writeln ('    <td width="30"><a href="javascript:openNewWindow(window.location.href);"><img src="/images/global/us/callme.gif" width="30" height="32" border="0" alt=""></a></td>');
        document.write ('    <td valign="middle" style="padding-left:5px;"><span style="color: #bb0000;"><strong>');
        document.write(title);
        document.write ('</strong></span>');
        document.write (' <a href="javascript:openNewWindow(window.location.href);" style="text-decoration: none;">');
        document.write(content);
        document.write ('</a></td>');
        document.writeln ('  </tr>');
        document.writeln ('</table>');
    }
	document.write('			</div>');
	document.write('			<div id="globe">');
	document.write('				<span class="cta"> &raquo; </span> <a href="http://sine.ni.com/apps/utf8/nicc.call_me">' + gci + '</a><br>');
	document.write('			</div>');
}

