// HubSpot Validation Functions
//
// Ask the Experts Handler
//

   
   HubSpotFormSpamCheck_LeadGen_ContactForm_14587_m0 = function() {
       var key = document.getElementById('LeadGen_ContactForm_14587_m0spam_check_key').value;
	   var sig = '';
	   for (var x = 0; x< key.length; x++ ) {
				sig += key.charCodeAt(x)+13;
	   }
	   document.getElementById('LeadGen_ContactForm_14587_m0spam_check_sig').value = sig; 
       // Set the hidden field to contain the user token
       var results = document.cookie.match ( '(^|;) ?hubspotutk=([^;]*)(;|$)' );
        if (results && results[2]) {
            document.getElementById('LeadGen_ContactForm_14587_m0submitter_user_token').value =  results[2];
        } else if (window['hsut']) {
            document.getElementById('LeadGen_ContactForm_14587_m0submitter_user_token').value = window['hsut'];
	    }
        return true;
   };
   
// Contact Us Handler
//
   HubSpotFormSpamCheck_LeadGen_ContactForm_15459_m0 = function() {
       var key = document.getElementById('LeadGen_ContactForm_15459_m0spam_check_key').value;
	   var sig = '';
	   for (var x = 0; x< key.length; x++ ) {
				sig += key.charCodeAt(x)+13;
	   }
	   document.getElementById('LeadGen_ContactForm_15459_m0spam_check_sig').value = sig; 
       // Set the hidden field to contain the user token
       var results = document.cookie.match ( '(^|;) ?hubspotutk=([^;]*)(;|$)' );
        if (results && results[2]) {
            document.getElementById('LeadGen_ContactForm_15459_m0submitter_user_token').value =  results[2];
        } else if (window['hsut']) {
            document.getElementById('LeadGen_ContactForm_15459_m0submitter_user_token').value = window['hsut'];
	    }
        return true;
   };

// Quote Request Handler
//
   HubSpotFormSpamCheck_LeadGen_ContactForm_15902_m0 = function() {
       var key = document.getElementById('LeadGen_ContactForm_15902_m0spam_check_key').value;
	   var sig = '';
	   for (var x = 0; x< key.length; x++ ) {
				sig += key.charCodeAt(x)+13;
	   }
	   document.getElementById('LeadGen_ContactForm_15902_m0spam_check_sig').value = sig; 
       // Set the hidden field to contain the user token
       var results = document.cookie.match ( '(^|;) ?hubspotutk=([^;]*)(;|$)' );
        if (results && results[2]) {
            document.getElementById('LeadGen_ContactForm_15902_m0submitter_user_token').value =  results[2];
        } else if (window['hsut']) {
            document.getElementById('LeadGen_ContactForm_15902_m0submitter_user_token').value = window['hsut'];
	    }
        return true;
   };


// Video Suggestion Handler
//
   HubSpotFormSpamCheck_LeadGen_ContactForm_22553_m_1 = function() {
       var key = document.getElementById('LeadGen_ContactForm_22553_m-1spam_check_key').value;
	   var sig = '';
	   for (var x = 0; x< key.length; x++ ) {
				sig += key.charCodeAt(x)+13;
	   }
	   document.getElementById('LeadGen_ContactForm_22553_m-1spam_check_sig').value = sig; 
       // Set the hidden field to contain the user token
       var results = document.cookie.match ( '(^|;) ?hubspotutk=([^;]*)(;|$)' );
        if (results && results[2]) {
            document.getElementById('LeadGen_ContactForm_22553_m-1submitter_user_token').value =  results[2];
        } else if (window['hsut']) {
            document.getElementById('LeadGen_ContactForm_22553_m-1submitter_user_token').value = window['hsut'];
	    }
        return true;
   };

// Michelin Registration Handler
//
/* <![CDATA[ */
   HubSpotFormSpamCheck_LeadGen_ContactForm_26621_m_1 = function() {
       var key = document.getElementById('LeadGen_ContactForm_26621_m-1spam_check_key').value;
	   var sig = '';
	   for (var x = 0; x< key.length; x++ ) {
				sig += key.charCodeAt(x)+13;
	   }
	   document.getElementById('LeadGen_ContactForm_26621_m-1spam_check_sig').value = sig; 
       // Set the hidden field to contain the user token
       var results = document.cookie.match ( '(^|;) ?hubspotutk=([^;]*)(;|$)' );
        if (results && results[2]) {
            document.getElementById('LeadGen_ContactForm_26621_m-1submitter_user_token').value =  results[2];
        } else if (window['hsut']) {
            document.getElementById('LeadGen_ContactForm_26621_m-1submitter_user_token').value = window['hsut'];
	    }
        return true;
   };
/*]]>*/
   
// Play Movie Script
function playMovie(mov,frm){mov.GotoFrame(frm);movPlay();}

// Launch Del.icio.us link save
function deliciouslaunch(){window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550');}

// Launch Learning Center Video Player
function launchvideolc(mID){window.open('/flash/TriStarPlayer.asp?movieID='+mID, 'TriStar_VidPlayer','toolbar=no,width=925,height=625');}

// Show/Hide Video Center Landing Page Video Category Blocks
function showBlock(tabname)
{
    // First hide everyone
    document.getElementById('seminars').style.display='none';
    document.getElementById('engineering').style.display='none';
    document.getElementById('customfab').style.display='none';
    document.getElementById('rulon').style.display='none';
    document.getElementById('materials').style.display='none';
    document.getElementById('surfacemod').style.display='none';
    document.getElementById('quadrant').style.display='none';
    
    document.getElementById('seminars-menu').style.backgroundImage='none';
    document.getElementById('engineering-menu').style.backgroundImage='none';
    document.getElementById('customfab-menu').style.backgroundImage='none';
    document.getElementById('rulon-menu').style.backgroundImage='none';
    document.getElementById('materials-menu').style.backgroundImage='none';
    document.getElementById('surfacemod-menu').style.backgroundImage='none';
    document.getElementById('quadrant-menu').style.backgroundImage='none';
    
    document.getElementById('seminars-menu').style.fontWeight='normal';
    document.getElementById('engineering-menu').style.fontWeight='normal';
    document.getElementById('customfab-menu').style.fontWeight='normal';
    document.getElementById('rulon-menu').style.fontWeight='normal';
    document.getElementById('materials-menu').style.fontWeight='normal';
    document.getElementById('surfacemod-menu').style.fontWeight='normal';
    document.getElementById('quadrant-menu').style.fontWeight='normal';
    
    // Show the right one
    document.getElementById(tabname).style.display='block';
    document.getElementById(tabname+'-menu').style.backgroundImage='url(/DovetailWRP/Site/Themes/images/sidetabbkg.gif)';
    document.getElementById(tabname+'-menu').style.fontWeight='bold';
}



