if (document.images) {
  aboutus1_on = new Image
  aboutus1 = new Image

  aboutus1_on.src= "aboutus1_on.gif"
  aboutus1.src ="aboutus1.gif"
}

else {
  aboutus1_on = " "
  aboutus1 = " "
  document.about = " "
}

if (document.images) {
  sitemap1_on = new Image
  sitemap1 = new Image

  sitemap1_on.src= "sitemap1_on.gif"
  sitemap1.src ="sitemap1.gif"
}

else {
  sitemap1_on = " "
  sitemap1 = " "
  document.site = " "
}


if (document.images) {
  privacy1_on = new Image
  privacy1 = new Image

  privacy1_on.src= "privacy1_on.gif"
  privacy1.src ="privacy1.gif"
}

else {
  privacy1_on = " "
  privacy1 = " "
  document.private = " "
}

if (document.images) {
  ybstore = new Image
  kid = new Image

  ybstore.src = "ybstore4.jpg"
  kid.src= " kid6.jpg"
}

else {
  ybstore = " "
  kid = " "
  document.youth = " "
}

if (document.images) {
  sbstore = new Image
  softball = new Image

  sbstore.src = "sbstore4.jpg"
  softball.src= "softball6.jpg"
}

else {
  sbstore = " "
  softball = " "
  document.soball = " "
}

if (document.images) {
  bbstore = new Image
  baseball = new Image

  bbstore.src = "bbstore4.jpg"
  baseball.src= "baseball6.jpg"
}

else {
  bbstore = " "
  softball = " "
  document.bball = " "
}

if (document.images) {
  dgloves = new Image
  dbats = new Image
  daids = new Image
  dcage = new Image
  dwood = new Image
  dmachine = new Image
  dsmachine = new Image
  dvideo = new Image
  dsvideo = new Image
  dgun = new Image
  head = new Image

  dgloves.src = "gtext.gif"
  dbats.src = "gtext.gif"
  daids.src = "tatext.gif"
  dcage.src = "bctext.gif"
  dwood.src = "wbtext.gif"
  dmachine.src = "mtext.gif"
  dsmachine.src = "smtext.gif"
  dvideo.src = "vtext.gif"
  dsvideo.src = "svtext.gif"
  dgun.src = "rgtext.gif"
  head.src = "text.gif"
}

else {
  dgloves = " "
  dbats = " "
  daids = " "
  dcage = " "
  dwood = " "
  dmachine = " "
  dsmachine = " "
  dvideo = " "
  dsvideo = " "
  dgun = " "
  head = " "
  document.store = " "
}


var expDays = 1; // number of days the cookie should last
var page = "http://www.baseballtips.com/exit.html";
var windowprops
= "top=1,left=1,location=no,toolbar=no,menubar=no,scrollbars=no,width=400,height=400,resize=yes";

function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
   }
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function checkCount() {
var count = GetCookie('count');
if (count == null) {
count=1;
SetCookie('count', count, exp);

window.open(page, "", windowprops);

}
else {
count++;
SetCookie('count', count, exp);
   }
}

