/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu = new Array();
menu[0] = new Array();
menu[0][0] = '<a href="index.php?main_page=page&amp;id=13&amp;chapter=0" class="menufirst">Policies</a>';
menu[0][1] = '<a href="index.php?main_page=page&id=13&chapter=0#privacy" class="menusub">Privacy Policy</a>';
menu[0][2] = '<a href="index.php?main_page=page&id=13&chapter=0#returnpolicy" class="menusub">Returns Policy</a>';
menu[0][3] = '<a href="index.php?main_page=page&id=13&chapter=0#ordering" class="menusub">Ordering & Shipping</a>';
menu[0][4] = '<a href="index.php?main_page=page&amp;id=12&amp;chapter=0">Why buy our maps for decor?</a>';
menu[0][5] = '<a href="index.php?main_page=page&amp;id=6&amp;chapter=0">Mounting Options</a>';
menu[0][6] = '<a href="index.php?main_page=page&amp;id=6&amp;chapter=0#giclee" class="menusub">What is a Giclee print</a>';
menu[0][7] = '<a href="index.php?main_page=page&amp;id=6&amp;chapter=0#plaque" class="menusub">What is a Plaque Mount</a>';
menu[0][8] = '<a href="index.php?main_page=page&amp;id=6&amp;chapter=0#tile" class="menusub">Print on Tile</a>';
menu[0][9] = '<a href="index.php?main_page=page&amp;id=15&amp;chapter=0">What are Map Styles</a>';
menu[0][10] = '<a href="index.php?main_page=page&amp;id=11&amp;chapter=0">What are Map Projections</a>';
menu[0][11] = '<a href="index.php?main_page=page&id=5&chapter=0">More FAQs</a>';
menu[0][12] = '<a href="index.php?main_page=page&id=16&chapter=0" class="menulast">Glossary</a>';
menu[0][13] = '<div class="menudesc">For more information please select an item</div>';

menu[1] = new Array(); // projections
menu[1][0] = '<div class="popup_help"><p>If you are primarily interested in buying a map for decor purposes then the main thing to know is that a map projection determines the shape of the map, just as map style determines the color scheme of a map. For example item # 4101-1_01 is a map of the whole world in the Spectrum World style in a Plate Carre projection (also known as a Geographic projection). Item # 4102_02 is also a map of the whole world in the Spectrum World style but it is in a Hotine Oblique Mercator projection. When searching our online map catalog you can choose to reduce your search results to include only maps in a particular map projection.</p></div>';
menu[1][1] = '<div class="popup_more"><a href="index.php?main_page=page&amp;id=11&amp;chapter=0">more...</a>';

menu[2] = new Array(); // mapstyle
menu[2][0] = '<div class="popup_help"><p>When you choose a map style you are determining the color scheme of the map. If you are choosing a map for decor purposes it is worth considering which style best suits the space or just suits your own taste. We currently offer five primary map styles. Each has a unique palette of colors. All whole-world and continent maps are available in every style. Some specialty maps have other colors and with the option to customize you can have a map in almost any color you wish.</p></div>';
menu[2][1] = '<div class="popup_more"><a href="index.php?main_page=page&amp;id=5&amp;chapter=0">more...</a>';

//popup image Mouting Options

menu[5] = new Array();
menu[5][0] = '<img src="images/giclee.jpg" alt="Giclee Print diagram" title="Fine Art Mounting diagram"/>';
menu[6] = new Array();
menu[6][0] = '<img src="images/mounting_laminated.jpg" width="337px" height="179px" alt="Plaque Mount diagram" title="Plaque Mount diagram" />';
menu[7] = new Array();
menu[7][0] = '<img src="images/plaqueperspectiveview.png" alt="Plaque Mount diagram" width="600" height="307" title="Plaque Mount diagram"/>';
menu[8] = new Array();
menu[8][0] = '<img src="images/plaquefrontsiteview.png" alt="Plaque Mount diagram" width="386" height="600" title="Plaque Mount diagram"/>';
menu[9] = new Array();
menu[9][0] = '<img src="images/plaquebacksideview.png" alt="Plaque Mount diagram" width="366" height="600" title="Plaque Mount diagram"/>';
menu[10] = new Array();
menu[10][0] = '<img src="images/mounting_tile.jpg" alt="Ceramic Tile" title="Ceramic Tile"/>';

