function setChecked(sFormName, sFormElementName, sCheckAllName)
{
	var aCheeckBoxes = document.forms[sFormName].elements[sFormElementName];
	var status = document.forms[sFormName].elements[sCheckAllName].checked;

	if (status == true) {
	    for (var i=0; i < aCheeckBoxes.length; i++) {
			aCheeckBoxes[i].checked = true;
		}
	} else {
	    for (var i=0; i < aCheeckBoxes.length; i++) {
			aCheeckBoxes[i].checked = false;
		}
	}	
}

function go(target) 
{
    window.location = target;
}

function popup(url,x,y)
{
     window.open(url,'popup','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,width='+x+',height='+y+',resizable=yes');
}

function picpopup(url,x,y)
{
     wwpicpop=window.open(url,'picpopup','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,width='+(x+2)+',height='+(y+2)+',resizable=yes');
     top.window.wwpicpop.document.write ('<html><head><title>фотографии</title></head>'+'<body leftmargin=1 topmargin=1 rightmargin=1 bottommargin=1 marginwidth=1 marginheight=1 onLoad="focus();">'+'<a title="close this window" href="javascript:window.close();"><img src="'+url+'" alt="" hspace=0 vspace=0 width="'+x+'" height="'+y+'" align="middle" border=0></a></body></html>')
     top.window.wwpicpop.document.close()
}

function showlayer(sel, w)
{
	var c=document.getElementById(sel);

	if(w == "none")
		c.style.display = "none";
	else if (w == "show")
		c.style.display = "inline";
	else {
		if(c.style.display == "inline" || c.style.display == "") c.style.display="none"; else c.style.display = "inline";
	}
}
var marked_row = new Array;

function setPointer(src, srcNum, todo, dc, pc, mc)
{
    var theCells = null;

    if ((pc == '' && mc == '')
        || typeof(src.style) == 'undefined') {
        return false;
    }

    if (typeof(document.getElementsByTagName) != 'undefined') {
        theCells = src.getElementsByTagName('td');
    }
    else if (typeof(src.cells) != 'undefined') {
        theCells = src.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    var domDetect    = null;
    var currentColor = null;
    var newColor     = null;
    if (typeof(window.opera) == 'undefined'
        && typeof(theCells[0].getAttribute) != 'undefined') {
        currentColor = theCells[0].getAttribute('bgcolor');
        domDetect    = true;
    }
    else {
        currentColor = theCells[0].style.backgroundColor;
        domDetect    = false;
    }

    if (currentColor == ''
        || currentColor.toLowerCase() == dc.toLowerCase()) {
        if (todo == 'over' && pc != '') {
            newColor=pc;
        }
        else if (todo == 'click' && mc != '') {
            newColor=mc;
        }
    }

    else if (currentColor.toLowerCase() == pc.toLowerCase()
             && (typeof(marked_row[srcNum]) == 'undefined' || !marked_row[srcNum])) {
        if (todo == 'out') {
            newColor=dc;
        }
        else if (todo == 'click' && mc != '') {
            newColor              = mc;
            marked_row[srcNum] = true;
        }
    }

    else if (currentColor.toLowerCase() == mc.toLowerCase()) {
        if (todo == 'click') {
            newColor              = (pc != '')
                                  ? pc
                                  : dc;
            marked_row[srcNum] = (typeof(marked_row[srcNum]) == 'undefined' || !marked_row[srcNum])
                                  ? true
                                  : null;
        }
    }

    if (newColor) {
        var c = null;
        if (domDetect) {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].setAttribute('bgcolor', newColor, 0);
				theCells[c].style.cursor='hand'
			}
        }
        else {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].style.backgroundColor = newColor;
				theCells[c].style.cursor='hand'
            }
        }
    }

    return true;
}

langArray = new Array();
langArray[0] = 'ru';
				
function showServices(langName) {

var e = document.getElementsByName(langName);
for (var i=0; i<e.length; i++) {
e[i].style.display = 'block';
}

}

function noneServices(langName) {

var e = document.getElementsByName(langName);
for (var i=0; i<e.length; i++) {
e[i].style.display = 'none';
}

}
 
function checkStore(csRef)
{
    location.href = csRef;
} 

//Then code the Logout menu item like this:
//Code: 
//aI("text=Logout;url=javascript:logout();"); 
 