//loader_test

//common_addon part
if (isMac && navigator.appVersion.indexOf("MSIE 4.0")!=-1) isMenu = false;
if (isMac && !IE45 && !NS4) callOnload = true;
else callOnload = false;

HM_DOM = (document.getElementById) ? true : false;
HM_NS4 = (document.layers) ? true : false;
HM_NS4old = (HM_NS4 && (parseFloat(navigator.appVersion) < 4.02));
HM_IE = (document.all) ? true : false;
HM_IE4 = HM_IE && !HM_DOM;
HM_Mac = (navigator.appVersion.indexOf("Mac") != -1);
HM_IE4M = HM_IE4 && HM_Mac;
HM_IsMenu = (HM_DOM || (HM_NS4 && !HM_NS4old) || (HM_IE && !HM_IE4M));

if (HM_IsMenu)
	isMenu = HM_IsMenu;
if (HM_DOM && (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko")))
	callOnload = true;

     NS4 = (document.layers);
     IE4 = (document.all);
    ver4 = (NS4 || IE4);
	 IE5 = (IE4 && navigator.appVersion.indexOf("5.")!=-1);
   isMac = (navigator.appVersion.indexOf("Mac") != -1);
   IE45  = (IE4 && isMac && navigator.appVersion.indexOf("4.5")!=-1);
  isMenu = true;
  
  if (IE5 && isMac) HM_DOM = false;
  
  
if(window.event + "" == "undefined") event = null;
function HM_f_PopUp(){return};
function HM_f_PopDown(){return};
popUp = HM_f_PopUp;
popDown = HM_f_PopDown;

//delimiter between two navbars
function displayNavDelimiter(){
	var imgserver = location.protocol + "//a548.g.akamai.net/7/548/361/0002/www.victoriassecret.com";
	if(isMac && IE45) document.write("<img src=\"" + imgserver + "/images/common/clr_spcr.gif\" height=48 width=1 border=0>");
	else document.write("<br clear=all>");
}
//---//



//common navbar part
/*
	some common, browser neutral code
*/

var LLN_key;

var appserver = "";
var wwwserver = "";

var static_appserver = "";
var static_wwwserver = "";

if (location.host.indexOf("limited.com") != -1){
	appserver = location.protocol + "//" + location.host;
	wwwserver = location.protocol + "//" + location.host;
	imgserver = location.protocol + "//" + location.host;
	imgserver = location.protocol + "//" + location.host;
	if (location.protocol == "https:")
		imgserver = "https://" + location.host;

	static_appserver = "http://" + location.host;
	static_wwwserver = "http://" + location.host;
	static_imgserver = "http://" + location.host;
}else{
	appserver = location.protocol + "//www2.victoriassecret.com";
	wwwserver = location.protocol + "//www.victoriassecret.com";
	imgserver = location.protocol + "//a548.g.akamai.net/7/548/361/0005/www.victoriassecret.com";
	if (location.protocol == "https:")
		imgserver = "https://a248.e.akamai.net/7/248/361/0005/www.victoriassecret.com";

	static_appserver = "http://www2.victoriassecret.com";
	static_wwwserver = "http://www.victoriassecret.com";	
	static_imgserver = "http://a548.g.akamai.net/7/548/361/0005/www.victoriassecret.com";
}


isLoaded = false;
HM_MenuWidth = 150;
HM_ChildOverlap = 0;
HM_ChildOffset = 0;
HM_ChildPerCentOver = null;
HM_TopSecondsVisible = .5;
HM_FontFamily = "Helvetica,Arial,sans-serif";
HM_FontSize = 7;
HM_FontBold = false;
HM_FontItalic = false;
HM_FontColor = "white";
HM_FontColorOver = "white";
HM_BGColor = "#404F2F";
HM_BGColorOver = "#B53939";
HM_BorderWidth = 1;
HM_BorderColor = "black";
HM_BorderStyle = "solid";
HM_ItemPadding = 1;
HM_SeparatorSize = 1;
HM_SeparatorColor = "black";
HM_ImageSrc = "images/Common/tri.gif";
HM_ImageSize = 7;
HM_ImageHorizSpace = 0;
HM_ImageVertSpace = 3;
HM_KeepHilite = true; 
HM_ClickStart = false;
HM_ClickKill = false;
HM_StatusDisplayBuild =0;
HM_StatusDisplayLink = 0;
HM_UponDisplay = null;
HM_UponHide = null;

mMens=[1,2,3,4,5,6];

brows = (HM_DOM&&!HM_IE) ? "DOM" : NS4 ? "NS4" : isMac ? IE5 ? "IE5M" : IE45 ? "IE45M" : "IE40M" : "IE4";
(navigator.appVersion.indexOf("Win") > 0)?isWin=true:isWin=false;
if (!isWin && !isMac) isX = true;
else isX = false;
if (isMac && navigator.appVersion.indexOf("MSIE 4.0")!=-1)brows="_common_old";//ie4 for mac
src_inc = "navbar"+brows+".js";
stylename=(isWin)?"globalstyles":(isX)?"xglobalstyles":"altglobalstyles";

function getImage(name) {

  if (NS4)
    return findImage(name, document);
  
  if (IE4)
    return eval('document.all.' + name);

  if (HM_DOM)
  	return document.getElementById(name);
  return null;
}

function findImage(name, doc) {

  var i, img;

  for (i = 0; i < doc.images.length; i++)
    if (doc.images[i].name == name)
      return doc.images[i];
  for (i = 0; i < doc.layers.length; i++)
    if ((img = findImage(name, doc.layers[i].document)) != null) {
      img.container = doc.layers[i];
      return img;
    }
  return null;
}

function getImagePageLeft(img) {

  var x, obj;

  if (NS4) {
      return img.x;
  }
  if (IE4) {
    x = 0;
    obj = img;
    while (obj.offsetParent != null) {
      x += obj.offsetLeft;
      obj = obj.offsetParent;
    }
    x += obj.offsetLeft;
    return x;
  }
  if (HM_DOM)
  	return img.offsetLeft;
  return -1;
}

function getImagePageTop(img) {

  var y, obj;

  if (NS4) {
      return img.y;
  }
  if (IE4) {
    y = 0;
    obj = img;
    while (obj.offsetParent != null) {
      y += obj.offsetTop;
      obj = obj.offsetParent;
    }
    y += obj.offsetTop;
    return y;
  }
  if (HM_DOM){
  	return img.offsetTop;
  }
  return -1;
}


var dx = new Array();
var dy = 0;
var calculated = false;
var loaded_images = false;
var img_on = new Array();
var img_off = new Array();
var menuItemActivated = null;
var over_menu = null;

	function calcPos(){
		var ptr = getImage("navbar_map_img");
		dx[0] = getImagePageLeft(ptr) + 5;
		dx[1] = getImagePageLeft(ptr) + 50;
		dx[2] = getImagePageLeft(ptr) + 108;
		dx[3] = getImagePageLeft(ptr) + 168;
		dx[4] = getImagePageLeft(ptr) + 220;
		dx[5] = getImagePageLeft(ptr) + 285;
		dx[6] = getImagePageLeft(ptr) + 510;
		dy = getImagePageTop(ptr);
		if (!HM_DOM)
			dy += 30;
		else
			dy += ptr.height;
		if (isMac && IE45) dy += 48; //hardcode for ie45
		
		calculated = true;
	}

	function runMenu(iname, e){
		if (!calculated)
			calcPos();

		var num = iname.substring(6, iname.length) - 1;
		
		if (arguments.length == 2)
			popUp(iname, e, dx[num], dy);
		else
			popUp(iname, e);
	}	
	
	function stopMenu(mname){
		popDown(mname);
		
	}


function getVSCookie(name){
	var result = "";
	var start = document.cookie.indexOf(name + "=");
	if (start != -1){
		start += (name.length + 1);
		end = document.cookie.indexOf(";", start);
		if (end == -1)
			end = document.cookie.length;
		result = unescape(document.cookie.substring(start, end));
	}
	return result;
}

function isNumeric(num){
	for (i=0; i<num.length; i++)
		if (num.charAt(i) < "0" || num.charAt(i) > "9")
			return false;
	return true;
}

function displayBagCount(){
	var NavbarCookie = getVSCookie("navbar");
	var item_count = 0;

	if (NavbarCookie != ""){
		if (NavbarCookie.lastIndexOf(",") != -1){
			item_count = NavbarCookie.substring(NavbarCookie.lastIndexOf(",") + 1, NavbarCookie.length);
			if (item_count == "")
				item_count = 0;
	
			if (!isNumeric(item_count))
				item_count = 0;
		}
	}

	document.writeln("<div nowrap=true>");
//	if (getVSCookie("PSALE") == "1")
//		document.write("<a href='" + static_appserver + "/Sale/' class=breadcrumbLinkPink title='return to sale'><b>return&nbsp;to&nbsp;sale</b></a>&nbsp;&middot;&nbsp;");
	document.writeln("<a href=\"" + static_wwwserver + "/cgi-bin/ncommerce3/ExecMacro/shopbag.d2w/report\"><img src='" + imgserver + "/images/common/items_in_bag_breadcrumb.gif' alt='shopping bag' border='0'></a>&nbsp;<span class=\"breadcrumb\">" + parseInt(item_count) + "</span>");
	document.writeln("</div>");
}


function getUUID(){
	if (location.protocol == "https:") return;
	if (getVSCookie("UID").length > 0) return;
	var tmp = new Image();
	tmp.src = appserver + '/createUID.cfm';
}

//display bottom nav links
function displayBottomNav(){

	document.write('<table width=750 cellspacing=2 cellpadding=2 border=0 align=left>\n<tr>\n<td width=735 align=center class=navsmall><div align=center><a href="javascript: nextPage (' +"'"+ 'GoTo' +"','"+ 'About' +"'"+ ');" class=navLink1>About Us</a> &nbsp;|&nbsp; <a href="javascript: nextPage (' +"'"+ 'PopUp' +"','"+ 'Privacy' +"'"+ ');" class=navLink1>Privacy &amp; Security</a> &nbsp;|&nbsp; <a href="javascript: nextPage (' +"'"+ 'PopUp' +"','"+ 'WebUse' +"'"+ ');" class=navLink1>Web Site Use</a> <div align=center>&copy;2003 Floral Palace Inc - All rights reserved.</div></div></td>\n</tr>\n</table>\n');
}

//display bottom nav links
function displayWebMasterLink(){
  	strWebMaster = '<table border="2" cellpadding="0" width="650" bordercolor="#28458F"><tr>' +
    		       '<td width="52"><img border="0" src="images/Common/Merintech_button.gif" width="50" height="48"></td>' +
                       '<td width="588"><b><p class="navsmall">For Questions or comments concerning matters with this Web Site' +
		       ' contact the WebMaster by sending mail to <a href="mailto:administrator@merintech.net">administrator@merintech.net</a>.' +
      		       ' &copy; 2003 Merintech Inc.  All rights reserved.</p></b></td></tr></table>';

	document.write(strWebMaster);
}

//display the drop-down menus
function displayItemsMenu(){
	document.write('<map name="navbar_map"><area alt="Home" coords="169, 8, 211, 23" shape="RECT" href="javascript: nextPage (' +"'"+ 'GoTo' +"','"+ 'Home' +"'"+ ');" onMouseOver="javascript:void(0)" onMouseOut="javascript:void(0)"><area alt="Gallery" coords="258, 7, 321, 23" shape="RECT" href="javascript: nextPage (' +"'"+ 'GoTo' +"','"+ 'Gallery' +"'"+ ');" onMouseOver="javascript:void(0)" onMouseOut="javascript:void(0)"><area alt="Testimonials" coords="340, 8, 436, 23" shape="RECT" href="javascript: nextPage (' +"'"+ 'GoTo' +"','"+ 'Test' +"'"+ ');" onMouseOver="javascript:void(0)" onMouseOut="javascript:void(0)"><area alt="About Us" coords="454, 8, 525, 25" shape="RECT" href="javascript: nextPage (' +"'"+ 'GoTo' +"','"+ 'About' +"'"+ ');" onMouseOver="javascript:void(0)" onMouseOut="javascript:void(0)"><area alt="Contact Us" coords="548, 8, 630, 24" shape="RECT" href="javascript: nextPage (' +"'"+ 'GoTo' +"','"+ 'Contact' +"'"+ ');" onMouseOver="javascript:void(0)" onMouseOut="javascript:void(0)"><map>');
	document.write('<table cellspacing=0 cellpadding=0 border=0 width=365><tr><td valign=top>');
	document.write('<img name="navbar_map_img" id=navbar_map_img src="images/Common/Floral_navbar.gif" alt="" border="" usemap="#navbar_map">');
	document.write('</td></tr></table>');
}

function popUpWindow(url, width, height, resizable, scrollbars){
	if (arguments.length == 1){
		width = 335;
		height = 370;
		resizable = "yes";
		scrollbars = "yes";
	}else if (arguments.length == 3){
		resizable = "no";
		scrollbars = "no";
	}else if (arguments.length == 4){
		scrollbars = "no";
	}
	var win = window.open(url, "PopUp", "width=" + width + ",height=" + height + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",menubar=no,toolbar=no");
}



HM_Array1 = [
[125,dx[0],dy,,,,,,,false,0,0,0,1,1],
["&nbsp;<b>Place Holder</b>","javascript:void(0)",1,0,0]
]

HM_Array2 = [
[75,dx[1],dy,,,,,,,false,0,0,0,1,1],
["&nbsp;Domestic","javascript: nextPage('GoTo','DomPly');",1,0,0],
["&nbsp;Exotic","javascript: nextPage('GoTo','ExoticPly');",1,0,0],
["&nbsp;Tropical","javascript: nextPage('GoTo','TropPly');",1,0,0]
]

HM_Array3 = [
[75,dx[2],dy,,,,,,,false,0,0,0,1,0],
["&nbsp;<b>Solid</b>","javascript: nextPage('GoTo','SolidFlr')",1,0,0],
["&nbsp;<b>Engineered</b>","javascript: nextPage('GoTo','SunFloor1')",1,0,0],
["&nbsp;<b>Laminate</b>","javascript: nextPage('GoTo','FinFloor1')",1,0,0]
]

HM_Array4 = [
[75,dx[3],dy,,,,,,,false,0,0,0,1,1],
["&nbsp;<b>Contact Us</b>","javascript: nextPage('GoTo','Contact')",1,0,0]
]

HM_Array5 = [
[125,dx[1],dy,,,,,,,false,0,0,0,1,1],
["&nbsp;<b>Place Holder</b>","javascript:void(0);",1,0,0]
]

HM_Array6 = [
[125,dx[1],dy,,,,,,,false,0,0,0,1,1],
["&nbsp;<b>Place Holder</b>","javascript:void(0);",1,0,0]
]

common_loaded = true;
//---//
