﻿/*
*******************************Xpanxion changes*****************************                   
*   Purpose: This file will contain all the client side validation for Omniture for sites. 
*	WHO Date	    Description
*	--- ----------  --------------------------------------------------------------------
*   GMK 2008.02.05  File created
**************************************************************************
*/
    var s_pageName = new String(); // The Omniture string at client side
	document.onkeyup = KeyCheck;  // Capture onKeyUp event of every page
	// Get the value of Omniture string value from hidden text while rendering the page
    s_pageName = document.getElementById('ctl00_omniturePageName')!= null ? document.getElementById('ctl00_omniturePageName').value : "";


    // This function calls alert of proposed Omniture
    function KeyCheck(e)
    {   
        var KeyID = (window.event) ? event.keyCode : e.keyCode; //Checks keycode on kry up event for IE (window.event) and FireFox (e.KeyCode)
        var KeyCtrl = (window.event) ? event.ctrlKey : e.ctrlKey; // Check Control Keypress 
        var KeyShift = (window.event) ? event.shiftKey : e.shiftKey; // Check Shift Control KeyPress          
        if ((KeyID == 79) && (KeyCtrl == true) && (KeyShift == true)) // If ctrl + Shift + "o" then show Alert
            {
                alert(s_pageName);    
            }      
     }
 