
/***************************************
 Highlight image script- By Dynamic Drive
****************************************/
function makevisible(cur,which) {
    strength=(which==0)? 1 : 0.2

    if (cur.style.MozOpacity)
    cur.style.MozOpacity=strength
    else if (cur.filters)
    cur.filters.alpha.opacity=strength*100
}


/***************************************
 JS Shop.
****************************************/
//Select Item.
function myShop_SelectItem(theForm)
{
    var selected_value = new Array();
    var selected_text  = new Array();

    objShop   = theForm.ShopClass;
    objSelect = theForm.ShopSelect;
    ShopLen   = objShop.length;
    SelectLen = objSelect.length;
    SelectPoint = SelectLen;
    
    for(var i=0; i < ShopLen; i++)
    {
        if(objShop.options[i].selected) 
        {
            var exists = 0;
            for(var j=0; j < SelectLen; j++)
            {
                if(objShop.options[i].value == objSelect.options[j].value) exists = 1;
            }
            if(!exists)
            {
                objSelect[SelectPoint] = new Option(objShop.options[i].text, objShop.options[i].value);
                SelectPoint++;
            }
        }
    }

    myShop_MakeCid(theForm);
    return (true);
}

//Delete Item.
function myShop_DeleteItem(theForm)
{
    objSelect = theForm.ShopSelect;
    SelectLen = objSelect.length;

    for(var i=0; i < objSelect.length; i++)
    {
        if(objSelect.options[i].selected) 
        {
            objSelect[i--] = null;
        }
    }

    myShop_MakeCid(theForm);
    return (true);
}

//Make pid.
function myShop_MakeCid(theForm)  {
    
    var selected_value = new Array();
    objSelect = theForm.ShopSelect;
    objCid    = theForm.cid;
    SelectLen = objSelect.length;
    
    objCid.value = "";
    for(var i=0; i < SelectLen; i++)   {
        objCid.value += objSelect.options[i].value + "||";
    }
    return (true);
}


/***************************************
 JS Shop.
****************************************/
function myOpenShadowWindow() {
	thisShadowWindow=dhtmlmodal.open('ShadowWindow', 'iframe', 'modalfiles/newsletter.htm', 'Newsletter Signup page', 'width=350px,height=200px,center=1,resize=0,scrolling=1')
} //End "opennewsletter" function

