<!-- hide this script from non-javascript-enabled browsers
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

/* Functions that swaps images. */
function MM_swapImage() { //v3.0
   var i,j=0,x,a=MM_swapImage.arguments;
   document.MM_sr=new Array;
   for(i=0;i<(a.length-2);i+=3) {
   	 if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
   }
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr;
  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) {
    x.src=x.oSrc;
  }
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}


function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

var sidenavLetter = 'A'; //Used for the giftsets and skin care sidenavs where all letters are displayed

function scrollSidenavTo(letter){
	if( typeof letter == 'string' ){
		letter = letter.toUpperCase();
		if( $(letter) ){
			$('navigation').scrollTop = $(letter.toUpperCase()).offsetTop;
		}
	}
}

function updateSideNav(qstring,func){
	var xmlhttp = getXMLHttpRequestObject();

	if( xmlhttp ){
		if( qstring.indexOf('cur_letter') != -1 ){
			sidenavLetter = qstring.substr(qstring.indexOf('cur_letter') + 11,1);
		}

		$('navigation').innerHTML = '<div style="margin: 40% 0 0 10%; text-align: center"><span class="sn">Loading..</span></div><br/><div style="text-align: center"><img src="/images/letters/loading.gif" alt="Loading.."/></div>';
		xmlhttp.open("GET", "/sidenav.php?" + qstring,true);
		xmlhttp.onreadystatechange=function() {
			if (xmlhttp.readyState==4) {
				$('navigation').innerHTML = xmlhttp.responseText;
				if(typeof func == 'function'){ func(); }
			}
		};
		xmlhttp.send(null);
	}
}

function changeImage(ele,src){
	ele.src = src;
}

function setStyle(ele,style){
	ele.setAttribute('style',ele.getAttribute('style') + style);
	ele.style.cssText += style;
}


function addBookmark() {
    if (isMac()) {
	alert("Hold CMD and hit D on your keyboard to bookmark this site.");
	}
    else if (document.all) {
        window.external.AddFavorite("http://www.fragrancenet.com","FragranceNet.comŽ - 1-800-PARFUMS - Online Since 1997 - Perfume, Cologne, Skincare, Candles at Deep Discounts");
    } else {
        alert("Hold CTRL and hit D on your keyboard to bookmark this site.");
    }
}

function isNav4() {
	var app = navigator.appName;
	var ver = navigator.appVersion;
	if ((app == "Netscape") && (parseInt(ver) < 5)) {
		return true;
	}else{
		return false;
	}
}
function isMac() {
	if (navigator.appVersion.indexOf("Mac")!=-1) {
	return true; 
	} else {
	return false;
	}
}

// This fucntion will uncheck all checkboxes listed on a page when called
function uncheckall() {
	// document.myform.mv_order_item
	if (document.getElementById("myform") !== null) {
		for (i = 0; i < document.myform.mv_order_item.length; i++)
			document.myform.mv_order_item[i].checked = false;
	}
}

//if (isNav4()) {
//	document.writeln('<link rel="STYLESHEET" type="text/css" href="/style/style_nn4.css">');
//} else {
//	document.writeln('<link rel="STYLESHEET" type="text/css" href="/style/style.css">');
//}

MM_reloadPage(true);

//Shorthand function
function $(ele){ return document.getElementById(ele); }


function getXMLHttpRequestObject(){
	var xmlhttp=false;
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	// JScript gives us Conditional compilation, we can cope with old IE versions.
	// and security blocked creation of the objects.
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	}catch (e) {
		try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		}catch (E) {
			xmlhttp = false;
		}
	}
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		try {
			xmlhttp = new XMLHttpRequest();
		} catch (e) {
			xmlhttp=false;
		}
	}
	if (!xmlhttp && window.createRequest) {
		try {
			xmlhttp = window.createRequest();
		} catch (e) {
			xmlhttp=false;
		}
	}
	
	return xmlhttp;
}

// stop hiding -->

