function maxWindow(url, name, width, height) {
  features = 'scrollbars=1,resizable=1,menubar=0,directories=0,toolbar=0,location=0,status=0,top=0,left=0,screenX=0,screenY=0,';

  if (window.screen) {
    aw = screen.availWidth;
    ah = screen.availHeight;
    features = features+'width='+(aw-20)+',height='+(ah-38);
  }
  else {
    features = features+'width='+width+',height='+height;
  }
  window.open(url, name, features);
  return false;
}

function loadDemo(url, name, width, height) {
	features = 'scrollbars=0,resizable=0,menubar=0,directories=0,toolbar=0,location=0,status=0,top=200,left=300,screenX=0,screenY=0,';
	features = features+'width='+width+',height='+height;
	window.open(url, name, features);
}

function bookmark(title, url)
{
  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) { // Opera 7+
      return false; // do nothing - the rel="sidebar" should do the trick
  } else { // for Safari, Konq etc - browsers who do not support bookmarking scripts (that i could find anyway)
       alert('Unfortunately, this browser does not support the requested action,'
       + ' please bookmark this page manually.');}
}

function doFocus(obj){
	if(obj.firstTime){
		return;
	}
	obj.firstTime=true;
	obj.value="";
}
