function openPopUp(TheUrl,TheName,TheAttr,X,Y,W_,H_) {
	
   // set x and y to center screen if no values are supplied
   try{
	if (X==null){X=(screen.width)?(screen.width/4-W_):100;};
	if (Y==null){Y=(screen.height)?(screen.height/4-H_):100;};
   }catch(e){};
   
   // the if will make the popups easier and less coding will be required
   if (TheAttr == 'DefAttr') {TheAttr='status=no,location=no,toolbar=no,menubar=no,directories=no,scrolling=no,scrollbars=no,resizable=no';}
   //document.title="opening window";
   // execute popup
     window.open(TheUrl, TheName, TheAttr + ",HEIGHT="+H_+",WIDTH="+W_+",TOP="+Y+",LEFT="+X); 
//document.title="opened window";
   } //  End -->
