function clearDefault(el) {
	if (el.defaultValue==el.value) el.value = "";
}
function putDefault(el) {
	if (el.value=="") el.value = el.defaultValue;
}

function openPreview(url,width,height){;
	newWindow(url,width,height,'pjoem','toolbar=no,status=no,resizable=no,scrollbars=no');
}
function newWindow(url,width,height,name,props){
  if(!props){
  	var properties = "width="+width+",height="+height+",toolbar=no,status=no,resizable=yes,scrollbars=yes";
 }else{
   var properties = "width="+width+",height="+height+","+props;
 }
  	var screenY = window.screen.availHeight;
  	var screenX = window.screen.availWidth;
  	var leftvar = Math.round((screenX - width) / 2);
  	var rightvar = Math.round((screenY - height) / 2);
  	properties += ",left=" + leftvar +",top=" + rightvar;
 
	popupHandle = window.open(url, name, properties);
	setTimeout('popupHandle.focus();',250);
}
//-----------------