﻿







function getSelectedCheckBoxesArray( theCb, theIdString ){
	var elm = document.forms[0].elements;
//	var elm = theCb.form.elements;
	var retArray = [];
	for( i = 0; i < elm.length; ++i ){
		if( elm[ i ].type == "checkbox" && elm[ i ].id.indexOf( theIdString ) != -1 ){
			if( elm[ i ].checked ){
				retArray.push(elm[ i ].value);
			}
		}
	}
	return retArray;
}

function getSelectedCheckBoxesNames( theCb, theIdString ){
	var elm = document.forms[0].elements;
//	var elm = theCb.form.elements;
	var retArray = [];
	for( i = 0; i < elm.length; ++i ){
		if( elm[ i ].type == "checkbox" && elm[ i ].id.indexOf( theIdString ) != -1 ){
			if( elm[ i ].checked ){
				retArray.push(elm[ i ].value.split("<=>")[1]);
			}
		}
	}
	return retArray;
}

function getSelectedCheckBoxesIds( theCb, theIdString ){
	var elm = document.forms[0].elements;
//	var elm = theCb.form.elements;
	var retArray = [];
	for( i = 0; i < elm.length; ++i ){
		if( elm[ i ].type == "checkbox" && elm[ i ].id.indexOf( theIdString ) != -1 ){
			if( elm[ i ].checked ){
				retArray.push(elm[ i ].value.split("<=>")[0]);
			}
		}
	}
	return retArray;
}







function DisableIconLinkButton(theBtn,theImage,theOffIcon){
	<!--//
	document.getElementById(theBtn).className = "mainBtnsDisabled";
	if( document.getElementById(theBtn).hrefOld == undefined || document.getElementById(theBtn).hrefOld == null ){
		document.getElementById(theBtn).hrefOld = document.getElementById(theBtn).href;
	}
	document.getElementById(theBtn).href = "javascript:void(0);";
	
	if( document.getElementById(theBtn).onclickOld == undefined || document.getElementById(theBtn).onclickOld == null ){
		document.getElementById(theBtn).onclickOld = document.getElementById(theBtn).onclick;
	}
	document.getElementById(theBtn).onclick = "javascript:void(0);";
	document.getElementById(theImage).src = theOffIcon;
	//-->
}


function EnableIconLinkButton(theBtn,theImage,theOnIcon){
	<!--//
	document.getElementById(theBtn).disabled = false;
	document.getElementById(theBtn).className = "mainBtns";
	if( document.getElementById(theBtn).hrefOld != undefined & document.getElementById(theBtn).hrefOld != null ){
		document.getElementById(theBtn).href = document.getElementById(theBtn).hrefOld;
	}
	if( document.getElementById(theBtn).onclickOld != undefined & document.getElementById(theBtn).onclickOld != null ){
		document.getElementById(theBtn).onclick = document.getElementById(theBtn).onclickOld;
	}
	document.getElementById(theImage).src = theOnIcon;
	//-->
}
/*
function correctPNG()
{
    for( var i = 0; i < document.images.length; i++ )
    {
        var img = document.images[ i ];
        var imgName = img.src.toUpperCase();
        if( imgName.substring( imgName.length - 3, imgName.length ) == "PNG" )
        {
            var imgID = ( img.id ) ? "id='" + img.id + "' " : "";
            var imgClass = ( img.className ) ? "class='" + img.className + "' " : "";
            var imgTitle = ( img.title ) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
            var imgStyle = ( img.style.cssText ) ? img.style.cssText + ";" : "";
            var floatOrBlock = "display:inline-block;";
            var oAttribs = img.attributes;
            for( var j = 0; j < oAttribs.length; j++ )
            {
                var oAttrib = oAttribs[ j ];
                if( oAttrib.nodeName == "align" )
                {
                    switch( oAttrib.nodeValue )
                    {
                        case "left":
                            floatOrBlock = "float:left;";
                            break;
                        case "right":
                            floatOrBlock = "float:right;";
                            break;
                    }
                    break;
                }
            }
            var strNewHTML = "<span " + imgID + imgClass + imgTitle;
            strNewHTML += " style=\"" + floatOrBlock + imgStyle;
            strNewHTML += " width:" + img.width + "px; height:" + img.height + "px; ";
            strNewHTML += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'" + img.src + "\');\">";
            strNewHTML += "<img src=\"/Images/blank.gif\" alt=\"\" style=\"width:100%;height:100%;border-style:none;\" />";
            strNewHTML += "</span>";
            img.outerHTML = strNewHTML;
            i = i - 1;
        }
    }
}
document.body.onload = correctPNG;
*/



function Return()
{
    return;
}
