function popup(url, target, width, height) {
	desktop = window.open(url, target, "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,width="+width+",height="+height+",resizable=no");
	desktop.focus();
}

function popupscroll(url, target, width, height) {
	desktop = window.open(url, target, "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width="+width+",height="+height+",resizable=yes");
	desktop.focus();
}
function popupDS(url, target, width, height) {
	desktop = window.open(url, target, "toolbar=no,location=no,status=no,menubar=yes,scrollbars=yes,width="+width+",height="+height+",resizable=yes");
	desktop.focus();
}
function popupword(url, target, width, height) {
	desktop = window.open(url, target, "toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,width="+width+",height="+height+",resizable=yes");
	desktop.focus();
}

function popupp(url, target, width, height) {
	desktop = window.open(url, target, "toolbar=no,location=no,status=no,menubar=yes,scrollbars=no,width="+width+",height="+height+",resizable=yes");
	desktop.focus();
}

function toggle(n) {
	document.all[n].style.display = ('none' == document.all[n].style.display) ? '' : 'none';
}

function handlePopup(name, closeIt) {
	if (closeIt == 'true') {
		opener.location.reload();
		window.close();
	} else
		window.name = name;
}
 
function popupPrint(url, target, width, height) {
	desktop = window.open(url, target, "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,width="+width+",height="+height+",resizable=no");
	desktop.print();

}

function getPageCoords(element) { 
  var coords = {x: 0, y: 0}; 
  while (element) { 
    coords.x += element.offsetLeft; 
    coords.y += element.offsetTop; 
    element = element.offsetParent; 
    } 
  return coords; 
} 

function trim(str){
         return str.replace(/^\s+|\s+$/g,"");
     } 


