
function Publish(s) {
  return(s);
 }

function connector() {
  var s = document.URL;
  if (s.indexOf(".exe") == -1) {
    return ".htm?";
  } else {
    return "&";
  }
}

// popup function 
// expects :
//			url - of the window to be called
//			Title -  for the window, each unique title spawns a new window
//			width - in pixels of the desired window
//			height - in pixels of the desired window
//	hence a legal call would look like:
// <a href="JavaScript:popWindow('myurl.htm','popupwindowname','520','615')" >click here to spawn window</a>
//

oHTMLWin = null;

function centerWindow(url, name, w, h, scroll, menu, resizable)
{
	if (window.screen)
	{
		var chasm = screen.availWidth;
		var mount = screen.availHeight;
		
		winprops = 'width=' + w + ',height=' + h + ',left=' + ((chasm - w - 10) * .5) + ',top=' + ((mount - h) * .5) + ',scrollbars=' + scroll + ',menubar=' + menu + ',resizable=' + resizable;
		
		oHTMLWin = window.open(url, name, winprops);
		oHTMLWin.window.focus();
	}
}

function popWindow(url,title,width,height){
		centerWindow(url, title, width, height, "yes", "no", "no");
		
		/*strProps = "scrollbars=yes,width="+width+",height="+height;
        if(navigator.appName == "Netscape") {//moz
	        popWin = window.open(url,title,strProps);
	        popWin.focus();
        }
        else{  //ie
	       if (navigator.userAgent.indexOf("MSIE 3") >= 0){ 
	           popWin = window.open(url,title,strProps);
	           popWin.location.href = url;
	       }
	       else{
	           var popWin = window.open(url,title,strProps);
	       }
       }  */     
}

function popWindowNoScroll(url,title,width,height){
		centerWindow(url, title, width, height, "no", "no", "no");
		
		/*strProps = "scrollbars=no,width="+width+",height="+height;
        if(navigator.appName == "Netscape") {//moz
	        popWin = window.open(url,title,strProps);
	        popWin.focus();
        }
        else{  //ie
	       if (navigator.userAgent.indexOf("MSIE 3") >= 0){ 
	           popWin = window.open(url,title,strProps);
	           popWin.location.href = url;
	           //if (popWin.opener == null) popWin.opener = window; 
	           //popWin.opener.name = "opener";
	       }
	       else{
	           var popWin = window.open(url,title,strProps);
	       }
       }  */    
}

// old function for backwards support
function openWin(theURL,title,width,height,scrolling){
window.open(theURL,title,'width=' + width + ',height=' + height + ',scrollbars=' + scrolling + ',toolbar=no,titlebar=yes,status=no,menubar=no,resizable=no,location=no');
}