
//preload images

var slideImage=new Array()

slideImage[0] = "../2007/images/apparel_image.jpg"
slideImage[1] = "../2007/images/book_image.jpg"
slideImage[2] = "../2007/images/cafe_image.jpg"
slideImage[3] = "../2007/images/jewelry_image.jpg"

var j = 0
var p = slideImage.length;
var preBuffer = new Array()
for (i= 0; i < p; i++)
	{
     preBuffer[i] = new Image()
	 preBuffer[i].src = slideImage[i]
	}
var whichImage = Math.round(Math.random()*(p-1));

function displayCSSampleProducts()
{
document.write('<img src="'+slideImage[whichImage]+'" width="528" height="290" border="0" align="top">');

}


function displayTopNav() 
{
var h1='<a name="top"></a><div align="center"><p><span class="headerType"><a class="topnav1_link" href="../aboutus.html" target="_self"><b>HANDMADE</b></a>&nbsp;|&nbsp;<a class="topnav1_link" href="../fairtrade.html" target="_self"><b>FAIRTRADE</b></a>';
h1=h1+'</span><br /></p></div>';
h1=h1+'<table width="806" border="0" align="center" cellpadding="10" cellspacing="0"><tr><td bgcolor="#F0F2E1">';
h1=h1+'<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="50%"><a class="linkimage" href="../index.html" target="_self"><img src="../2007/images/logo.gif" alt="The Culture Shop" name="logo" width="288" height="71" border="0" id="logo" /></a></td>';
h1=h1+'<td valign="top"><div align="right" class="headerType"><img src="../2007/images/envelope.gif" alt="mailing list" width="16" height="12" /> ';
h1=h1+'<a class="j_maillist" href="../emaillist.html" target="_self">Join our mailing list</a>';
h1=h1+'<form name="searchform" action="/cgi-sys/entropysearch.cgi" target=searchwindow><input type="text" name="query" value="">';
h1=h1+'<input type="hidden" name="user" value="culture2"><input type="hidden" name="basehref" value="http://cultureshop.com">';
h1=h1+'<input type="hidden" name="template" value="default">&nbsp;<button class="submitbutton" onclick=submitSearch()>Search</button></form>';
h1=h1+'</div></td></tr></table>';
document.write(h1);
}

function displayFooter() 
{
var h1=' <table width="806" border="0" cellpadding="0" cellspacing="0" align="center"><tr><td align="center"><a class="topnav1_link" href="../index.html" target="_self">HOME</a>';
h1=h1+'&nbsp;|&nbsp;<a class="topnav1_link" href="../customerservice.html" target="_self">CUSTOMER SERVICE</a>';
h1=h1+'&nbsp;|&nbsp;<a class="topnav1_link" href="mailto:cultureshop@cultureshop.com" title="Contact Us">CONTACT US</a></td>';
h1=h1+'</tr></table>';
document.write(h1);
} 

function submitSearch()
{
 if (window.document.searchform.query.value == "")
 {alert('Search cannot be empty');
 window.document.searchform.query.focus(); 
 return; 
 }
  window.document.searchform.submit();
}

function sendSubscribe()
{
 if (window.document.subscriptionform.emailaddr.value == "")
 {alert('Email address cannot be empty');
 window.document.subscriptionform.emailaddr.focus();return; 
 }
  window.document.subscriptionform.submit();
}

function displayMainNavBar(e) 
{
var h1='<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>';
h1=h1+'<a class="linkimage" href="../shop.html" target="_self"><img src="../2007/images/nav_shop00.gif" alt="shop online" name="shop" width="102" height="26" id="shop" border="0"';
h1=h1+'onmouseover=MM_swapImage("shop","","images/nav_shop01.gif",1) onmouseout=MM_swapImgRestore() />';
h1=h1+'<a class="linkimage" href="../newsevents.html" target="_self"><img src="images/nav_news00.gif" alt="news" name="news" width="122" height="26" id="news" border="0" onmouseover=MM_swapImage("news","","images/nav_news01.gif",1) onmouseout=MM_swapImgRestore() /></a>';
h1=h1+'<a class="linkimage" href="../resources.html" target="_self"><img src="images/nav_resources00.gif" alt="resources" name="resources" width="95" height="26" id="resources" border="0" onmouseover=MM_swapImage("resources","","images/nav_resources01.gif",1) onmouseout=MM_swapImgRestore() /></a>';
h1=h1+'<a class="linkimage" href="../decor.html" target="_self"><img src="images/nav_decor00.gif" alt="decorating" name="decorating" width="165" height="26" id="decorating" border="0" onmouseover=MM_swapImage("decorating","","images/nav_decor01.gif",1) onmouseout=MM_swapImgRestore() /></a>';
h1=h1+'<a class="linkimage" href="../aboutus.html" target="_self"><img src="images/nav_about00.gif" alt="about us" name="about" width="87" height="26" id="about" border="0" onmouseover=MM_swapImage("about","","images/nav_about01.gif",1) onmouseout=MM_swapImgRestore() /></a></td>';
h1=h1+'<td width="25%" valign="middle" class="bodyText"></td></tr></table>';
document.write(h1);

if (e == 'shop')
document.images.shop.src='2007/images/nav_shop01.gif';
else if (e == 'news')
document.images.news.src='2007/images/nav_news01.gif';
else if (e == 'resources')
document.images.resources.src='2007/images/nav_resources01.gif';
else if (e == 'decorating')
document.images.decorating.src='2007/images/nav_decor01.gif';
else if (e == 'about')
document.images.about.src = '2007/images/nav_about01.gif';
else
null;

}
	  
function displayMainNavBarSearch() 
{
var h1='<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>';
h1=h1+'<a class="linkimage" href="../shop.html" target="_self"><img src="../2007/images/nav_shop00.gif" alt="shop online" name="shop" width="102" height="26" id="shop" border="0"';
h1=h1+'onmouseover=MM_swapImage("shop","","../2007/images/nav_shop01.gif",1) onmouseout=MM_swapImgRestore() />';
h1=h1+'<a class="linkimage" href="../newsevents.html" target="_self"><img src="../2007/images/nav_news00.gif" alt="news" name="news" width="122" height="26" id="news" border="0" onmouseover=MM_swapImage("news","","../2007/images/nav_news01.gif",1) onmouseout=MM_swapImgRestore() /></a>';
h1=h1+'<a class="linkimage" href="../resources.html" target="_self"><img src="../2007/images/nav_resources00.gif" alt="resources" name="resources" width="95" height="26" id="resources" border="0" onmouseover=MM_swapImage("resources","","../2007/images/nav_resources01.gif",1) onmouseout=MM_swapImgRestore() /></a>';
h1=h1+'<a class="linkimage" href="../decor.html" target="_self"><img src="../2007/images/nav_decor00.gif" alt="decorating" name="decorating" width="165" height="26" id="decorating" border="0" onmouseover=MM_swapImage("decorating","","../2007/images/nav_decor01.gif",1) onmouseout=MM_swapImgRestore() /></a>';
h1=h1+'<a class="linkimage" href="../aboutus.html" target="_self"><img src="../2007/images/nav_about00.gif" alt="about us" name="about" width="87" height="26" id="about" border="0" onmouseover=MM_swapImage("about","","../2007/images/nav_about01.gif",1) onmouseout=MM_swapImgRestore() /></a></td>';
h1=h1+'<td width="25%" bgcolor="#FFFFFF" class="bodyText"><div align="right">Shopping Cart: 0 items </div></td></tr></table>';
document.write(h1);
}


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_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_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_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];}
}
