/* site.js */

/* Start of rollover javascript */
<!--

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		about_over = newImage("images/nav/about-over.gif");
		clients_over = newImage("images/nav/clients-over.gif");
		contact_over = newImage("images/nav/contact-over.gif");
		login_over = newImage("images/mast/mast_login_over.gif");
		logout_over = newImage("images/mast/pc_mast_bar_over.gif");
		services_over = newImage("images/nav/services-over.gif");		
		preloadFlag = true;
	}
}


// -->
/* End of rollover javascript */

function confirmDelete( url, item ) {
    var x = confirm( "Are you sure you want to delete " + item + "?\n\nPress 'OK' to continue with the delete.  Press 'CANCEL' to close this window without deleting." );
    if ( x ) {
        document.location.href = "./?fuseaction=" + url;
    }
}

function clearText( myField )
{
   myField.value = '';
}

function openPopup( fuseaction, myHeight, myWidth )
{
    if( !myHeight ) var myHeight = 400;
    if( !myWidth ) var myWidth = 300;
    var url = "./?fuseaction=" + fuseaction;
    popupWin = window.open(url, 'AskWin', 'scrollbars=yes,resizable=yes,status=yes,personal=no,menubar=yes,location=yes,toolbar=yes,left=20,top=20,width=' +myWidth+',height='+myHeight+'');
    popupWin.focus();
}

function closePopupRefresh() {
    if( !window.opener.closed )
    {
        window.opener.location.href = window.opener.location.href + "&dummy=123";
        window.opener.focus();
    }
    self.close();
}
