﻿/*
    js to support site.master
*/


//Ensure website is never framed in
if ( top.location.href!=window.location.href){
    top.location.href=window.location.href;
}

//Add event to handle operations on [txtSiteLogin] field
function clickButton(e, buttonid){
    var bt = document.getElementById(buttonid);
    if (bt == null)
        return;

     window.status = "button: " + bt.id;
     if (bt && typeof bt == 'object'){ 
           if(navigator.appName.indexOf("Netscape")>(-1)){ 
                 if (e.keyCode == 13){ 
                       bt.click(); 
                       return false; 
                 } 
           } 
           if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ 
                 if (event.keyCode == 13){ 
                       bt.click(); 
                       return false; 
                 } 
           } 
     }
}

function changeLogo( o){
    var sPath = o.src.substr( 0, o.src.indexOf( ".gif")-1);
    var iIndex = new Number( o.src.substr( o.src.indexOf( ".gif")-1, 1));
    
    if ( iIndex ==3){
        iIndex = 1
    } else {
        iIndex++
    }
    
    o.src = sPath + iIndex.toString() + ".gif";
}


function switchStyle()
{
    sty = document.getElementById("styCurves");
    sty.media = (sty.media == "screen" ? "tv" : "screen");
}

