    <!-- //

    function externalLinks() {
        if (!document.getElementsByTagName) return;
        var anchors = document.getElementsByTagName("a");

        for (var i = 0; i < anchors.length; i++) {
            var anchor = anchors[i];
            if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
                anchor.target = "_blank";
        }
    }

    //New window function for rotostack (and elsewhere)
    function newWindow(url, height, width) {
        nameW = 'feature'

        if (navigator.appVersion.indexOf('4') != -1) {
            xTop = screen.width / 2 - (width / 2);
            yTop = screen.height / 2 - (height / 2);

            window.open(url, nameW, 'height='+height+',width='+width+',scrollbars=1,resizable=1,menubar=1,toolbar=1,status=1,location=1,directories=1,left=' + xTop + ',top=' + yTop + '');
        }
        else
        {
            window.open(url, nameW, 'height='+height+',width='+width+',scrollbars=1,resizable=1,menubar=1,toolbar=1,status=1,location=1,directories=1,left=150,top=200');
        }
    }

function fncOpenWindow(strURL, strTarget, intWidth, intHeight, blnToolbar, blnMenubar, blnScrollbars, blnResizable) {
	var params;
	var displaymode;

	if (intWidth + intHeight == 0) { 
		displaymode = "fullscreen=yes,";
	}
	else {
		displaymode = "width=" + intWidth + ",height=" + intHeight + ",";
	}

	params = "toolbar=" + blnToolbar + ",location=0,directories=0,status=0,menubar=" + blnMenubar + ",scrollbars=" + blnScrollbars + ",resizable=" + blnResizable + "," + displaymode;

	objWindow = window.open(strURL, strTarget, params)
}


    //helpWindow has no menubar or toolbar and cannot be resized
    function helpWindow(url, height, width) {
        nameW = 'feature'

        if (navigator.appVersion.indexOf('4') != -1) {
            xTop = screen.width / 2 - (width / 2);
            yTop = screen.height / 2 - (height / 2);

            window.open(url, nameW, 'height='+height+',width='+width+',scrollbars=1,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0,left=' + xTop + ',top=' + yTop + '');
        }
        else
        {
            window.open(url, nameW, 'height='+height+',width='+width+',scrollbars=1,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0,left=150,top=200');
        }
    }

    //jobWindow has no menubar or toolbar, but can be resized
    function jobWindow(url, height, width, jobid) {
        nameW = 'feature' + jobid;

        if (navigator.appVersion.indexOf('4') != -1) {
            xTop = screen.width / 2 - (width / 2);
            yTop = screen.width / 2 - (width / 2);

            window.open(url, nameW, 'height='+height+',width='+width+',scrollbars=1,resizable=1,menubar=0,toolbar=0,status=0,location=0,directories=0,left='+xTop+',top='+yTop+'');
        }
        else
        {
            window.open(url, nameW, 'height='+height+',width='+width+',scrollbars=1,resizable=1,menubar=0,toolbar=0,status=0,location=0,directories=0,left=150,top=200');
        }
    }

    function CheckAll(checkAllBox)
    {
        var frm = document.aspnetForm;
        var ChkState = checkAllBox.checked;

        for(i = 0; i < frm.length; i++)
        {
            e = frm.elements[i];
            if(e.type=='checkbox' && e.name.indexOf('Id') != -1)
            e.checked = ChkState;
        }
    }

    function CheckChanged()
    {
        var frm = document.aspnetForm;
        var boolAllChecked;

        boolAllChecked = true;

        for(i = 0; i < frm.length; i++)
        {
            e = frm.elements[i];
            if (e.type == 'checkbox' && e.name.indexOf('Id') != -1)
            if(e.checked == false)
            {
                boolAllChecked = false;
                break;
            }
        }

        for(i=0;i< frm.length;i++)
        {
            e = frm.elements[i];

            if (e.type == 'checkbox' && e.name.indexOf('checkAll') != -1)
            {
                if(boolAllChecked == false)
                    e.checked = false ;
                else
                    e.checked = true;
                    break;
            }
        }
    }
    // -->