// 6/5/08 Sushi - Removed along with other options
/*
menu[3] = new Array(); // giclee
menu[3][0] = '<div class="popup_help"><p>Giclee (zhee-CLAY) is the use of an ink-jet printing process for making fine art, large format digital images. We print on 10 mil. (0.25mm) premium glossy photo paper producing vivid life-like images using Epson UltraChrome K3 ink, providing lightfastness ratings of up to 108 years for color under rigorous industry accepted display conditions. Giclees are superior to traditional lithography in several ways: the colors are brighter, last longer and are higher resolution.</p></div>';
menu[3][1] = '<div class="popup_more"><a href="index.php?main_page=page&amp;id=6&amp;chapter=0#giclee">more...</a>';

menu[4] = new Array(); // laminated
menu[4][0] = '<div class="popup_help"><p>Starting with a giclee print, a 5.0 mil (0.125mm), soft, non glare, UV matte laminate is applied. This is a premium laminate, applied by heat and pressure in a heat-press. This protects the print from moisture, UV degradation and damage from handling and is ideal for archival use. It can be cleaned with any glass cleaner and a soft cloth.</p></div>';
menu[4][1] = '<div class="popup_more"><a href="/index.php?main_page=page&amp;id=6&amp;chapter=0#laminated">more...</a>';

menu[5] = new Array(); // flush
menu[5][0] = '<div class="popup_help"><p>3/8&quot; MDF board.</p></div>';
menu[5][1] = '<div class="popup_more"><a href="/index.php?main_page=page&amp;id=6&amp;chapter=0#plaque">more...</a>';

menu[6] = new Array(); // float
menu[6][0] = '<div class="popup_help"><p>1/4&quot; MDF with two or more strips of 1&quot; pine or MDF glued to the back of the 1/4&quot; MDF creating the illusion that the image is floating away from the wall.</p></div>';
menu[6][1] = '<div class="popup_more"><a href="/index.php?main_page=page&amp;id=6&amp;chapter=0#plaque">more...</a>';

menu[7] = new Array(); // box
menu[7][0] = '<div class="popup_help"><p>1/8&quot; MDF board on a 1&quot; frame which is flush with the edge of the MDF board, creating a three-dimensional effect.</p></div>';
menu[7][1] = '<div class="popup_more"><a href="/index.php?main_page=page&amp;id=6&amp;chapter=0#plaque">more...</a>';
*/

//menu[3] = new Array(); // giclee
//menu[3][0] = '<div class="popup_help"><p>Giclee (zhee-CLAY) is the use of an ink-jet printing process for making fine art, large format digital images. We print on 10 mil. (0.25mm) premium glossy photo paper producing vivid life-like images using Epson UltraChrome K3 ink, providing lightfastness ratings of up to 108 years for color under rigorous industry accepted display conditions. Giclees are superior to traditional lithography in several ways: the colors are brighter, last longer and are higher resolution.</p></div>';
//menu[3][1] = '<div class="popup_more"><a href="index.php?main_page=page&amp;id=6&amp;chapter=0#giclee">more...</a>';

menu[3] = new Array(); // giclee Luster
menu[3][0] = '<div class="popup_help"><p>Luster Giclee: Giclee (zhee-CLAY) is the use of an ink-jet printing process for making fine art, large format digital images.</p></div>';
menu[3][1] = '<div class="popup_more"><a href="index.php?main_page=page&amp;id=6&amp;chapter=0#giclee">more...</a>';
menu[4] = new Array(); // box
//menu[4][0] = '<div class="popup_help"><p>1/8&quot; MDF board on a 1&quot; frame which is flush with the edge of the MDF board, creating a three-dimensional effect.</p></div>';
menu[4][0] = '<div class="popup_help"><p>A Museum Quality Mounting where a laminated Giclee print is dry mounted on to a 1/8" MDF board, and a 1" deep frame attached at the rear, to provide depth and help eliminate warping.</p></div>';
menu[4][1] = '<div class="popup_more"><a href="index.php?main_page=page&amp;id=6&amp;chapter=0#plaque">more...</a>';
menu[6] = new Array(); // Ceramic tile Mural
menu[6][0] = '<div class="popup_help"><p>Fired/Glazed tiles are scratch proof, heat resistant and suitable for installation anywhere. Indoor/Decorative tiles have the most vivid colors but can only be installed in non abrasive and indirect sunlight applications.</p></div>';
menu[6][1] = '<div class="popup_more"><a href="index.php?main_page=page&amp;id=6&amp;chapter=0#plaque">more...</a>';


