/**
This is the pop up function.
**/

s= "no" ;
var popUpWindow = null;
var undefinedVariable;
var undefType = typeof undefinedVariable;

function pop(url,w,h,s){
   if (popUpWindow!=null) {
     var windowHasBeenClosed = (typeof popUpWindow.location == undefType ) ;
     if (!windowHasBeenClosed ){
     	 popUpWindow.close();
   	 }
   }
   settings="resizable=yes,toolbar=auto,scrollbars=" + s + ", width=" + w +
",height=" + h + ",status=no";
   popUpWindow = open(url,"g", settings);

   if ( navigator.appVersion.indexOf("MSIE")==-1 ) {
     popUpWindow.resizeTo(w, h);
   }

}

/**
This is a multipop function
**/

var multipop_s     = "no" ;
var multipop_count = 0;

function multipop(url,w,h,s){
   var popupName = "multipop" + ++multipop_count ;
   settings="resizable=yes,toolbar=no,scrollbars=" + s + ", width=" + w +
",height=" + h + ",status=no";
   open(url,popupName, settings);

   if ( navigator.appVersion.indexOf("MSIE")==-1 ) {
     popUpWindow.resizeTo(w, h);
   }

}
