﻿// Opens a popup window
function OpenPopUp(Url,WinName,Height,Width){

    try{
	    window.open(Url,WinName,'height='+Height+',width='+Width+',location=yes,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes,top=40,left=40');
    }catch(ex){
	    // Skip exception
	}	
}		

// Changes the source image and other attributes of an image control
function ChangeImage(objName, ImageUrl, ToolTip) {
    if (document.images) {
        try{
	        objName.src=ImageUrl;
	        objName.alt=ToolTip;
	        window.status=ToolTip;
	    }catch(ex){
	        // Skip exception
	    }
    }
} 

// Resets the status of a control
function EmptyStatus(){
    self.status="";
}					


//----------------------------------------------------------------
// these functions are used by the popup window to refresh the main
// window and to close the popup after a time delay
//----------------------------------------------------------------

function TimedClose()
{
	setTimeout('self.close()',5000);
}

function ReloadAndClose()
{
	setTimeout('reloadPageMain()',1000);
	setTimeout('self.close()',5000);
}

function Reload()
{
	setTimeout('reloadPageMain()',1000);
}

function reloadPageMain()
{
	//alert ('start');
	opener.parent.pageMain.location.reload();
}
//----------------------------------------------------------------
