window.onload = externalLinks;



// Variables

var emailExp = /^([a-zA-Z0-9._-]+)@([a-zA-Z0-9-])+(\.[a-zA-Z0-9-]+)+$/;

var dateExp = /^\d{1,2}\/\d{1,2}\/(\d{2}|\d{4})$/;

var ie_mac = false;

var Mac = /Mac/g;

var MS = /MSIE/g;

var browser = "'"+navigator.userAgent+"'";

if (MS.test(browser)&&Mac.test(browser)) ie_mac = true;

var navArr = new Array("snav_products","snav_solutions","snav_company","snav_press","snav_partners","snav_contact","snav_support");



// Flash Detect for version 6

var MM_contentVersion = 6;

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

if (plugin) {

	var words = navigator.plugins["Shockwave Flash"].description.split(" ");

	for (var i = 0; i < words.length; ++i) { if (isNaN(parseInt(words[i]))) continue; var MM_PluginVersion = words[i]; }

	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;

} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0  && (navigator.appVersion.indexOf("Win") != -1)) {

	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag

	document.write('on error resume next \n');

	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');

	document.write('</SCR' + 'IPT\> \n');

}



// Flash Detect for version 8

var MM_contentVersion8 = 8;

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

if (plugin) {

	var words = navigator.plugins["Shockwave Flash"].description.split(" ");

	for (var i = 0; i < words.length; ++i) { if (isNaN(parseInt(words[i]))) continue; var MM_PluginVersion = words[i]; }

	var MM_FlashCanPlay8 = MM_PluginVersion >= MM_contentVersion8;

} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0  && (navigator.appVersion.indexOf("Win") != -1)) {

	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag

	document.write('on error resume next \n');

	document.write('MM_FlashCanPlay8 = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion8)))\n');

	document.write('</SCR' + 'IPT\> \n');

}



// QuickTime Detect

var QuickTimeVersion = 0;

var agent = navigator.userAgent.toLowerCase(); 

// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Quicktime plugin in plugin array

if (navigator.plugins != null && navigator.plugins.length > 0) {

	for (i=0; i < navigator.plugins.length; i++ ) {

		var plugin =navigator.plugins[i];

		if (plugin.name.indexOf("QuickTime") > -1) QuickTimeVersion = parseFloat(plugin.name.substring(18));

	}

}

// IE4+ Win32:  attempt to create an ActiveX object using VBScript

else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {

	document.write('<scr' + 'ipt language="VBScript"\> \n');

	document.write('on error resume next \n');

	document.write('dim obQuicktime \n');

	document.write('set obQuicktime = CreateObject("QuickTimeCheckObject.QuickTimeCheck.1") \n');

	document.write('if IsObject(obQuicktime) then \n');

	document.write('   if obQuicktime.IsQuickTimeAvailable(0) then \n');

	document.write('      QuickTimeVersion = CInt(Hex(obQuicktime.QuickTimeVersion) / 1000000) \n');

	document.write('   end if \n');

	document.write('end if \n');

	document.write('</scr' + 'ipt\> \n');

}

// Can't detect in all other cases

else QuickTimeVersion = -1;



// Functions

function showsnav(obj) {

	if (!ie_mac) {

		for (var i=0; i<navArr.length; i++) {

			if (document.getElementById(navArr[i])) hide(navArr[i]);

		}

		if (document.getElementById(obj)) show(obj);

	}

}



function genSpecialFlash(path) {

	if (MM_FlashCanPlay) {

		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" id="special" width="450" height="253" align="middle" class="block"><param name="allowScriptAccess" value="sameDomain"/><param name="movie" value="'+path+'"/><param name="loop" value="false"/><param name="menu" value="false"/><param name="quality" value="best"/><param name="bgcolor" value="#ffffff"/>');

		document.write('<embed src="'+path+'" loop="false" menu="false" quality="best" bgcolor="#fff" width="450" height="253" name="special" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" class="block" />');

		document.write('</object>');

	} 

}



// generate the home page flash (flash player 8 version)

function genHomeFlash(obj) {

	if (MM_FlashCanPlay8) {

		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="780" height="439" id="home" align="middle" class="block"><param name="allowScriptAccess" value="sameDomain"/><param name="movie" value="/home.swf?skipIntro='+obj+'"/><param name="menu" value="false"/><param name="quality" value="high"/><param name="bgcolor" value="#ffffff"/>');

		document.write('<embed src="/home.swf?skipIntro='+obj+'" menu="false" quality="high" bgcolor="#ffffff" width="780" height="439" name="home" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" class="block" />');

		document.write('</object>');

	} else document.write('<img src="/images/home_noflash.jpg" width="720" height="360" alt="Are we connected?" title="Are we connected?" class="block" />');

	document.write('<style type="text/css">#home_flash {padding:0;}</style>')

}





