function winopen(url,windowname,width,height) {
 var features="location=no, menubar=no, status=no, scrollbars=yes, resizable=yes, toolbar=no";
 if (width) {
  if (window.screen.width > width)
   features+=", left="+(window.screen.width-width)/2;
  else width=window.screen.width;
  features+=", width="+width;
 }
 if (height) {
  if (window.screen.height > height)
   features+=", top="+(window.screen.height-height)/2-30;
  else height=window.screen.height;
  features+=", height="+height;
 }
 window.open(url,windowname,features);
}

function winopen2(url,windowname,width,height) {
 var features="location=no, menubar=no, status=no, scrollbars=no, resizable=no, toolbar=no";
 if (width) {
  if (window.screen.width > width)
   features+=", left="+(window.screen.width-width)/2;
  else width=window.screen.width;
  features+=", width="+width;
 }
 if (height) {
  if (window.screen.height > height)
   features+=", top="+(window.screen.height-height)/2-10;
  else height=window.screen.height;
  features+=", height="+height;
 }
 window.open(url,windowname,features);
}

window.onload=blankPOP;
function blankPOP()
{
	var j = document.getElementsByTagName('a');
	for (var i=0;i<j.length;i++)
	{
		if (j[i].getAttribute('className') == 'blank' || j[i].getAttribute('class') == 'blank')
		{
			j[i].target = '_blank';
		}
	}
};

