function switchOnOff(obj)
{
	if(obj.className.indexOf("Off")!=-1)
	{
		obj.className=obj.className.replace("Off","On");
	}
	else
	{
		obj.className=obj.className.replace("On","Off");
	}
}

function switchOnOffScroller(obj)
{
	try
	{
		curr = window.document.all.ucVideoGallery_ucScroller_oldLiID.value;
	}
	catch(ex)
	{
		curr = window.document.all.ucImageGallery_ucScroller_oldLiID.value;
	}
	
	if (curr != obj.id)
	{
		if(obj.className.indexOf("Off")!=-1)
		{
			obj.className=obj.className.replace("Off","On");
		}
		else
		{
			obj.className=obj.className.replace("On","Off");
		}
    }
}

function setBackground(obj)
{
	var curr;
	
	try
	{
		curr = window.document.all.ucVideoGallery_ucScroller_oldLiID.value;
	}
	catch(ex)
	{
		curr = window.document.all.ucImageGallery_ucScroller_oldLiID.value;
	}
		
	var oldli = document.getElementById(curr);
	if (curr != obj.id)
	{
		obj.className = obj.className.replace("Off", "On");
		oldli.className = oldli.className.replace("On","Off");
	}
	
	/*oldli.setAttribute("onmouseover", "javascript:switchToOn(this);");
	oldli.setAttribute("onmouseout", "javascript:switchToOn(this);");
	oldli.setAttribute("onclick", "javascript:setBackground(this);");*/
	//oldli.className = oldli.className.replace("On","Off");
	
	/*obj.setAttribute("onmouseover","");
	obj.setAttribute("onmouseout","");
	obj.setAttribute("onclick","");*/
	//obj.className = obj.className.replace("Off", "On");
	
	try
	{
		window.document.all.ucVideoGallery_ucScroller_oldLiID.value = obj.id;
	}
	catch(ex)
	{
		window.document.all.ucImageGallery_ucScroller_oldLiID.value = obj.id;
	}
}

function changeToActive(obj)
{
    var arrLine=obj.parentNode.getElementsByTagName('div');
    for(i=0;i<arrLine.length;i++)
    
    {
        if(arrLine[i].className.indexOf('bookmark')!=-1 )
       {
            
            if(arrLine[i].className.indexOf('On')!=-1)
            {
                arrLine[i].className=arrLine[i].className.replace('On','Off');
            }
            
       }
    }
    
        obj.className=obj.className.replace("Off","On");
   
} 
function switchDisplay(objId)
{

    var obj=document.getElementById(objId);
   
    if(obj.style.display =='none')
    {
        obj.style.display='inline';
    }
    else
    {
        obj.style.display='none';
    }
}
function chooseItem(obj,choise,redirectLink)
{

	var galleryName = obj.innerHTML;
	
	var place = document.getElementById(choise);
	
	place.value = galleryName;
	obj.parentNode.style.display = 'none';
	window.location.href = redirectLink;
}
