﻿var popUp; 

function OpenCalendar(idname, postBack)
{
	popUp = window.open('Calendar.aspx?formname=' + document.forms[0].name + 
		'&id=' + idname + '&selected=' + document.forms[0].elements[idname].value + '&postBack=' + postBack, 
		'popupcal', 
		'width=165,height=208,left=200,top=250');
}

function SetDate(formName, id, newDate, postBack)
{
	eval('var theform = document.' + formName + ';');
	popUp.close();
	theform.elements[id].value = newDate;
	if (postBack)
		__doPostBack(id,'');
}	

//  POP UP WINDOW FUNCTION
function windowOpener(what_url,winheight,winwidth) {
	options="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width="+winwidth+",height="+winheight;

	popwin = window.open(what_url,'pop_win',options);
	popwin.focus();
}

//var bookmarkurl="http://localhost:2319/rms/index.aspx"
var bookmarkurl="http://localhost/rms/index.aspx"
var bookmarktitle="Radiology Management Service"

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function showHourGlass()
{
    document.body.style.cursor = 'wait';
}

 function ExpandCollapse(obj,row)
    {
        var div = document.getElementById(obj);
        var img = document.getElementById('img' + obj);
        
        if (div.style.display == "none")
        {
            div.style.display = "block";
            if (row == 'alt')
            {
                img.src = "../images/minus.gif";
            }
            else
            {
                img.src = "../images/minus.gif";
            }
            img.alt = "Close to view other Members";
        }
        else
        {
            div.style.display = "none";
            if (row == 'alt')
            {
                img.src = "../images/plus.gif";
            }
            else
            {
                img.src = "../images/plus.gif";
            }
            img.alt = "Expand to show Salary";
        }
    } 
    

