
function OpenWindow( url, title, width, height, scrollbars){
  var style = "toolbar=no,status=no,menubar=no,resizable=yes,directories=no,width=" + width.toString() + ",height=" + height.toString() + ",scrollbars=" + 
      ((scrollbars == true) ? "yes" : "no");
  window.open( url, title, style);
  //document.location = url;
}
function OpenModalWindow( url, title, width, height){
  width+=10;
  height+=35;
  var styleIE = "toolbar=no;status=no;menubar=no;resizable=no;scroll=no;directories=no;dialogWidth=" + width.toString() + "px; dialogHeight=" + height.toString() +"px"
  var styleNS = "width=" + (width+15).toString() + ", height=" + height.toString() + ",toolbar=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=no,directories=no,modal=yes";
  var DocUrl = url;

	//if (window.showModalDialog) {
	//	window.showModalDialog(DocUrl,title,styleIE);
	//} 
	//else {
		window.open(DocUrl,title,styleNS);
	//}  
}

function CloseWindow(){ 
  window.close();
}

function FP_getObjectByID(id,o) {
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}

function highlite(obj, className){
    obj.className = className;
}