    // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase();

    // *** BROWSER VERSION ***
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);


    // Note: Opera and WebTV spoof Navigator.  We do strict client detection.
    // If you want to allow spoofing, take out the tests for opera and webtv.
    var is_moz  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_ie   = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));



// Highlight the element pointed by "this" and make the cursor a hand
function Colorize(element){
    element.style.background = '#FCEFC5';
    element.style.color = '#FFFFFF';
    if (is_moz){
        document.body.style.cursor = 'pointer';
    } else {
        document.body.style.cursor = 'hand';
    }
}

// Reverse the colorize
function DeColorize(element){
    element.style.background = 'none';
    element.style.color = '#4B4B4B';
    document.body.style.cursor = '';

}

function WinOpen(url,a,b){
    properties = 'history=no,toolbar=0,location=0,directories=0,scrollbars=yes,status=0,menubar=0,width=' + a + ',height=' + b + '';
    window.open(url,'win',properties) ;
}

function WinOpenNamed(url,name,a,b){
    properties = 'history=no,toolbar=0,location=0,directories=0,scrollbars=yes,status=0,menubar=0,width=' + a + ',height=' + b + '';
    window.open(url,name,properties) ;
}

function WinOpenPos(url,width,height,left,top){

    left = left || 0;
    top = top || 0;
    rand_win_name = Math.floor(Math.random()*100000);
    win_name = 'window_'+rand_win_name;

    properties = 'history=no,toolbar=0,location=0,directories=0,scrollbars=yes,status=0,menubar=0,left=' + left + ',top=' + top + ',width=' + width + ',height=' + height + '';
    window.open(url,win_name,properties);

return win_name;
}



var hideLayerFlag = true;

function ChangeHideLayerFlag(){
    hideLayerFlag = !hideLayerFlag;
}

function showlayerfrontend(left){
    mylayer = document.getElementById('statuslayer');
    mylayer.style.left = (screen.width/2)-left;
    mylayer.style.visibility = 'visible';
}

function hidelayerfrontend(closeFlag){

    if (closeFlag){
        hideLayerFlag = true;
    }

    if (hideLayerFlag){
        mylayer = document.getElementById('statuslayer');
        mylayer.style.visibility = 'hidden';
    }

}

function showlayer(myy,mydate,mynote,left){
    //alert(document.body.scrollTop);
    //alert(myy);
    mylayer = document.getElementById('statuslayer');
    if (left){
        mylayer.style.left = left;
    } else {
        mylayer.style.left = (screen.width/2)-100;
    }

    if (document.all){
        mylayer.style.top = Number(document.body.scrollTop) + Number(myy) + 10;
    } else {
        mylayer.style.top = Number(myy) + 15;
    }
    /*
    mylayer.innerHTML = '   <table width="300" cellpadding="0" cellspacing="0" border="0" align="center">\
                                <tr>\
                                    <td valign="top" width="240"><h6>'+mynote+'</td>\
                                </tr>\
                            </table>';
    */
    mylayer.innerHTML = mynote;
    mylayer.style.visibility = 'visible';
}

function hidelayer(closeFlag){

    if (closeFlag){
        hideLayerFlag = true;
    }

    if (hideLayerFlag){
        mylayer = document.getElementById('statuslayer');
        mylayer.style.left = 0;
        mylayer.style.top = 0;
        mylayer.innerHTML = '';
        mylayer.style.visibility = 'hidden';
    }

}



function EmailFldEnter(fld){
    if (fld.is_set){
        return;
    }else{
        fld.value  = "";
    }
}


function EmailFldLeave(fld){
    if (fld.value != ""){
        fld.is_set = 1;
    }else{
        fld.value = "Enter your email for exclusive offers";
        fld.is_set = 0;
    }
}
function swapImage(imageName,imageFile)
{
//alert(imageName)
	var swapImageName = eval('document.' + imageName);
	swapImageName.src = imageFile;
	// Replaces the current image with a selected image
	// The images are already preloaded, and therefore can be swapped
	// without reference to the array.
}

