iebrowser = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ))
nsbrowser = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4 )))
var closeButton = ""

// Define a CSS class based on browser type
document.write ('<style type="text/css">' )
if (iebrowser)
{
   document.write("div.line4 {height: 190px;}")
} else {
   document.write("div.line4 {min-height: 190px;}")
}
document.write ("</style>" )


function changePhoto(photo)
{ 
   document.change.src = photo + ".jpg"
}

function doPhoto(photo, w, h)
{
   path = "http://www.WePlaySports.com/"
   if ((iebrowser) || (nsbrowser))
   {
      closeButton = "<form><input type='button' value='CLOSE' onclick='self.close()'></form>"
   }
   var photoIMG = "<p><img src='" + path + photo + ".jpg' width='" + w + "' height='" + h + "' alt='Downloading'></p>"
   h += 75
   w += 50
   var newWindow = window.open("","","height=" + h + ",width=" + w + ",scrollbars") 
   var photoPage = "<html><body bgcolor='#FFFFFF'><center>" + photoIMG + closeButton + "</center></body></html>"
   newWindow.document.write(photoPage)
   newWindow.document.close()
}

function doVideo(video, w, h)
{
   if ((iebrowser) || (nsbrowser))
   {
      closeButton = "<form><br><input type='button' value='CLOSE' onclick='self.close()'></form>"
   }
   var newWindow = window.open("","","height=" + (h + 100) + ",width=" + (w + 50) + ",scrollbars")
   var videoPage = "<html><body bgcolor='#FFFFFF'><center><object width='" + w + "' height='" + h + "'>" + video + "</object>" + closeButton + "</center></body></html>"
   newWindow.document.write(videoPage)
   newWindow.document.close()
}

function doDescription(text)
{
   if ((iebrowser) || (nsbrowser))
   {
      closeButton = "<form><input type='button' value='CLOSE' onclick='self.close()'></form>"
   }
   var newWindow = window.open("","","HEIGHT=200,WIDTH=250,scrollbars") 
   var descriptionWindow  = "<html><body bgcolor='#FFFFFF'><p><font size='3' face='Arial, Helvetica'>"
       descriptionWindow += text + "</font></p><center>" + closeButton + "</center></body></html>"
   newWindow.document.write(descriptionWindow)
   newWindow.document.close()
}

function doSeal(mypage,myname,w,h,scroll,pos)
{
   var win=null;
   myname = typeof(myname) != 'undefined' ? myname : "mywin";
   w = typeof(w) != 'undefined' ? w : "450";
   h = typeof(h) != 'undefined' ? h : "400";
   scroll = typeof(scroll) != 'undefined' ? scroll : "yes";
   pos = typeof(pos) != 'undefined' ? pos : "random";
   if(pos=="random")
   {
      LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
      TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
   }
   if(pos=="center")
   {
      LeftPosition=(screen.width)?(screen.width-w)/2:100;
      TopPosition=(screen.height)?(screen.height-h)/2:100;
   }
   else if((pos!="center" && pos!="random") || pos==null)
   {
      LeftPosition=0;TopPosition=20;
   }
   settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=yes,resizable=no';
   win=window.open(mypage,myname,settings);
}

function doImprint()
{
   var attr = "HEIGHT=575,WIDTH=575,scrollbars,resizable,toolbar"
   var newWindow = window.open("http://www.WePlaySports.com/imprint","",attr)
   newWindow.document.close()
}


function doShipping()
{
   
   var attr = "HEIGHT=350,WIDTH=575,scrollbars,resizable"
   var newWindow = window.open("http://www.WePlaySports.com/order/shipping.html","", attr)
   newWindow.document.close()
}

var batwindow
function doBat()
{
   var attr = "HEIGHT=350,WIDTH=575,scrollbars,resizable"
   batwindow=window.open("http://www.WePlaySports.com/bat.php",'',attr)
   if (window.focus) {newwindow.focus()}
}

var freewindow
function doFree(x)
{
   var attr = "HEIGHT=350,WIDTH=575,scrollbars,resizable"
   switch (x.toLowerCase())
   {
      case "bat":
         freewindow = window.open("http://www.WePlaySports.com/bat.php",'',attr)
         break
      case "glove":
         freewindow = window.open("http://www.WePlaySports.com/glove.php",'',attr)
         break
      case "ua":
         freewindow = window.open("http://www.WePlaySports.com/ua.php",'',attr)
         break
     case "combined":
         freewindow = window.open("http://www.WePlaySports.com/combined.php",'',attr)
         break
     case "team":
         freewindow = window.open("http://www.WePlaySports.com/team.php", '',attr)
         break
     case "vball_shoes":
         freewindow = window.open("http://www.WePlaySports.com/vball_shoes.php", '',attr)
         break
     case "wrestling":
         freewindow = window.open("http://www.WePlaySports.com/wrestling.php", '',attr)
         break
     case "coupon":
         freewindow = window.open("http://www.WePlaySports.com/coupon.php", '',attr)
         break
   }
   if (window.focus) {freewindow.focus()}
}

function DeMarini(v, x)
{
   var attr = "HEIGHT=350,WIDTH=600,scrollbars,resizable"
   var video = "http://www.demarini.com/videos/baseball/player.html?video=" + v
   freewindow = window.open(video,'',attr)
   if (window.focus) {freewindow.focus()}
}

function showStatus(msg)
{
   window.status = msg
   return true
}

function showStatus(msg)
{
   window.status = msg
   return true
}

function changeElement(x, y)
{
   document.getElementById(x).value = y
}