function genHomeFlashfr(obj) {

	if (MM_FlashCanPlay8) {

		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="780" height="439" id="home" align="middle" class="block"><param name="allowScriptAccess" value="sameDomain"/><param name="movie" value="/flash/home_fr.swf?skipIntro='+obj+'"/><param name="menu" value="false"/><param name="quality" value="best"/><param name="bgcolor" value="#ffffff"/>');

		document.write('<embed src="/flash/home_fr.swf?skipIntro='+obj+'" menu="false" quality="best" bgcolor="#fff" width="780" height="439" name="home" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" class="block" />');

		document.write('</object>');

	} else document.write('<img src="/images/home_noflash.jpg" width="720" height="360" alt="Are we connected?" title="Are we connected?" class="block" />');
	
	document.write('<style type="text/css">#home_flash {padding:0;}</style>')

}





function genHomeFlashjp(obj) {

	if (MM_FlashCanPlay8) {

		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="780" height="439" id="home" align="middle" class="block"><param name="allowScriptAccess" value="sameDomain"/><param name="movie" value="/flash/home_jp.swf?skipIntro='+obj+'"/><param name="autoplay" value="true"><param name="menu" value="false"/><param name="quality" value="best"/><param name="bgcolor" value="#ffffff"/>');

		document.write('<embed src="/flash/home_jp.swf?skipIntro='+obj+'" menu="false" quality="best" bgcolor="#fff" width="780" height="439" name="home" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" class="block" />');

		document.write('</object>');

	} else document.write('<img src="/images/home_noflash.jpg" width="720" height="360" alt="Are we connected?" title="Are we connected?" class="block" />');
	
	document.write('<style type="text/css">#home_flash {padding:0;}</style>')

}


/*
//OLD

function genHomeFlashfr(obj) {

	if (MM_FlashCanPlay) {

		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="720" height="360" id="home" align="middle" class="block"><param name="allowScriptAccess" value="sameDomain"/><param name="movie" value="/flash/home_fr.swf?skipIntro='+obj+'"/><param name="loop" value="false"/><param name="menu" value="false"/><param name="quality" value="best"/><param name="bgcolor" value="#ffffff"/>');

		document.write('<embed src="/flash/home_fr.swf?skipIntro='+obj+'" loop="false" menu="false" quality="best" bgcolor="#fff" width="720" height="360" name="home" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" class="block" />');

		document.write('</object>');

	} else document.write('<img src="/images/home_noflash.jpg" width="720" height="360" alt="Are we connected?" title="Are we connected?" class="block" />');

}





function genHomeFlashjp(obj) {

	if (MM_FlashCanPlay) {

		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="720" height="360" id="home" align="middle" class="block"><param name="allowScriptAccess" value="sameDomain"/><param name="movie" value="/flash/home_jp.swf?skipIntro='+obj+'"/><param name="loop" value="false"/><param name="autoplay" value="true"><param name="menu" value="false"/><param name="quality" value="best"/><param name="bgcolor" value="#ffffff"/>');

		document.write('<embed src="/flash/home_jp.swf?skipIntro='+obj+'" loop="false" menu="false" quality="best" bgcolor="#fff" width="720" height="360" name="home" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" class="block" />');

		document.write('</object>');

	} else document.write('<img src="/images/home_noflash.jpg" width="720" height="360" alt="Are we connected?" title="Are we connected?" class="block" />');

}

*/



function genProdFlash(obj,title) {

	if (MM_FlashCanPlay) {

		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="540" height="237" align="middle" class="block"><param name="allowScriptAccess" value="sameDomain"/><param name="movie" value="/flash/'+obj+'.swf"/><param name="loop" value="false"/><param name="menu" value="false"/><param name="quality" value="best"/><param name="bgcolor" value="#ffffff"/>');

		document.write('<embed src="/flash/'+obj+'.swf" loop="false" menu="false" quality="best" bgcolor="#fff" width="540" height="237" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" class="block" />');

		document.write('</object>');

	} else document.write('<img src="/images/hdrs/lifesize_'+obj+'_noflash.jpg" width="540" height="237" alt="'+title+'" title="'+title+'"class="block" />');

}

