/**
 * @author Adam McIntyre
 * Utilities for the Nikon High- and Low-bandwidth homepages
 */

function format(str){return str.replace(/&gt;/g,'>').replace(/&lt;/g,'<').replace(/&amp;lt;/g,'<').replace(/&amp;gt;/g,'>').replace(/'/g,"&#39;").replace(/"/g,"&quot;").replace(/=&quot;/g,"='").replace(/&quot;\s/g,"' ").replace(/&quot;>/g,"'>").replace(/&quot;\/>/g,"'/>").replace(/&quot;\?/g,"'?").replace(/=&#39;/g,"='").replace(/&#39;\s/g,"' ").replace(/&#39;>/g,"'>").replace(/&#39;>/g,"'>").replace(/&amp;#39;/g,"'").replace(/&amp;quot;/g,'"').replace(/" /g,"' ").replace(/<subTitle\/>/g,"<subTitle></subTitle>").replace(/<p>/g,"").replace(/<\/p>/g,"").replace(/<text>/g,'<text><![CDATA[').replace(/<\/text>/g,']]></text>').replace(/\/NikonUSA/g,"").replace(/ C:ProjectsNikonXMLHomepagePromos.xsd/g," C:\\Projects\\Nikon\\XML\\HomepagePromos.xsd");}
function getXmlStr(){return xmlStr;} function getNewsXmlStr(){ return format(newsXmlStr); }
function getLearnXmlStr(){var learnXML = '' ;learnXML += '<?xml version="1.0" encoding="UTF-8"?>';learnXML += "<learn xmlns='http://www.nikonusa.com' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.w3schools.com C:\Projects\Nikon\XML\HomepagePromos.xsd'>" ;            learnXML += "<learnExplore>" ;            learnXML += "<title>Learn and be inspired</title>" ;            learnXML += "<bio><![CDATA[Learn & Explore is your gateway to educational and editorial material that will increase your knowledge of photography and inspire you to make more and better images.]]></bio>";            learnXML += "<imagePath>assets/promo/learnExplore.jpg</imagePath>";learnXML += "<link>http://www.nikonusa.com/Learn-And-Explore/index.page</link>";learnXML += "<linkTitle>Visit Learn & Explore</linkTitle>";learnXML += "</learnExplore>";learnXML += "</learn>";return learnXML;}
function clearInput(el,txt){if(el.value==txt){el.value='';el.style.color='#000';}}
var LB='lobandwidth';var DUR=14;function MO__setCookie(name,duration){var d=new Date();d.setTime(d.getTime()+(duration*24*60*60*1000));document.cookie=name+'=true;Expires='+d.toGMTString();}
function MO__readCookie(name){var nameE=name+'=';var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var c=cookies[i];while(c.charAt(0)==' ')c=c.substr(1,c.length);if(c.indexOf(nameE)==0)return true;}
return false;}
function MO__removeCookie(name){MO__setCookie(name,-1);return true;}
if(MO__readCookie(LB)){if(window.location.href.indexOf('-lo')<0)window.location.href='/Homepage-lo.page';}
window.onload=function(){if(window.location.href.indexOf('-lo')<0){document.getElementById('footer').style.position='absolute';document.getElementById('footer').style.top='928px';}}