var menuwidth_default = '450px';	// default menu width
var disappeardelay=300  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

// IE6 hacks // 12/10/07 Sushi - next vars and all iFrameObj lines are for are for IE6 iframe hack
var iFrameObj;
var iframe_top=-1500	// top reset for iframe in px, without "px"

// 12/11/07 Sushi - moved the next 2 functions to the HTML body
/*
if (ie4||ns6) document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth_default+';" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
if (ie4) document.write('<iframe id="ie6hack_iframe" src="javascript:false;"></iframe>');
*/

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
// 12/11/07 Sushi - make menuwidth the default if not defined in function call
if (typeof(menuwidth) == 'undefined') menuwidth = menuwidth_default;

if (ie4||ns6) {
	dropmenuobj.style.left=dropmenuobj.style.top="-500px";
	if (ie4) iFrameObj.style.left = "-500px";
}
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover") {
	obj.visibility=visible;
	if (ie4) iFrameObj.style.visibility = 'visible';
} else if (e.type=="click") {
	obj.visibility=hidden;
	if (ie4) iFrameObj.style.visibility = 'hidden';
}
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}

function dropdownmenuattop(obj, e, menucontents, menuwidth, x, y){
// 12/11/07 Sushi - make menuwidth the default if not defined in function call
if (typeof(menuwidth) == 'undefined') menuwidth = menuwidth_default;

if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){

showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)

dropmenuobj.x=x
dropmenuobj.y=y
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"

// 12/10/07 Sushi - IE6 iframe hack for select menu problem
if (ie4) {
	
	iFrameObj = document.getElementById('ie6hack_iframe');

	//Match iFrame position with dropmenuobj
	iFrameObj.style.left = dropmenuobj.offsetLeft + 'px';
	iFrameObj.style.top = dropmenuobj.offsetTop + 'px';
	iFrameObj.style.width = dropmenuobj.offsetWidth + 'px';
	iFrameObj.style.height = dropmenuobj.offsetHeight + 'px';
	}

}

return clickreturnvalue()
}

function dropdownmenu(obj, e, menucontents, menuwidth){
// 12/11/07 Sushi - make menuwidth the default if not defined in function call
if (typeof(menuwidth) == 'undefined') menuwidth = menuwidth_default;

if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){

showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)

dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"

// 12/10/07 Sushi - IE6 iframe hack for select menu problem
if (ie4) {
	
	iFrameObj = document.getElementById('ie6hack_iframe');

	//Match iFrame position with dropmenuobj
	iFrameObj.style.left = dropmenuobj.offsetLeft + 'px';
	iFrameObj.style.top = dropmenuobj.offsetTop + 'px';
	iFrameObj.style.width = dropmenuobj.offsetWidth + 'px';
	iFrameObj.style.height = dropmenuobj.offsetHeight + 'px';
	}

}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6) {
	dropmenuobj.style.visibility="hidden"
	if (ie4) iFrameObj.style.visibility="hidden";
}
}
}

function delayhidemenu(){
if (ie4||ns6) delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined") clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes") document.onclick=hidemenu

// 12/12/07 Sushi - added function to apply CSS. Didn't use it after all, but kept just in case.
// http://onlinetools.org/articles/unobtrusivejavascript/cssjsseparation.html