function genQuickTime(obj) {

	if (QuickTimeVersion > 5) {

		document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="150" height="16" codebase="http://www.apple.com/qtactivex/qtplugin.cab"><param name="src" value="/files/'+obj+'" /><param name="controller" value="true" /><param name="target" value="myself" /><param name="href" value="/files/'+obj+'" /><param name="pluginspage" value="http://www.apple.com/quicktime/download/index.html" /><param name="autoplay" value="false">');

		document.write('<embed width="150" height="16" controller="true" target="myself" href="/files/'+obj+'" src="/files/'+obj+'" bgcolor="#fff" border="0" pluginspage="http://www.apple.com/quicktime/download/index.html" autoplay="false">');

		document.write('</object>');

	} else document.write('<img src="/images/icons/quicktime.gif" width="20" height="16" alt="Get QuickTime" title="Get QuickTime" class="vmid" /> <a rel="external" href="http://www.apple.com/quicktime/">Get QuickTime</a>');

}

function externalLinks() { 

	if (!document.getElementsByTagName) return; 

	var anchors = document.getElementsByTagName("a"); 

	for (var i=0; i<anchors.length; i++) { 

		var anchor = anchors[i]; 

		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank"; 

	} 

}

function show(obj) {

	document.getElementById(obj).style.display = "block";

}

function hide(obj) {

	document.getElementById(obj).style.display = "none";

}

function navon(obj) {

	document.getElementById(obj).src = eval(obj + "_on.src");

}

function navover(obj) {

	document.getElementById(obj).src = eval(obj + "_over.src");

}

function navoff(obj) {

	document.getElementById(obj).src = eval(obj + "_off.src");

}

function isEmpty(obj) {

	if((obj.replace(/ /g,"")).replace(/\r\n/g,"").replace(/\r/g,"").replace(/\n/g,"") == "") return true;

	else return false;

}

function genemail(user,domain,suffix) {

	document.write('<a href="'+'mailto:'+user+'@'+domain+'.'+suffix+'">'+user+'@'+domain+'.'+suffix+'</a>');

}

function genemail2(user,domain,suffix,text) {

	document.write('<a href="'+'mailto:'+user+'@'+domain+'.'+suffix+'">'+text+'</a>');

}

function txtCt(obj,maxlimit) {

	if(obj.value.length>maxlimit)obj.value=obj.value.substring(0,maxlimit);

}

function ckVal (obj,obj2) {

	if (obj.selectedIndex > 0) eval(obj2 + " = 1;");

	else eval(obj2+"=0;");

}

function ckVal2 (obj,obj2) {

	if (obj.value != "") eval(obj2 + " = 1;");

	else eval(obj2+"=0;");

}

function ckVal3 (obj,obj2) {

	if (obj.checked) eval(obj2 + " = 1;");

	else eval(obj2+"=0;");

}

function setVal (obj,obj2) {

	eval(obj2+"="+obj);

}



// Navigation

products_off = new Image;

products_off.src = "/images/nav/products_off.gif";

products_on = new Image;

products_on.src = "/images/nav/products_on.gif";



solutions_off = new Image;

solutions_off.src = "/images/nav/solutions_off.gif";

solutions_on = new Image;

solutions_on.src = "/images/nav/solutions_on.gif";



company_off = new Image;

company_off.src = "/images/nav/company_off.gif";

company_on = new Image;

company_on.src = "/images/nav/company_on.gif";



press_off = new Image;

press_off.src = "/images/nav/press_off.gif";

press_on = new Image;

press_on.src = "/images/nav/press_on.gif";



partners_off = new Image;

partners_off.src = "/images/nav/partners_off.gif";

partners_on = new Image;

partners_on.src = "/images/nav/partners_on.gif";



contact_us_off = new Image;

contact_us_off.src = "/images/nav/contact_us_off.gif";

contact_us_on = new Image;

contact_us_on.src = "/images/nav/contact_us_on.gif";



support_off = new Image;

support_off.src = "/images/nav/support_off.gif";

support_on = new Image;

support_on.src = "/images/nav/support_on.gif";



//snav

lifesize_room_off = new Image;

lifesize_room_off.src = "/images/snav/lifesize_room_off.gif";

lifesize_room_on = new Image;

lifesize_room_on.src = "/images/snav/lifesize_room_on.gif";



lifesize_phone_off = new Image;

lifesize_phone_off.src = "/images/snav/lifesize_phone_off.gif";

lifesize_phone_on = new Image;

lifesize_phone_on.src = "/images/snav/lifesize_phone_on.gif";



lifesize_exec_off = new Image;

lifesize_exec_off.src = "/images/snav/lifesize_exec_off.gif";

lifesize_exec_on = new Image;

lifesize_exec_on.src = "/images/snav/lifesize_exec_on.gif";



lifesize_transit_off = new Image;

