var popup_win;


	function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
		 document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
	  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	}
	MM_reloadPage(true);

	function openWindow(url,w,h,tb,stb,l,mb,sb,rs,x,y){
		//h=screen.availHeight - (screen.availHeight * .33)
	var t=(document.layers)? ',screenX='+x+',screenY='+y: ',left='+x+',top='+y; //A LITTLE CROSS-BROWSER CODE FOR WINDOW POSITIONING
	tb=(tb)?'yes':'no'; stb=(stb)?'yes':'no'; l=(l)?'yes':'no'; mb=(mb)?'yes':'no'; sb=(sb)?'yes':'no'; rs=(rs)?'yes':'no';

	popup_win=window.open(url, 'newWin'+new Date().getTime(), 'scrollbars='+sb+',width='+w+',height='+h+',toolbar='+tb+',status='+stb+',menubar='+mb+',links='+l+',resizable='+rs+t+',left='+(screen.availWidth/2-(w/2))+',top='+((screen.availHeight/2)-(h/2))/2 );

	popup_win.opener = window;

	popup_win.focus();
	setTimeout("popup_win.focus();", 1000);
	}

	function trim(str) {
	  while (str.charAt(str.length - 1)==" ")
		 str = str.substring(0, str.length - 1);
	  while (str.charAt(0)==" ")
		 str = str.substring(1, str.length);
	  return str;
	}

		function disable_enter(e)
		{ if(document.all) // detect IE only
		{var keycodec = event.keyCode}
		else
		{var keycodec = e.which} 
		if(keycodec=='13'){ // check for ascii code of enter key
			//myform = document.forms['add_edit_candidate']
				//myform.Submit.value='Search';
				return false;

		} } 

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }

}
//var x = new getObj('layername');


