/**********************************/
/* Shop page SHOW/HIDE navigation */
/**********************************/

menu_status = new Array();

function showHide(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);

        if(menu_status[theid] != 'show') {
           switch_id.className = 'show';
           menu_status[theid] = 'show';
	   document.getElementById([theid]+'more').src="images/nav_less.jpg";
        }else{
           switch_id.className = 'hide';
           menu_status[theid] = 'hide';
	   document.getElementById([theid]+'more').src="images/nav_more.jpg";
        }
    }
}

/**************************************/
/* CONTINUE SHOPPING button redirects */
/**************************************/

if(window.location == "http://www.photobrad.com/clients/outofthisworld/shop.html#ecwid:category=0&mode=category&offset=0&sort=normal") {
	window.location = "shop.html#ecwid:category=259619&mode=category&offset=0&sort=normal";
};


/*********************************/
/* Change DEFAULT ECWID MESSAGES */
/*********************************/

ecwidMessages = {
	"CategoryPathPanel.category" : "Shop ",
	"CategoryPathPanel.store" : " ",
	"ProductBrowser.sign_in" : "Sign In to Manage Your Account",
	"ProductBrowser.your_account" : "Manage Your Account",
	"Minicart.drag_drop" : "<span class='ecwid-minicart-label-text'>Drag Products Here to<br />Add Them to Your Bag</span>",
	"DnDLabel.drag_me" : "< Drag & Drop Items to Add to Bag",
	"PlaceOrder.review" : "Please review the information above, then click: ",
	"OrderBox.date" : "<br />Date <span>",
	"OrderBox.order_id" : "Order #: <span>",
	"ShippingOptions.weight" : "Sorry, but you are unable to alter the default shipping method for this item.",
	"ShoppingCartView.shipping_is_estimated_for" : "Please note: Oversized items will only be sent via UPS Ground. If you select UPS 2-Day Air, additional items in your cart will be sent via 2-Day Air, while the oversized items will follow via UPS Ground.<br /><br />The shipping location you have selected, along with applicable sales tax, is:<br />",
	"ShoppingCartView.shipping_tax_are_estimated_for_" : "Please note: Oversized items will only be sent via UPS Ground. If you select UPS 2-Day Air, additional items in your cart will be sent via 2-Day Air, while the oversized items will follow via UPS Ground.<br /><br />The shipping location you have selected, along with applicable sales tax, is:<br />",
	"ShoppingCartView.estimated_shipping" : "Shipping",
	"ShoppingCartView.estimated_tax" : "Tax"
};

/*******************************/
/* Targeted FAQ question links */
/*******************************/

window.onload=function() {
	if(window.location.hash.indexOf("#privacy")==0) {
        showHide('answer8');
	}
};

/***********************************/
/* CONTINUE SHOPPING link redirect */
/***********************************/

window.onload=function() {
	if(window.location.hash.indexOf("#ecwid:category=0&mode=category&offset=0&sort=normal")==0) {
        window.location.hash.indexOf('#ecwid:category=234886&mode=category&offset=0&sort=normal');
	}
};

/**********************************/
/* Shop page PRODUCT DETAILS TABS */
/**********************************/

function tabview_aux(TabViewId, id) 
{ 
  var TabView = document.getElementById(TabViewId); 
 
  var Tabs = TabView.firstChild; 
  while (Tabs.className != "Tabs" ) Tabs = Tabs.nextSibling; 
 
  var Tab = Tabs.firstChild; 
  var i   = 0; 
 
  do 
  { 
    if (Tab.tagName == "A") 
    { 
      i++; 
      Tab.href      = "javascript:tabview_switch('"+TabViewId+"', "+i+");"; 
      Tab.className = (i == id) ? "Active" : ""; 
      Tab.blur(); 
    } 
  } 
  while (Tab = Tab.nextSibling); 
 
  var Pages = TabView.firstChild; 
  while (Pages.className != 'Pages') Pages = Pages.nextSibling; 
 
  var Page = Pages.firstChild; 
  var i    = 0; 
 
  do 
  { 
    if (Page.className == 'Page') 
    { 
      i++; 
      if (Pages.offsetHeight) Page.style.height = (Pages.offsetHeight-2)+"px"; 
      Page.style.overflow = "auto"; 
      Page.style.display  = (i == id) ? 'block' : 'none'; 
    } 
  } 
  while (Page = Page.nextSibling); 
} 
 
function tabview_switch(TabViewId, id) { tabview_aux(TabViewId, id); } 
 
function tabview_initialize(TabViewId) { tabview_aux(TabViewId,  1); } 