lifesize_transit_off.src = "/images/snav/lifesize_transit_off.gif";

lifesize_transit_on = new Image;

lifesize_transit_on.src = "/images/snav/lifesize_transit_on.gif";



lifesize_networker_off = new Image;

lifesize_networker_off.src = "/images/snav/lifesize_networker_off.gif";

lifesize_networker_on = new Image;

lifesize_networker_on.src = "/images/snav/lifesize_networker_on.gif";



lifesize_control_off = new Image;

lifesize_control_off.src = "/images/snav/lifesize_control_off.gif";

lifesize_control_on = new Image;

lifesize_control_on.src = "/images/snav/lifesize_control_on.gif";



enterprise_off = new Image;

enterprise_off.src = "/images/snav/enterprise_off.gif";

enterprise_on = new Image;

enterprise_on.src = "/images/snav/enterprise_on.gif";



education_off = new Image;

education_off.src = "/images/snav/education_off.gif";

education_on = new Image;

education_on.src = "/images/snav/education_on.gif";



public_sector_off = new Image;

public_sector_off.src = "/images/snav/public_sector_off.gif";

public_sector_on = new Image;

public_sector_on.src = "/images/snav/public_sector_on.gif";



healthcare_off = new Image;

healthcare_off.src = "/images/snav/healthcare_off.gif";

healthcare_on = new Image;

healthcare_on.src = "/images/snav/healthcare_on.gif";



team_off = new Image;

team_off.src = "/images/snav/team_off.gif";

team_on = new Image;

team_on.src = "/images/snav/team_on.gif";



board_off = new Image;

board_off.src = "/images/snav/board_off.gif";

board_on = new Image;

board_on.src = "/images/snav/board_on.gif";



investors_off = new Image;

investors_off.src = "/images/snav/investors_off.gif";

investors_on = new Image;

investors_on.src = "/images/snav/investors_on.gif";



careers_off = new Image;

careers_off.src = "/images/snav/careers_off.gif";

careers_on = new Image;

careers_on.src = "/images/snav/careers_on.gif";



resources_off = new Image;

resources_off.src = "/images/snav/resources_off.gif";

resources_on = new Image;

resources_on.src = "/images/snav/resources_on.gif";



in_the_news_off = new Image;

in_the_news_off.src = "/images/snav/in_the_news_off.gif";

in_the_news_on = new Image;

in_the_news_on.src = "/images/snav/in_the_news_on.gif";



press_releases_off = new Image;

press_releases_off.src = "/images/snav/press_releases_off.gif";

press_releases_on = new Image;

press_releases_on.src = "/images/snav/press_releases_on.gif";



events_off = new Image;

events_off.src = "/images/snav/events_off.gif";

events_on = new Image;

events_on.src = "/images/snav/events_on.gif";



media_kit_off = new Image;

media_kit_off.src = "/images/snav/media_kit_off.gif";

media_kit_on = new Image;

media_kit_on.src = "/images/snav/media_kit_on.gif";



solution_center_off = new Image;

solution_center_off.src = "/images/snav/solution_center_off.gif";

solution_center_on = new Image;

solution_center_on.src = "/images/snav/solution_center_on.gif";



documentation_off = new Image;

documentation_off.src = "/images/snav/documentation_off.gif";

documentation_on = new Image;

documentation_on.src = "/images/snav/documentation_on.gif";



support_room_off = new Image;

support_room_off.src = "/images/snav/lifesize_room_off.gif";

support_room_on = new Image;

support_room_on.src = "/images/snav/lifesize_room_on.gif";



support_phone_off = new Image;

support_phone_off.src = "/images/snav/lifesize_phone_off.gif";

support_phone_on = new Image;

support_phone_on.src = "/images/snav/lifesize_phone_on.gif";



support_control_off = new Image;

support_control_off.src = "/images/snav/lifesize_control_off.gif";

support_control_on = new Image;

support_control_on.src = "/images/snav/lifesize_control_on.gif";



//languages

lang_english_off = new Image;

lang_english_off.src = "/images/lang/lang_english_off.gif";

lang_english_on = new Image;

lang_english_on.src = "/images/lang/lang_english_on.gif";



lang_french_off = new Image;

lang_french_off.src = "/images/lang/lang_french_off.gif";

lang_french_on = new Image;

lang_french_on.src = "/images/lang/lang_french_on.gif";



lang_japanese_off = new Image;

lang_japanese_off.src = "/images/lang/lang_japanese_off.gif";

lang_japanese_on = new Image;

lang_japanese_on.src = "/images/lang/lang_japanese_on.gif";



function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}



function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}



function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