function jscss(a,o,c1,c2) {
	switch (a){
		case 'swap': o.className=!jscss('check',o,c1)?o.className.replace(c2,c1): o.className.replace(c1,c2); break;
		case 'add': if(!jscss('check',o,c1)){o.className+=o.className?' '+c1:c1;} break;
		case 'remove': var rep=o.className.match(' '+c1)?' '+c1:c1; o.className=o.className.replace(rep,''); break;
		case 'check': return new RegExp('\\b'+c1+'\\b').test(o.className); break;
	}
}

/*
	--------------------------------------------------------------------------
	$Id: spamspan.js 5 2007-09-29 15:56:26Z moltar $
	--------------------------------------------------------------------------
	Version: 1.03
	Release date: 13/05/2006
	Last update: 07/01/2007

	(c) 2006 SpamSpan (www.spamspan.com)

	This program is distributed under the terms of the GNU General Public
	Licence version 2, available at http://www.gnu.org/licenses/gpl.txt
	--------------------------------------------------------------------------
*/

var spamSpanMainClass		= 'spamspan';
var spamSpanUserClass		= 'u';
var spamSpanDomainClass		= 'd';
var spamSpanAnchorTextClass = 't';
var spamSpanParams			= new Array('subject', 'body');

/*
	--------------------------------------------------------------------------
	Do not edit past this point unless you know what you are doing.
	--------------------------------------------------------------------------
*/

// load SpamSpan
addEvent(window, 'load', spamSpan);

function spamSpan() {
	var allSpamSpans = getElementsByClass(spamSpanMainClass, document, 'span');
	for (var i = 0; i < allSpamSpans.length; i++) {
		// get data
		var user = getSpanValue(spamSpanUserClass, allSpamSpans[i]);
		var domain = getSpanValue(spamSpanDomainClass, allSpamSpans[i]);
		var anchorText = getSpanValue(spamSpanAnchorTextClass, allSpamSpans[i]);
		// prepare parameter data
		var paramValues = new Array();
		for (var j = 0; j < spamSpanParams.length; j++) {
			var paramSpanValue = getSpanValue(spamSpanParams[j], allSpamSpans[i]);
			if (paramSpanValue) {
				paramValues.push(spamSpanParams[j] + '=' +
					encodeURIComponent(paramSpanValue));
			}
		}
		// create new anchor tag
		var at = String.fromCharCode(32*2);
		var email = cleanSpan(user) + at + cleanSpan(domain);
		var anchorTagText = document.createTextNode(anchorText ? anchorText : email);
		var mto = String.fromCharCode(109,97,105,108,116,111,58);
		var hrefAttr = mto + email;
			hrefAttr += paramValues.length ? '?' + paramValues.join('&') : '';
		var anchorTag = document.createElement('a');
			anchorTag.className = spamSpanMainClass;
			anchorTag.setAttribute('href', hrefAttr);
			anchorTag.appendChild(anchorTagText);
		// replace the span with anchor
		allSpamSpans[i].parentNode.replaceChild(anchorTag, allSpamSpans[i]);
	}
}

function getElementsByClass(searchClass, scope, tag) {
	var classElements = new Array();
	if (scope == null) node = document;
	if (tag == null) tag = '*';
	var els = scope.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\s)"+searchClass+"(\s|$)");
	for (var i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}

function getSpanValue(searchClass, scope) {
	var span = getElementsByClass(searchClass, scope, 'span');
	if (span[0]) {
		return span[0].firstChild.nodeValue;
	} else {
		return false;
	}
}

function cleanSpan(string) {
	// string = string.replace(//g, '');
	// replace variations of [dot] with .
	string = string.replace(/[\[\(\{]?[dD][oO0][tT][\}\)\]]?/g, '.');
	// replace spaces with nothing
	string = string.replace(/\s+/g, '');
	return string;
}

// http://www.quirksmode.org/blog/archives/2005/10/_and_the_winner_1.html
function addEvent(obj, type, fn) {
	if (obj.addEventListener)
		obj.addEventListener(type, fn, false);
	else if (obj.attachEvent)
	{
		obj['e' + type + fn] = fn;
		obj[type + fn] = function() { obj['e' + type + fn](window.event); }
		obj.attachEvent('on' + type, obj[type + fn]);
	}
}

//-------------------------------------------------------------------
//	general Macromedia scripts
//-------------------------------------------------------------------

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_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_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_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}

