// JavaScript used on all pages

// Bookmark
    function bookmark(anchor)
	{
        if(window.external)
		{
			window.external.AddFavorite(anchor.getAttribute('href'), anchor.getAttribute('title'));
			return false;
		}
		return true;
    }

// Email a friend
	function EmailAFriend(ProdID, URL)
	{
        window.open(URL + '/emailafriend/pid/' + ProdID ,'EmailAFriend','width=400,height=420,top=10,left=410');
	}

// Print window
    function PrintWindow()
    {
        window.print();
    }

// Clear field

//    function clearField(idx)
//	{
//        idx=idx;
//        var h = document.search.elements[idx];
//        h.value = """";
//    }

// Clear stuff - Used to clear 'Search' box
    function clearStuff(objecttoclear)
    {
        objecttoclear.value = '';
        objecttoclear.onclick = null;
    }

// Open new window
    function MM_openBrWindow(theURL, winName, features)
	{
        window.open(theURL,winName,features);
    }

// Remove Website from Frameset
    if (parent.frames.length > 0)
	{
        parent.location.href = location.href
    }

// Timer
	function spu(){timer=setTimeout("dpu()",3*1000);}

// Trigger MFS add to button
	function addPageToMFS() {
		var d=window.document;

		if(d.getElementsByTagName('frame').length > 0)
		{
		   alert("Sorry! This page isn't one that can be added just yet.");
		   return;
		}

		var s=d.createElement('script');
		s.type='text/javascript';

		s.src='http://www.myfaveshop.com/site/static/js/browserbutton/MyFaveShop_embed.js';
		s.id='myfaveshop';
		d.getElementsByTagName('head')[0].appendChild(s);
		return;
	}
	
