// THIS EXTERNAL JAVASCRIPT FILE CONTAINS global JavaScript functions for swapping images *AND*
// contains the code for the contents of each of the popup menus.  The popup menus were created
// with Macromedia Fireworks 4.
// CAL 1/26/2001

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];}}
}

// For OnTrack Newsletter Sign up
function ontrackaction()
{
  if (document.ontrackform.email.value=="enter email" || document.ontrackform2.email.value=="enter email")
  {
    alert("Please Enter Your Email Address!");
    return false;
  }
}

function MM_jumpMenu(targ,jumpTo,selObj,restore){ //v3.0
  eval(targ+".location='"+jumpTo+selObj.options[selObj.selectedIndex].value+"'");
}

// IMPORTANT:  IF ANY FILENAMES OR DIRECTORY/FOLDER NAMES ARE CHANGED OR MOVED, THIS SECTION MUST BE
// MANUALLY UPDATED. DREAMWEAVER DID NOT WRITE THIS CODE AND SO IT WILL NOT UPDATE IT WHEN FILES ARE
// MOVED OR NAMES CHANGED.  ALSO, THE PATHS START AT THE ROOT TO ALLOW FILES IN ANY DIRECTORY STRUCTURE
// TO USE THIS EXTERNAL JAVASCRIPT FILE FOR THE POPUP MENUS.
// CAL 1/26/2001
function fwLoadMenus() 
{
  if (window.fw_menu_0) return;

  window.fw_menu_0 = new Menu("root",158,18,"verdana, arial, helvetica, sans-serif",10,"#ffffff","#2c3838","#ABA64A","#8a8a69");
  fw_menu_0.addMenuItem("&nbsp;&nbsp;&nbsp;Painting","location='http://www.mesart.com/category.jsp?type=fineart&cat=painting'");
  fw_menu_0.addMenuItem("&nbsp;&nbsp;&nbsp;Graphics","location='http://www.mesart.com/category.jsp?type=fineart&cat=graphics'");
  fw_menu_0.addMenuItem("&nbsp;&nbsp;&nbsp;Printmaking","location='http://www.mesart.com/category.jsp?type=fineart&cat=printmaking'");
  fw_menu_0.addMenuItem("&nbsp;&nbsp;&nbsp;Photography","location='http://www.mesart.com/category.jsp?type=fineart&cat=photography'");
  fw_menu_0.addMenuItem("&nbsp;&nbsp;&nbsp;Sculpture","location='http://www.mesart.com/category.jsp?type=fineart&cat=sculpture'");
  fw_menu_0.addMenuItem("&nbsp;&nbsp;&nbsp;Mixed&nbsp;Media","location='http://www.mesart.com/category.jsp?type=fineart&cat=mixedmedia'");
    fw_menu_0.addMenuItem("&nbsp;&nbsp;&nbsp;New&nbsp;Media","location='http://www.mesart.com/category.jsp?type=fineart&cat=newmedia'");
//fw_menu_0.addMenuItem("&nbsp;&nbsp;&nbsp;Books","location='http://www.mesart.com/category.jsp?type=fineart&cat=books'");

  fw_menu_0.fontWeight="plain";
  fw_menu_0.hideOnMouseOut=true;
	// 
 window.fw_menu_1 = new  Menu("root",158,18,"verdana, arial, helvetica, sans-serif",10,"#ffffff","#2c3838","#CC9900","#8a8a69");
  fw_menu_1.addMenuItem("&nbsp;&nbsp;&nbsp;Ceramics","location='http://www.mesart.com/category.jsp?type=craft&cat=ceramics'");
  fw_menu_1.addMenuItem("&nbsp;&nbsp;&nbsp;Glass","location='http://www.mesart.com/category.jsp?type=craft&cat=glass'");
  fw_menu_1.addMenuItem("&nbsp;&nbsp;&nbsp;Jewelry","location='http://www.mesart.com/category.jsp?type=craft&cat=jewelry'");
  fw_menu_1.addMenuItem("&nbsp;&nbsp;&nbsp;Furniture","location='http://www.mesart.com/category.jsp?type=craft&cat=furniture'");
  fw_menu_1.addMenuItem("&nbsp;&nbsp;&nbsp;Fiber Art","location='http://www.mesart.com/category.jsp?type=craft&cat=textile'");
   fw_menu_1.fontWeight="plain";
   fw_menu_1.hideOnMouseOut=true;
	// 
  window.fw_menu_2 = new Menu("root",158,18,"verdana, arial, helvetica, sans-serif",10,"#ffffff","#2c3838","#CD7D1E","#8a8a69");
  

  	fw_menu_2.addMenuItem("&nbsp;&nbsp;&nbsp;Books Art","location='http://www.mesart.com/category.jsp?type=commercialart&cat=booksart'");
	fw_menu_2.addMenuItem("&nbsp;&nbsp;&nbsp;Calligraphy","location='http://www.mesart.com/category.jsp?type=commercialart&cat=calligraphy'");
	fw_menu_2.addMenuItem("&nbsp;&nbsp;&nbsp;Illustration","location='http://www.mesart.com/category.jsp?type=commercialart&cat=illustration'"); 			
	fw_menu_2.addMenuItem("&nbsp;&nbsp;&nbsp;Print Design","location='http://www.mesart.com/category.jsp?type=commercialart&cat=printdesign'");
	fw_menu_2.addMenuItem("&nbsp;&nbsp;&nbsp;Typography","location='http://www.mesart.com/category.jsp?type=commercialart&cat=typography'");
	fw_menu_2.addMenuItem("&nbsp;&nbsp;&nbsp;Web Design","location='http://www.mesart.com/category.jsp?type=commercialart&cat=webdesign'");
   fw_menu_2.fontWeight="plain";
   fw_menu_2.hideOnMouseOut=true;

 	//
window.fw_menu_3 = new Menu("root",158,18,"verdana, arial, helvetica, sans-serif",10,"#ffffff","#2c3838","#666666","#8a8a69");
    fw_menu_3.addMenuItem("&nbsp;&nbsp;&nbsp;List Your Art","location='http://www.mesart.com/sellart.jsp'");
  fw_menu_3.addMenuItem("&nbsp;&nbsp;&nbsp;Discounts","location='http://www.mesart.com/discountspage.shtml'");
  fw_menu_3.addMenuItem("&nbsp;&nbsp;&nbsp;Other Services","location='http://www.mesart.com/services.jsp'");
  fw_menu_3.addMenuItem("&nbsp;&nbsp;&nbsp;Privacy &amp; Security","location='http://www.mesart.com/privacy.shtml'");
   fw_menu_3.fontWeight="plain";
   fw_menu_3.hideOnMouseOut=true;	
	//
window.fw_menu_4 = new Menu("root",158,18,"verdana, arial, helvetica, sans-serif",10,"#ffffff","#2c3838","#666666","#8a8a69");
  fw_menu_4.addMenuItem("&nbsp;&nbsp;&nbsp;Essays & Poetry","location='http://www.mesart.com/essays.shtml'");
  fw_menu_4.addMenuItem("&nbsp;&nbsp;&nbsp;Galleries","location='http://www.mesart.com/gallerylisting.shtml'");
  fw_menu_4.addMenuItem("&nbsp;&nbsp;&nbsp;Faces Of MesArt","location='http://www.mesart.com/archives.shtml'");
  fw_menu_4.addMenuItem("&nbsp;&nbsp;&nbsp;Exhibits/Shows","location='http://www.mesart.com/displayClassified.jsp?category=shows'");
  fw_menu_4.addMenuItem("&nbsp;&nbsp;&nbsp;Competitions","location='http://www.mesart.com/displayClassified.jsp?category=competitions'");
  fw_menu_4.addMenuItem("&nbsp;&nbsp;&nbsp;Enter Your Free Ad!","location='http://www.mesart.com/classified.jsp'");	

   fw_menu_4.fontWeight="plain";
   fw_menu_4.hideOnMouseOut=true;
   
   window.fw_menu_5 = new Menu("root",158,18,"verdana, arial, helvetica, sans-serif",10,"#ffffff","#2c3838","#666666","#8a8a69");
    fw_menu_5.addMenuItem("&nbsp;&nbsp;&nbsp;F.A.Q.","location='http://www.mesart.com/faq.shtml'");  
  fw_menu_5.addMenuItem("&nbsp;&nbsp;&nbsp;How-to Guides","location='http://www.mesart.com/howto.shtml'");
  fw_menu_5.addMenuItem("&nbsp;&nbsp;&nbsp;Report Problem","location='http://www.mesart.com/preport.jsp'");
  fw_menu_5.addMenuItem("&nbsp;&nbsp;&nbsp;Leave Comments","location='http://www.mesart.com/comments.jsp'");
  fw_menu_5.addMenuItem("&nbsp;&nbsp;&nbsp;Contact Us","location='http://www.mesart.com/contact.jsp'");
  fw_menu_5.fontWeight="plain";
  fw_menu_5.hideOnMouseOut=true;

   window.fw_menu_6 = new Menu("root",158,18,"verdana, arial, helvetica, sans-serif",10,"#ffffff","#2c3838","#666666","#8a8a69");
  fw_menu_6.addMenuItem("&nbsp;&nbsp;&nbsp;About Us","location='http://www.mesart.com/about.shtml'");
  fw_menu_6.addMenuItem("&nbsp;&nbsp;&nbsp;Our History","location='http://www.mesart.com/history.shtml'");
  fw_menu_6.addMenuItem("&nbsp;&nbsp;&nbsp;Contact Us","location='http://www.mesart.com/contact.jsp'");
  fw_menu_6.addMenuItem("&nbsp;&nbsp;&nbsp;Our Partners","location='http://www.mesart.com/partners.shtml'");
   fw_menu_6.fontWeight="plain";
   fw_menu_6.hideOnMouseOut=true;

  // IMPORTANT:  When menus are added above, start with the next consecutive menu number
	// and then change the line BELOW to use the last menu number.
  fw_menu_6.writeMenus();
} // fwLoadMenus()

