﻿function showImageOnSelectedItemChanging(sender, eventArgs) {
    var input = sender.get_inputDomElement()
    var item = eventArgs.get_item();
    setDropDownStyle(input, item);
}

function showSelectedImage(sender) {
    var input = sender.get_inputDomElement();
    var item = sender.get_selectedItem();
    setDropDownStyle(input, item);
}

function setDropDownStyle(input, item) {
    input.style.background = 'url(' + item.get_imageUrl() + ') no-repeat';
    input.style.paddingLeft = '22px';
    input.style.paddingBottom = '0px';
    input.style.paddingTop = '0px';
    input.style.backgroundPosition = '3px 3px';
}

function mouse_event_select(obj, newClass) {
    $(obj).addClass(newClass);
}

function mouse_event_unselect(obj, newClass) {
    $(obj).removeClass(newClass);
}

function CloseNotification(obj) {
    $(obj).parent().fadeOut('slow', function () { $(obj).remove(); });
}

function Redirect(sTargetPageURL) {
    window.location.href = sTargetPageURL;
}

function ClearDefault(obj, defaultText) {
    if ($(obj).val() == defaultText)
        $(obj).val('');
}

function AddDefault(obj, defaultText) {
    if ($(obj).val() == '')
        $(obj).val(defaultText);
}

$(function () {
    $("ul#ticker01").liScroll();
}); 

    

