
//<script type="text/javascript">




function fnSubmit(targ)
{
	document.getElementById(targ).submit();
}

function fnSubmitCountry()
{
	if (document.forms['internationalSitesForm'].internationalSite.value != "null")
    {
		document.location.href = document.forms['internationalSitesForm'].internationalSite.value;
	}
}

function fnDisable(targ)
{	
	document.getElementById(targ).style.position = "absolute";
	document.getElementById(targ).style.top = "-10000px";
	document.getElementById(targ).style.position = "absolute";
}

function fnRemoveDefaultText(targ)
{
	document.getElementById(targ).value = "";
}

function fnMenu()
{
	var oMenu = document.getElementById("menu");
	var oMenuItems= oMenu.getElementsByTagName("A");
	for (i=0; i<oMenuItems.length; i++)
    {
		if (oMenuItems[i].className != "selected")
        {
            oMenuItems[i].onmouseover = function()
                {
                    this.firstChild.src = images[this.id][1];
                }
            oMenuItems[i].onmouseout = function()
                {
                    this.firstChild.src = images[this.id][0];
                }
		} else
        {
			oMenuItems[i].firstChild.src = images[this.id][1];
        }
	}	
}

function fnConfig()
{
	 fnMenu();
}

/* Product viewer functions */
function fnEnlarge(sUrl)
{
    var iWidth = 416;
    var iHeight = 432;
    if ((navigator.appVersion.indexOf("Mac") != -1) && document.all)
    {
        // Mac IE can't handle it so do regular popup
        iHeight += 25;
        var sScreenX = screen.width;
        var sScreenY = screen.height;
        var x = sScreenX - iWidth;
        var y = sScreenY - iHeight;
        var winLeft = x/2;
        var winTop =  y/2;
        window.open(sUrl,"","width=" + iWidth + ",height="+ iHeight + ",scrollbars=yes,left=" + winLeft + ",top=" + winTop);
    } else
    {
        if(document.getElementById("flashH3"))
        {
            document.getElementById("flashH3").style.visibility = "hidden";
        }
        if (document.getElementById("chromelessPopUp"))
        {
            fnCloseChromeless();
        }
        var oPopUp = document.createElement("DIV");
        oPopUp.id = "chromelessPopUp";
        oPopUp.innerHTML = "" +
            "<iframe src=\""+sUrl+"\" " +
            "frameborder=\"0\" " +
            "width=\""+iWidth+"px\" " +
            "height=\""+iHeight+"px\" " + 
            "marginheight=\"0\"  marginwidth=\"0\"  scrolling=\"no\" "+
            "id=\"popUpFrame\"></iframe>" +
            "<br /><a href=\"javascript:fnCloseChromeless()\" " + 
	    "id=\"closePopup\">" + "<img src=\"" + rooturl + "/FlexyShop/templates/images/close_popup.gif\" alt=\"close\" style=\"cursor:pointer\" /></a>";
        // Style Popup
        oPopUp.style.width = iWidth+"px";
        oPopUp.style.marginLeft = "-"+(iWidth/2)+"px";
        oPopUp.style.marginTop = "-"+(iHeight/2)+"px";
        oPopUp.style.position = "absolute";
        oPopUp.style.left = "50%";
        oPopUp.style.top = "50%";
        // Place inside HTML
        document.body.appendChild(oPopUp);
    }
}

function fnCloseChromeless()
{
	if (document.getElementById("flashH3"))
    {
		document.getElementById("flashH3").style.visibility = "visible";
	}
	var oPopUp = document.getElementById("chromelessPopUp");
	document.body.removeChild(oPopUp);
}

function fnPViewTarget(name,img)
{
	var targ = document.getElementById("magnifyLink");
	targ.href = "javascript:fnEnlarge('enlargeImage.aspx?name="+name+"&i="+img+"')";
}

function fnColourSelect(targ)
{ 
	var oToolsItems = document.getElementById("toolbar").getElementsByTagName("A");		
	for (i=0; i<oToolsItems.length; i++)
    {
		oToolsItems[i].className = "deselected";
	}
	document.getElementById(targ).className = "selected"
	document.getElementById("colourName").innerHTML = document.getElementById(targ).firstChild.alt;
}

/* View extra info */
/*function fnInfo(state) {
	if(document.getElementById("info")) {
		document.getElementById("info").style.display = state;
		document.getElementById("blockLink").style.display = "block";
		document.getElementById("noneLink").style.display = "block";
		document.getElementById(state+"Link").style.display = "none";	
	}		
}*/

function fnShow(targ)
{
	document.getElementById(targ).style.display = "block";
}

function fnHide(targ)
{
	document.getElementById(targ).style.display = "none";
}

/* Checkout functions  -- not used!?*/
function fnRadio(id,display)
{
	document.getElementById(id).style.display = display;
}

function fnChecked(id)
{
	document.getElementById(id).checked = "checked";
}

/**/ 








