// v4.0 - 22 feb 2001
// script by 1boy at 1uffakind.com

// build links like this: pop('urlorpath','windowname',w,h,'controls','scroll','statusbar');
// a href="javascript:pop('testpage2.htm','mynewpopup',350,350,'no','yes','no');"
// onclick="pop('testpage2.htm','mynewpopup',350,350,'no','yes','no'); return true;"

// set following master properties for all opens from this page or script

popresize = "yes";
popmenu = "yes";
pophistory = "no";
popdirectories = "no";

// defaults in case an argument is not passed through link event

popurl = "#";
popname = "newblankpopup";

popwidth = 300;
popheight = 300;

popcontrols = "no";
popscroll = "no";
popstatus = "no";

function pop(popurl,popname,popwidth,popheight,popcontrols,popscroll,popstatus) {

   specs = 'width=' + popwidth + ',height=' + popheight + ',scrollbars=' + popscroll + ',resizable=' + popresize + ',toolbar=' + popcontrols + ',location=' + popcontrols + ',personalbar=' + popcontrols +  ',locationbar=' + popcontrols + ',statusbar=' + popstatus + ',status=' + popstatus + ',history=' + pophistory + ',directories=' + popdirectories  + ',menubar=' + popmenu;

   popped = window.open(popurl,popname,specs);

   skipfocus = false;

   if ((window.navigator.appName.indexOf("Explorer") >= 0) && (window.navigator.userAgent.indexOf("Mozilla/3") >= 0))
     {
     skipfocus = true;
     }

   if (skipfocus != true)
     {
      popped.focus();
     }

}

