function makeWin2(url) {  // pop up window for <autocard> tag

              agent = navigator.userAgent;
              windowName = "Sitelet";

              params  = "";
              params += "toolbar=0,";
              params += "location=0,";
              params += "directories=0,";
              params += "status=0,";
              params += "menubar=0,";
              params += "scrollbars=0,";
              params += "resizable=0,";
              params += "width=220,";
              params += "height=310";

              win = window.open(url, windowName , params);

              if (agent.indexOf("Mozilla/2") != -1 &&
agent.indexOf("Win") == -1) {
                  win = window.open(url, windowName , params);
              }

              if (!win.opener) {
                  win.opener = window;
              }

}

function autoCardWindow(cardname) {  // pop up window for <autocard> tag - with drop shadows

              agent = navigator.userAgent;
              windowName = "Sitelet";

              params  = "";
              params += "toolbar=0,";
              params += "location=0,";
              params += "directories=0,";
              params += "status=0,";
              params += "menubar=0,";
              params += "scrollbars=0,";
              params += "resizable=0,";
              params += "width=445,";
              params += "height=470";

              win = window.open("/magic/autocard.asp?name="+cardname, windowName , params);

              if (!win.opener) {
                  win.opener = window;
              }

}

function autoCardWindowJP(cardname) {  // pop up window for <autocard> tag - with drop shadows

              agent = navigator.userAgent;
              windowName = "Sitelet";

              params  = "";
              params += "toolbar=0,";
              params += "location=0,";
              params += "directories=0,";
              params += "status=0,";
              params += "menubar=0,";
              params += "scrollbars=0,";
              params += "resizable=0,";
              params += "width=445,";
              params += "height=370";

              win = window.open("/magic/autocardjp.asp?name="+cardname, windowName , params);

              if (!win.opener) {
                  win.opener = window;
              }

}

function autoCardWindowSR(cardname) {  // pop up window for <autocard> tag - with drop shadows

              agent = navigator.userAgent;
              windowName = "Sitelet";

              params  = "";
              params += "toolbar=0,";
              params += "location=0,";
              params += "directories=0,";
              params += "status=0,";
              params += "menubar=0,";
              params += "scrollbars=0,";
              params += "resizable=0,";
              params += "width=210,";
              params += "height=295";

              win = window.open("/scoutingreport/autocard.asp?name="+cardname, windowName , params);

              if (!win.opener) {
                  win.opener = window;
              }

}

function autoCardWindowSR2(cardname,url) {  // pop up window for <autocard> tag - with drop shadows

              agent = navigator.userAgent;
              windowName = "Sitelet";

              params  = "";
              params += "toolbar=0,";
              params += "location=0,";
              params += "directories=0,";
              params += "status=0,";
              params += "menubar=0,";
              params += "scrollbars=0,";
              params += "resizable=0,";
              params += "width=210,";
              params += "height=295";

               win = window.open("/scoutingreport/autocard.asp?url="+url+"&name="+cardname, windowName , params);

              if (!win.opener) {
                  win.opener = window;
              }

}

function SWTCGautoCardWindow(cardname) {  // pop up window for <autocard> tag - with drop shadows

              agent = navigator.userAgent;
              windowName = "Sitelet";

              params  = "";
              params += "toolbar=0,";
              params += "location=0,";
              params += "directories=0,";
              params += "status=0,";
              params += "menubar=0,";
              params += "scrollbars=0,";
              params += "resizable=0,";
              params += "width=245,";
              params += "height=335";

              win = window.open("/swtcg/swtcg_autocard.asp?name="+cardname, windowName , params);
				
              if (!win.opener) {
                  win.opener = window;
              }

}

function SWTCGautoCardWindowLandscape(cardname) {  // pop up window for <autocard> tag - with drop shadows

              agent = navigator.userAgent;
              windowName = "Sitelet";

              params  = "";
              params += "toolbar=0,";
              params += "location=0,";
              params += "directories=0,";
              params += "status=0,";
              params += "menubar=0,";
              params += "scrollbars=0,";
              params += "resizable=0,";
              params += "width=330,";
              params += "height=245";

              win = window.open("/swtcg/swtcg_autocard.asp?name="+cardname, windowName , params);
			  	
              if (!win.opener) {
                  win.opener = window;
              }

}

function autoCardWindow2(cardname, url) {  // pop up window for <autocard> tag - with drop shadows

              agent = navigator.userAgent;
              windowName = "Sitelet";

              params  = "";
              params += "toolbar=0,";
              params += "location=0,";
              params += "directories=0,";
              params += "status=0,";
              params += "menubar=0,";
              params += "scrollbars=0,";
              params += "resizable=0,";
              params += "width=245,";
              params += "height=330";

              win = window.open("/magic/autocard.asp?url="+url+"&name="+cardname, windowName , params);

              if (!win.opener) {
                  win.opener = window;
              }

}


function makeWin3(url) {  // pop up larger window than <autocard>, for <glossary> tag

              agent = navigator.userAgent;
              windowName = "Sitelet";

              params  = "";
              params += "toolbar=0,";
              params += "location=0,";
              params += "directories=0,";
              params += "status=0,";
              params += "menubar=0,";
              params += "scrollbars=1,";
              params += "resizable=1,";
              params += "width=250,";
              params += "height=350";

              win = window.open(url, windowName , params);

              if (agent.indexOf("Mozilla/2") != -1 &&
agent.indexOf("Win") == -1) {
                  win = window.open(url, windowName , params);
              }

              if (!win.opener) {
                  win.opener = window;
              }

}

