clMenuNormal = "";
clMenuOver = "#D6D3D6";

document.onmouseover = mOver;
document.onmouseout = mOut;

function mOver() {}

function mOut() {}
function mOvertd (o){
	o.style.borderStyle="solid";
	o.style.borderColor="#A1A5A9";
	o.style.backgroundColor="#F9DBCC";
	o.style.cursor = "hand";
}

function mOuttd (o){
	o.style.color="";
	o.style.borderColor="";
	o.style.backgroundColor="";
	o.style.cursor = "default";
}

function modelesswin(url,mwidth,mheight){
if (document.all&&window.print) //if ie5
eval('window.showModalDialog(url,"","edge:sunken;status:no;help:0;resizable:1;dialogWidth:'+mwidth+'px;dialogHeight:'+mheight+'px")')
else eval('window.open(url,"","width='+mwidth+'px,height='+mheight+'px,resizable=1,scrollbars=1")')
}

function newwindow(url,mwidth,mheight){
eval('window.open(url,"xxx","width='+mwidth+'px,height='+mheight+'px,resizable=1,scrollbars=1,top='+screen.width/4+',left='+screen.height/4+'")');
}

function newwindow1(url,mwidth,mheight){
eval('window.open(url,"","width='+mwidth+'px,height='+mheight+'px,resizable=1,scrollbars=1,top='+screen.width/8+',left='+screen.height/4+'")');
}

function export_to_excel(URL) {
 location = URL;
}

function Highlight(e)
    {
	var r = null;
	if (e.parentNode && e.parentNode.parentNode) {
	    r = e.parentNode.parentNode;
	}
	else if (e.parentElement && e.parentElement.parentElement) {
	    r = e.parentElement.parentElement;
	}
	if (r) {
	    if (r.className == "items") {
		r.className = "itemsx";
	    }
	    else if (r.className == "itemsx") {
		r.className = "items";
	    }
	}
}

function ToggleAll(e)
    {
	if (e.checked) { CheckAll(); }
	else { ClearAll(); }
}

function CheckAll()
    {
	var ml = document.form1;
	var len = ml.elements.length;
	for (var i = 0; i < len; i++) {
	    var e = ml.elements[i];
	    if (e.name == "C1") { e.checked = true; }
	}
}
    
function ClearAll()
    {
	var ml = document.form1;
	var len = ml.elements.length;
	for (var i = 0; i < len; i++) {
	    var e = ml.elements[i];
	    if (e.name == "C1") { e.checked = false; }
	}
}

function Toggle(e)
{
	if (e.checked) { document.form1.C2.checked = AllChecked(); }
	else { document.form1.C2.checked = false; }
}

function AllChecked()
{
	ml = document.form1;
	len = ml.elements.length;
	for(var i = 0 ; i < len ; i++) {
	    if (ml.elements[i].name == "C1" && !ml.elements[i].checked) {
		return false;
	    }
	}
	return true;
}
