
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3) version = "n3";
else version = "n2";
if (version == "n2" && browserName == "Microsoft Internet Explorer" && browserVer >= 4) version = "n3";
if (version == "n3") {
	top_homeon = new Image(60, 20);
	top_homeon.src = "/pics/buttons/top_home_on.gif";
	top_calendaron = new Image(94, 20);
	top_calendaron.src = "/pics/buttons/top_calendar_on.gif";
	top_contestson = new Image(94, 20);
	top_contestson.src = "/pics/buttons/top_contests_on.gif";
	top_blogon = new Image(56, 20);
	top_blogon.src = "/pics/buttons/top_blog_on.gif";
	top_abouton = new Image(90, 20);
	top_abouton.src = "/pics/buttons/top_about_on.gif";

	side_currentissueon = new Image(130, 20);
	side_currentissueon.src = "/pics/buttons/side_currentissue_on.gif";
	side_calendaron = new Image(130, 20);
	side_calendaron.src = "/pics/buttons/side_calendar_on.gif";
	side_marketplaceon = new Image(130, 20);
	side_marketplaceon.src = "/pics/buttons/side_marketplace_on.gif";
	side_blogon = new Image(130, 20);
	side_blogon.src = "/pics/buttons/side_blog_on.gif";
	side_contestson = new Image(130, 20);
	side_contestson.src = "/pics/buttons/side_contests_on.gif";
	side_subscribeon = new Image(130, 20);
	side_subscribeon.src = "/pics/buttons/side_subscribe_on.gif";
	side_resourceson = new Image(130, 20);
	side_resourceson.src = "/pics/buttons/side_resources_on.gif";
	side_articleson = new Image(130, 20);
	side_articleson.src = "/pics/buttons/side_articles_on.gif";
	side_advertiseon = new Image(130, 20);
	side_advertiseon.src = "/pics/buttons/side_advertise_on.gif";
	side_contacton = new Image(130, 20);
	side_contacton.src = "/pics/buttons/side_contact_on.gif";

	top_homeoff = new Image(60, 20);
	top_homeoff.src = "/pics/buttons/top_home_off.gif";
	top_calendaroff = new Image(94, 20);
	top_calendaroff.src = "/pics/buttons/top_calendar_off.gif";
	top_contestsoff = new Image(94, 20);
	top_contestsoff.src = "/pics/buttons/top_contests_off.gif";
	top_blogoff = new Image(56, 20);
	top_blogoff.src = "/pics/buttons/top_blog_off.gif";
	top_aboutoff = new Image(90, 20);
	top_aboutoff.src = "/pics/buttons/top_about_off.gif";

	side_currentissueoff = new Image(130, 20);
	side_currentissueoff.src = "/pics/buttons/side_currentissue_off.gif";
	side_calendaroff = new Image(130, 20);
	side_calendaroff.src = "/pics/buttons/side_calendar_off.gif";
	side_marketplaceoff = new Image(130, 20);
	side_marketplaceoff.src = "/pics/buttons/side_marketplace_off.gif";
	side_blogoff = new Image(130, 20);
	side_blogoff.src = "/pics/buttons/side_blog_off.gif";
	side_contestsoff = new Image(130, 20);
	side_contestsoff.src = "/pics/buttons/side_contests_off.gif";
	side_subscribeoff = new Image(130, 20);
	side_subscribeoff.src = "/pics/buttons/side_subscribe_off.gif";
	side_resourcesoff = new Image(130, 20);
	side_resourcesoff.src = "/pics/buttons/side_resources_off.gif";
	side_articlesoff = new Image(130, 20);
	side_articlesoff.src = "/pics/buttons/side_articles_off.gif";
	side_advertiseoff = new Image(130, 20);
	side_advertiseoff.src = "/pics/buttons/side_advertise_off.gif";
	side_contactoff = new Image(130, 20);
	side_contactoff.src = "/pics/buttons/side_contact_off.gif";
}
function img_act(imgName) {
  if (version == "n3") {
	imgOn = eval(imgName + "on.src");
	document[imgName].src = imgOn;
  }
}
function img_inact(imgName) {
  if (version == "n3") {
	imgOff = eval(imgName + "off.src");
	document[imgName].src = imgOff;
  }
}


function searchsite() {
  searchTerm = document.searchform.searchterm.value;
  if (searchTerm == "") { alert("Please enter a search term"); }
  else {
	newString = searchTerm.replace(/ /g, "+");
	newLoc = 'http://www.google.com/search?hl=en&as_q=' + newString + '&as_epq=&as_oq=&as_eq=&num=10&lr=&as_filetype=&ft=i&as_sitesearch=www.urbanbaby.ca&as_qdr=all&as_rights=&as_occt=any&cr=&as_nlo=&as_nhi=&safe=images';
	parent.location = newLoc;
  }
}


function createWindow(target) {
  targetName = "newsite"; width=800; height=500; scrollbars = "no"; resizable = "yes";
  window.open(target, targetName, "toolbar=no,width=" + width + ",height=" + height + ",directories=no,location=no,status=no,scrollbars=" + scrollbars + ",resizable=" + resizable + ",menubar=no");
//var popupWin = 
//  if (popupWin) { popupWin.focus(); }
}

function createWindowScroll(target,width,height) {
  targetName = target;
  targetName = target.substring(0, target.lastIndexOf('.'));
  if (target.indexOf('/') != -1) { targetName = targetName.substring(targetName.lastIndexOf('/')+1, length.targetName); }
//  params = "toolbar=no,width=" + width + ",height=" + height + ",directories=no,location=no,status=no,scrollbars=yes,resizable=yes,menubar=no";
//  alert("x" + targetName + "x");

  window.open(target, targetName, "toolbar=no,width=" + width + ",height=" + height + ",directories=no,location=no,status=no,scrollbars=yes,resizable=yes,menubar=no");
}

function message(txt) { window.status = txt; }
function remove_message() { window.status = ""; }
