/**
 * This file is part of the Ultimate Office Website
 * Copyright (c) 2006, SpyderHost.net, Inc.
 * All Rights Reserved
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * File     $Id: actions.js 1668 2007-08-24 15:54:22Z rlmarsh $ <br>
 * Author   $Author: rlmarsh $
 * @package ultoffice
 */
 
 /**
  * do pop up
  * 
  * Function will display a popup window.
  * @param {url} url to open
  * @param {width} width of window to open
  * @param {height} height of window to open
  */
 function doPopUp(url,width,height){
    if(isEmpty(width)){
       width = "800";
    }
    if(isEmpty(height)){
       height = "600";
    }
   window.open(url,'PopUpWindow','height='+height+',width='+width+',scrollbars=1');  
 }
 
 /**
  * is Empty
  * 
  * Function will check to see if the passed field is empty.
  * @param {input} value to check.
  * @return bool True if empty False if not
  */
 function isEmpty(input) {
   if ((input == null)) {
      return true;
   } else { 
      return false; 
   }
}	

/**
 * bookmark
 * 
 * Function will accept a url and title and pop-up the window to allow
 * a person to bookmark the page.
 * 
 * @param string url
 * @param string title
 */
function bookmark(url,title){
  if (window.sidebar) { 
     // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { 
	   // IE Favorite
		window.external.AddFavorite( url, title); 
	}
	else if(window.opera && window.print) { 
	   // Opera Hotlist
	   alert('Press CTRL-T to bookmark')
		return true; 
	}
}