function MM_findObj(n, d) 
{ //v4.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);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}


function chgBg(obj,color)
{
 if (document.all || document.getElementById)
 {
  if (obj.style) obj.style.backgroundColor=color;
 }
 else if (document.layers) obj.bgColor=color;
}


function SubHoverOn(num,position) 
{
	var img = document.images[num+"_"+position]
	if (img)
		img.src = 'ima/cursor_'+position+'.gif';
}

function SubHoverOff(num,position) 
{
	var img = document.images[num+"_"+position]
	if (img)
		img.src = 'ima/cursor_off.gif';
}

function show(id)
{
	if(document.all)
	{
		document.all[id].style.visibility="visible";
	}
	else if(document.layers)
	{
		document.layers[id].visibility="show";
	}
	else if(document.getElementById)
	{
		document.getElementById(id).style.visibility="visible";
	}
}

function hide(id)
{
	if(document.all)
	{
		document.all[id].style.visibility="hidden";
	}
	else if(document.layers)
	{
		document.layers[id].visibility="hide";
	}
	else if(document.getElementById)
	{
		document.getElementById(id).style.visibility="hidden";
	}
}
function toPackages()
{
	window.location.replace('http://www.mesart.com/packages1.jsp?type=openstudio');
}

function email_no_spam(domain,send_to)
{
	email_string = "mail" + "to" + ":" + send_to + "@" + domain;
	location.href = email_string;
}
