//alert (images_subdir);
//var images_subdir = 'http://stage.mgm.com/mgm/images/';
//var template_subdir;

// set variables
//function setPath(a_images_subdir, a_template_subdir){
//    images_subdir = a_images_subdir;
//    template_subdir = a_template_subdir;
//}

//detect browser
bName = navigator.appName;
bVer = parseInt(navigator.appVersion);

function img_on(imgName) {
	if (document.images) {
		OnImage = eval (imgName + "_on.src");
  	document [imgName].src = OnImage;
  }
}

function img_off(imgName) {
	if (document.images) {
		OffImage = eval(imgName + "_off.src");
		document [imgName].src = OffImage;
	}
}

if (document.images) {
    home_img_on = new Image();
    home_img_on.src = images_subdir + "html_img/nav_home2_new.gif";
    home_img_off = new Image();
    home_img_off.src = images_subdir + "html_img/nav_home1_new.gif";

    movie_img_on = new Image();
    movie_img_on.src = images_subdir + "html_img/nav_movies2_new.gif";
    movie_img_off = new Image();
    movie_img_off.src = images_subdir + "html_img/nav_movies1_new.gif";

    tv_img_on = new Image();
    tv_img_on.src = images_subdir + "html_img/nav_tv2_new.gif";
    tv_img_off = new Image();
    tv_img_off.src = images_subdir + "html_img/nav_tv1_new.gif";

    trailers_img_on = new Image();
    trailers_img_on.src = images_subdir + "html_img/nav_trailers2_new.gif";
    trailers_img_off = new Image();
    trailers_img_off.src = images_subdir + "html_img/nav_trailers1_new.gif";

    dvd_img_on = new Image();
    dvd_img_on.src = images_subdir + "html_img/nav_dvd2_new.gif";
    dvd_img_off = new Image();
    dvd_img_off.src = images_subdir + "html_img/nav_dvd1_new.gif";

    music_img_on = new Image();
    music_img_on.src = images_subdir + "html_img/nav_music2_new.gif";
    music_img_off = new Image();
    music_img_off.src = images_subdir + "html_img/nav_music1_new.gif";

    games_img_on = new Image();
    games_img_on.src = images_subdir + "html_img/nav_games2_new.gif";
    games_img_off = new Image();
    games_img_off.src = images_subdir + "html_img/nav_games1_new.gif";
  }

if (navigator.appVersion.indexOf("Mac") != -1) {
eval ("document.write('\<link rel=\"stylesheet\" href=\"/" + template_subdir + "/javascript/style.css\"\>');");
  //document.write('\<link rel=\"stylesheet\" href=\"/webApp/javascript/style.css\"\>');
} else {
eval ("document.write('\<link rel=\"stylesheet\" href=\"/" + template_subdir + "/javascript/style.css\"\>');");
  //document.write('\<link rel=\"stylesheet\" href=\"/webApp/javascript/style.css\"\>');
}


// function that displays status bar message

function dm(msgStr) {
  document.returnValue = false;
  if (document.images) {
    window.status = msgStr;
    document.returnValue = true;
  }
}

var showMsg = navigator.userAgent != "Mozilla/4.0 (compatible; MSIE 4.0)";

function dmim(msgStr) {
  document.returnValue = false;
  if (showMsg) {
    window.status = msgStr;
    document.returnValue = true;
  }
}

function Load_Site (url)
{
	var options = "top=0,left=0,width=600,height=450,scrollbars=1,"
		+ "menubar=1,toolbar=1,location=1,resizable=1,status=1,directories=1";
	site_win = open (url, "site_win", options);
}

NS4 = (document.layers);
IE4 = (document.all);
ver4 = (NS4 || IE4);
IE5 = (IE4 && navigator.appVersion.indexOf("5.")!=-1);
isMac = (navigator.appVersion.indexOf("Mac") != -1);