/* $Change: 2021583 $ $DateTime: 2007/09/07 09:32:12 $ $Revision: #4 $ */

/*******************************************************************
*
* File    : notescallmething.js
* Created : February 14, 2005
* Creator : Jeremy Brown
* Purpose : Created revision of callme.js and minicallme.js for Notes-based pages
***********************************************************************/
/* Launches Call Me Window with appropriate DAD */
function openNewWindow(URL){
    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=" + parent_url.replace(amp, "%26").replace(amp, "%26") , "awindow", "width=600,height=650");}
    function get_url(URL){
    alert (URL)
}

var globalLanguage = (globalLanguage != 'undefined') ? globalLanguage : "en";
var title = 'Questions?';
var content = 'Get real-time assistance now!';
var mini_title = 'Questions?';
var mini_content = 'Get real-time assistance now!';

/* Establishes Language and Country Specific content for the Generic Call Me function. Content with a DAD other than 'we' should be supplied here as special characters */

/* Mini Call Me */
if (globalLanguage == 'en') {mini_title = 'Questions?'; mini_content = 'Get real-time assistance now!'}
if (globalLanguage == 'de' || globalLanguage == 'de-DE' || globalLanguage == 'de-AT'){mini_title = 'Fragen?'; mini_content = 'Wir rufen sofort zurück!'}
if (globalLanguage == 'de-NL'){mini_title = 'Vragen?'; mini_content = 'Gebruik de GRATIS terugbelservice!'}
if (globalLanguage == 'de-CH'){mini_title = 'Fragen?'; mini_content = 'Wir rufen sofort zurück!'}
if (globalLanguage == 'es'){mini_title = '¿Preguntas?'; mini_content = 'Haga click aqu? llene el formulario y un representante le llamar?en el término de las siguientes 15 minutos.'}
if (globalLanguage == 'es-MX'){mini_title = '¿Preguntas?'; mini_content = 'Haga click aqu? llene el formulario y un representante le llamar?en el término de las siguientes 15 minutos.'}
if (globalLanguage == 'es-ES'){mini_title = '¿Tiene alguna pregunta?'; mini_content = '¡Le llamaremos en pocos minutos!'}
if (globalLanguage == 'fi'){mini_title = 'Kysymyksi?'; mini_content = 'Saat apua saman tien!'}
if (globalLanguage == 'sv'){mini_title = 'Frågor?'; mini_content = 'Vi hjälper dig direkt!'}
if (globalLanguage == 'pt'){mini_title = 'Dúvidas?'; mini_content = 'Obtenha ajuda imediata!'}
if (globalLanguage == 'fr' || globalLanguage == 'fr-FR' || globalLanguage == 'fr-CH'){mini_title = 'Des questions commerciales ?'; mini_content = 'Nous vous contactons dans quelques minutes.'}
if (globalLanguage == 'fr-LU' || globalLanguage == 'fr-BE'){mini_title = 'Des Questions?'; mini_content = 'Utilisez notre service de rappel Gratuit'}
if (globalLanguage == 'de-LU' || globalLanguage == 'de-BE'){mini_title = 'Vragen?'; mini_content = 'Gebruik de GRATIS terugbelservice'}
if (globalLanguage == 'it'){mini_title = 'Domande?'; mini_content = 'Richiedi assistenza in tempo reale!'}
if (globalLanguage == 'zh-CN'){mini_title = '800 820-3622'; mini_content = '&#31435;&#21363;&#30003;&#35831;NI&#30340;&#23454;&#26102;&#24110;&#21161;&#65281;'}
if (globalLanguage == 'zh-TW'){mini_title = '&#26377;&#20219;&#20309;&#21839;&#38988;&#21966;??'; mini_content = '&#25353;&#36889;&#35041;&#21363;&#21487;&#29554;&#24471;&#21363;&#26178;&#22238;&#35206;!'}
if (globalLanguage == 'ru'){mini_title = '&#1045;&#1089;&#1090;&#1100; &#1074;&#1086;&#1087;&#1088;&#1086;&#1089;&#1099;?'; mini_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'){mini_title = '&#12372;&#36074;&#21839;&#12399;&#12371;&#12385;&#12425;'; mini_content = '&#12486;&#12463;&#12491;&#12459;&#12523;&#12450;&#12489;&#12496;&#12452;&#12470;&#12364;&#12372;&#36899;&#32097;&#12356;&#12383;&#12375;&#12414;&#12377;&#12290;'}
if (globalLanguage == 'ko'){mini_title = '&#47928;&#51032; &#49324;&#54637;&#51060; &#51080;&#51004;&#49464;&#50836;?'; mini_content = '&#49892;&#49884;&#44036; &#51228;&#54408; &#49345;&#45812;&#51012;&#49888;&#52397;&#54616;&#49901;&#49884;&#50724;!'}

/* Call Me */
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í y llene el formulario para obtener ayuda ahora mismo.'}
if (globalLanguage == 'es-MX'){title = '¿Preguntas?'; content = 'Haga clic aquí y llene el formulario para obtener ayuda ahora mismo.'}
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;&#21839;&#38988;&#21966;??'; content = '&#25353;&#36889;&#35041;&#21363;&#21487;&#29554;&#24471;&#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;'}

/* Builds the Generic|Original version of Call Me (operator icon & "Questions? Get LIVE help now" or some variant text) */
function generic_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="http://www.ni.com/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="http://www.ni.com/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="http://www.ni.com/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>');
    }
}

function barstyle()
{
	document.write ('<div class="barstyle"><img src="http://www.ni.com/images/global/us/icon_phone.gif" alt="" width="17" height="13" border="0"> ');
	document.write (mini_title);
	document.write (' <a href="javascript:openNewWindow(window.location.href);" class="nodeco">');
	document.write (mini_content);
	document.write ('</a></div>');
}

