
/* START JS Browser detect code */
var bow="n";
var bow1="n";

bName = navigator.appName;
bVer = parseInt(navigator.appVersion);

if (bName == "Netscape" && bVer >= 3)
{
	bow = "ok";
	bow1 = "ok";
}
else if (bName == "Microsoft Internet Explorer" && bVer > 3)
{
	bow = "ok";
	bow1="ok";
}
else if (bName == "Microsoft Internet Explorer" && bVer >=2)
{
	bow = "ok";
}

var IS_AOL=0;

if (navigator.userAgent)
{
	if (navigator.userAgent.indexOf("AOL") >=0)
	{
		IS_AOL=1;
		bow1="n";
	}
}
else
{
	bow="n"
	bow1="n";
}
/* END JS Browser detect code */


function toggleTbody(id) {
    if (document.getElementById) {
        var tbod = document.getElementById(id);
        if (tbod && typeof tbod.className == 'string') {
            if (tbod.className == 'off') {
                tbod.className = 'on';
            } else {
                tbod.className = 'off';
            }
        }
    }
    return false;
}
function toggleTbodyOff(id) {
    if (document.getElementById) {
        var tbod = document.getElementById(id);
        if (tbod && typeof tbod.className == 'string') {
            if (tbod.className == 'off') {
                tbod.className = 'off';
            } else {
                tbod.className = 'off';
            }
        }
    }
    return false;
}
function toggleTbodyOn(id) {
    if (document.getElementById) {
        var tbod = document.getElementById(id);
        if (tbod && typeof tbod.className == 'string') {
            if (tbod.className == 'off') {
                tbod.className = 'on';
            } else {
                tbod.className = 'on';
            }
        }
    }
    return false;
}
			
			
function openWindow(f, t, m, l, s, r, w, h, st, tool, d)
{
	var fn_filename = "";
	var fn_target = "_blank";
	var fn_menubar = "yes";
	var fn_location = "yes";
	var fn_scrollbars = "yes";
	var fn_resizable = "yes";
	var fn_width = "600";
	var fn_height = "400";
	var fn_status = "yes";
	var fn_toolbar = "yes";
	var fn_directories = "yes";
	
	if (arguments.length > 0)
	{
		if (f != "" || f != null) fn_filename = f;
		if (t != "" || t != null) fn_target = t;
		if (m == "no") fn_menubar = m;
		if (l == "no") fn_location = l;
		if (s == "no") fn_scrollbars = s;
		if (r == "no") fn_resizable = r;
		if (w > 0) fn_width = w;
		if (h > 0) fn_height = h;
		if (st == "no") fn_status = st;
		if (tool == "no") fn_toolbar = tool;
		if (d == "no") fn_directories = d;
	}
	
	self.name="mainWin";
	
    if (bow!="ok") return (true);
	
	argumentString = 'menubar='+fn_menubar+',location='+fn_location+',scrollbars='+fn_scrollbars+',resizable='+fn_resizable+',width='+fn_width+',height='+fn_height+',status='+fn_status+',toolbar='+fn_toolbar+',directories='+fn_directories;
	
	remote =  window.open(fn_filename,fn_target,argumentString);

    if (remote == null) return true;

    if(bow1 == "ok"){
		window.setTimeout('focusWin()',1000);
	}
	return (false);
}


function openPrintWin(strLink,strWindowName)
{
	return openWindow(strLink,strWindowName,"yes","no","yes","yes",670,550,"yes","no","no");	
}

function printPage(){
	if(window.print){
		window.print();
	}
}