// JavaScript Document

function chgImg(id,newImg) {
	document.getElementById(id).src = newImg;
}

function chgSubnav(id,color) {
	document.getElementById(id).style.backgroundColor = color;
}

function chgContent(targetID,newID) {
	document.getElementById(targetID).innerHTML=document.getElementById(newID).innerHTML;
}

function thisYear() {
	thisYear = new Date();
	currYear = thisYear.getFullYear();
	document.write(currYear);
}
function buildplayerSL(show) {
    document.write('<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="650" height="400" id="slp">');
    document.write('<param name="source" value="/sl4/ClientBin/OVP.xap" />');
    document.write('<param name="minRuntimeVersion" value="4.0.50401.0" />');
    document.write('<param name="initparams" value="showstatistics=false, autoplay=true, muted=false, playlistoverlay=false, loglevel=All, theme=/sl4/sl4themes/SmoothHD.xaml,smfPlugins=/sl4/ClientBin/BasicMediaPlugin.xap /sl4/ClientBin/OverlayLogWriter.xap, stretchmode=Fill, stretchmodefullscreen=Fit,mediasource=' + show + '" />');
    document.write('<a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">');
    document.write('<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /></a>');
    document.write('</object>');

}


function setCookie(c_name, value, exdays) {
    var exdate = new Date();
    exdate.setDate(exdate.getDate() + exdays);
    var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString());
    document.cookie = c_name + "=" + c_value;
}
function get_cookie(cookie_name) {
    var results = document.cookie.match('(^|;) ?' + cookie_name + '=([^;]*)(;|$)');
    if (results)
        return (unescape(results[2]));
    else
        return null;
}
function closeLB() {
    document.getElementById('overlayB').style.display = "none";
    document.getElementById('productTour').style.display = "none";
}
