var browser = "common";
if ( navigator.userAgent.indexOf ("MSIE") != -1)
    browser = "ie";
else if ( navigator.userAgent.indexOf ("AppleWebKit") != -1)
    browser = "webkit";
else if ( navigator.userAgent.indexOf ("Opera") != -1)
    browser = "opera";
else if ( navigator.userAgent.indexOf ("Gecko") != -1)
    browser = "gecko";

/*
document.writeln("<style type='text/css'>");

if (document.getElementById)
{ 
    document.writeln('.subMenu{display: none;}\n')
}

if (browser != "gecko")
{
    document.writeln("* {");
	document.writeln("    scrollbar-track-color: #9aa1a8;");
	document.writeln("    scrollbar-face-color: #a00821;");
	document.writeln("    scrollbar-arrow-color: #ffffff;");
	document.writeln("    scrollbar-highlight-color: #bcc3ca;");
	document.writeln("    scrollbar-3dlight-color: #6a0000;");
	document.writeln("    scrollbar-shadow-color: #90979e;");
	document.writeln("    scrollbar-darkshadow-color: #6a0000;");
    document.writeln("}");
}

document.writeln("</style>");
*/

function Change_Class(classname, item, value)
{
    if ( browser == "ie" ) rules = 'rules'; else rules = 'cssRules';

    if ( browser == "webkit") classname = classname.toLowerCase();

    try 
    {
    for (var n = 0; n < document.styleSheets.length; n++)
      for (var k = 0; k < document.styleSheets[n][rules].length; k++)
        if (document.styleSheets[n][rules][k].selectorText == classname)
          document.styleSheets[n][rules][k].style[item] = value;
    }
    catch (e) {}
}


function GetScreenXPosition(e) { if (browser=='ie') return event.clientX + document.body.scrollLeft; else return e.pageX }
function GetScreenYPosition(e) { if (browser=='ie') return event.clientY + document.body.scrollTop; else return e.pageY }

