﻿/* selfPopup
 * open popup window with href determined from the href attribute on the anchor:
 * <a href="index.html" onclick="return selfPopup(this,300,400);">Index</a>
 * dominic winsor, get2dom.com
 */
function selfPopup( loc, x, y ) {
   LeftPosition = (screen.width) ? (screen.width-x)/2 : 0;
   TopPosition = (screen.height) ? (screen.height-y)/2 : 0;
   window.open(loc.href,"","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width="+x+",height="+y+',left='  +LeftPosition +  ',top='  +TopPosition +"");
   return false;
}


function showDeliveryRegions()
{
    
    var ref = document.getElementById('basketDeliveryRegions');
    ref.style.display = 'block';
    return false;
}

function selectIndexByValue( ele, value )
{
    ele = document.getElementById(ele);
    for(var i=0; i<ele.options.length; i++)
    {
        ele.options[i].selected = (ele.options[i].value==value);
    }
}