function openwindow(url,w,h)
{

  var winwidth = screen.availWidth;
  var winheight = screen.availHeight;
  var leftt=Math.floor((winwidth/2)-(w/2));
  var topt=Math.floor((winheight/2)-(h/2));
  window.open(url,'popup','left='+leftt+',top='+topt+',width='+w+', height='+h+', toolbar=0,  location=0, directories=0,status=0, titlebar=0, menubar=0, resizable=1, scrollbars=1')
};


function openwindow1(url,w,h)
{

  var winwidth = screen.availWidth;
  var winheight = screen.availHeight;
  var leftt=Math.floor((winwidth/2)-(w/2));
  var topt=Math.floor((winheight/2)-(h/2));
  window.open(url,'popup1','left='+leftt+',top='+topt+',width='+w+', height='+h+', toolbar=0,  location=0, directories=0,status=0, titlebar=0, menubar=0, resizable=1, scrollbars=1')
};

function openwindow2(url,w,h)
{

  var winwidth = screen.availWidth;
  var winheight = screen.availHeight;
  var leftt=Math.floor((winwidth/2)-(w/2));
  var topt=Math.floor((winheight/2)-(h/2));
  window.open(url,'popup2','left='+leftt+',top='+topt+',width='+w+', height='+h+', toolbar=0,  location=0, directories=0,status=0, titlebar=0, menubar=0, resizable=1, scrollbars=1')
};

function openwindow3(url,w,h)
{

  var winwidth = screen.availWidth;
  var winheight = screen.availHeight;
  var leftt=Math.floor((winwidth/2)-(w/2));
  var topt=Math.floor((winheight/2)-(h/2));
  window.open(url,'popup3','left='+leftt+',top='+topt+',width='+w+', height='+h+', toolbar=0,  location=0, directories=0,status=0, titlebar=0, menubar=0, resizable=1, scrollbars=1')
};


function getRes(field)
{
	
	location.href="/"+field.name+"/"+field.value;
	
}


function checkNumber(numval)
{
	if (isNaN(numval.value))  {
 	  	alert("You must enter numbers, not letters in this field.");
		numval.focus();
 	  	return false;
	}
	else
	{
		return true;
 	}
}