function makeWinXY(url, nWidth, nHeight) {  // pop up window with height/width

              agent = navigator.userAgent;
              windowName = "xywindow";

              params  = "";
              params += "toolbar=0,";
              params += "location=0,";
              params += "directories=0,";
              params += "status=0,";
              params += "menubar=0,";
              params += "scrollbars=1,";
              params += "resizable=1,";
              params += "width=" + nWidth + ",";
              params += "height=" + nHeight;

              win = window.open(url, windowName , params);

              if (agent.indexOf("Mozilla/2") != -1 &&
agent.indexOf("Win") == -1) {
                  win = window.open(url, windowName , params);
              }

              if (!win.opener) {
                  win.opener = window;
              }

}

function makeWinQuiz() {  // pop up window for <autocard> tag

              agent = navigator.userAgent;
              windowName = "Sitelet";

              params  = "";
              params += "toolbar=0,";
              params += "location=0,";
              params += "directories=0,";
              params += "status=0,";
              params += "menubar=0,";
              params += "scrollbars=1,";
              params += "resizable=0,";
              params += "width=787,";
              params += "height=580";

			  url = "/default2.asp?x=pokemon/professortest1&qnum=1&start=true"	
              win = window.open(url, windowName , params);

              if (agent.indexOf("Mozilla/2") != -1 &&
agent.indexOf("Win") == -1) {
                  win = window.open(url, windowName , params);
              }

              if (!win.opener) {
                  win.opener = window;
              }

}

function makeWinQuizIT() {  // pop up window for <autocard> tag

              agent = navigator.userAgent;
              windowName = "Sitelet";

              params  = "";
              params += "toolbar=0,";
              params += "location=0,";
              params += "directories=0,";
              params += "status=0,";
              params += "menubar=0,";
              params += "scrollbars=1,";
              params += "resizable=0,";
              params += "width=787,";
              params += "height=580";

			  url = "/default2.asp?x=pokemon/professortest1it&qnum=1&start=true"	
              win = window.open(url, windowName , params);

              if (agent.indexOf("Mozilla/2") != -1 &&
agent.indexOf("Win") == -1) {
                  win = window.open(url, windowName , params);
              }

              if (!win.opener) {
                  win.opener = window;
              }

}

function makeWinQuizFR() {  // pop up window for <autocard> tag

              agent = navigator.userAgent;
              windowName = "Sitelet";

              params  = "";
              params += "toolbar=0,";
              params += "location=0,";
              params += "directories=0,";
              params += "status=0,";
              params += "menubar=0,";
              params += "scrollbars=1,";
              params += "resizable=0,";
              params += "width=787,";
              params += "height=580";

			  url = "/default2.asp?x=pokemon/professortest1fr&qnum=1&start=true"	
              win = window.open(url, windowName , params);

              if (agent.indexOf("Mozilla/2") != -1 &&
agent.indexOf("Win") == -1) {
                  win = window.open(url, windowName , params);
              }

              if (!win.opener) {
                  win.opener = window;
              }

}

function makeWinQuizNL() {  // pop up window for <autocard> tag

              agent = navigator.userAgent;
              windowName = "Sitelet";

              params  = "";
              params += "toolbar=0,";
              params += "location=0,";
              params += "directories=0,";
              params += "status=0,";
              params += "menubar=0,";
              params += "scrollbars=1,";
              params += "resizable=0,";
              params += "width=787,";
              params += "height=580";

			  url = "/default2.asp?x=pokemon/professortest1nl&qnum=1&start=true"	
              win = window.open(url, windowName , params);

              if (agent.indexOf("Mozilla/2") != -1 &&
agent.indexOf("Win") == -1) {
                  win = window.open(url, windowName , params);
              }

              if (!win.opener) {
                  win.opener = window;
              }

}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function pulldown(formObj)
	{
		url = formObj.options[formObj.options.selectedIndex].value;
		if(url != "empty")
			{
			window.location = url;
			url = "";
			}
	}
	

// This checks to see if the window's dimensions have actually changed
// (because Netscape often fires a false onResize event when it forms scrollbars);
// if they have, the document is reloaded.
// Note that document.location is not supposed to be settable, but here's another
// case where the implementation does not match the specs.

function resizeFix(){
  if(document.resizeFix.initWidth!=window.innerWidth
   ||document.resizeFix.initHeight!=window.innerHeight)
      document.location=document.location;
}

// This function checks to see if the browser supports the Layer object (i.e., Netscape 4.X);
// if it does, then it creates a new object with properties to hold the current window width & height
// and assigns the resizeFix() function to the window's onResize event

function checkBrowser(){
  if(document.layers){
    if(typeof document.fix == "undefined"){
      document.resizeFix=new Object();
      document.resizeFix.initWidth=window.innerWidth;
      document.resizeFix.initHeight=window.innerHeight;
    }
    window.onresize=resizeFix;
  }
}

// This calls the browser check function above

checkBrowser();


// This is a function for a TV House webcast pop-up window
function video_window(url) {
window.open(url,"tvh201","toolbar=0,titlebar=no,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=445,height=600,left=50,top=10");
}

// Function to open window to a set size
function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}
