
function select_text(name)
{var element=document.getElementById(name);element.focus();element.select();}
function showFullDescription()
{var value=$("#short_description").css('display');if(value=='none'){$('#full_description').hide();$('#short_description').show();}else{$('#short_description').hide();$('#full_description').show();}}
function prepareFisheye()
{$(document).ready(function()
{$('#fisheye').Fisheye({maxWidth:70,items:'a',itemsText:'span',container:'.fisheyeContainter',itemWidth:60,proximity:90,halign:'center'})});if(jQuery.browser.mozilla||jQuery.browser.opera)
var additionalOffset=-8;else
var additionalOffset=0;additionalOffset=-20;var parentTop=$("#mainContainer").offset().top;var parentLeft=$("#mainContainer").offset().left;$("#playlist_forw_but").get(0).style.left=parentLeft+additionalOffset+'px';$("#playlist_back_but").get(0).style.left=parentLeft+additionalOffset+$("#mainContainer").width()+70+'px';$("#playlist_forw_but").get(0).style.top=parentTop+10+'px';$("#playlist_back_but").get(0).style.top=parentTop+10+'px';}
var totalLength=0;var lengthLeftToScroll=0;var totalScroll=0;var firstLeft=0;var initialLeft=0;var speed=10;var timeOffset=1;var activeForward=false;var activeBack=false;function setUpSlider(container,activeElementNumber){var element_size=60;var mainContainerWidth=$("#mainContainer").width();var elementsFitInContainer=parseInt(mainContainerWidth/element_size);if($("."+container+" a").size()<=elementsFitInContainer-1)
{$("#playlist_forw_but").hide();$("#playlist_back_but").hide();}
else
{totalLength=$("."+container+" a").size()*element_size;initialLeft=parseInt((totalLength-mainContainerWidth)/2);if(activeElementNumber<=elementsFitInContainer)
{firstLeft=parseInt((totalLength-mainContainerWidth)/2);if(navigator.appVersion.match(/MSIE 6\.0/))firstLeft-=250;}
else
{firstLeft=parseInt((totalLength-mainContainerWidth)/2)-parseInt((activeElementNumber-elementsFitInContainer/2)*element_size);}
lengthLeftToScroll=totalLength-mainContainerWidth-initialLeft+30;$("#f2").css("left",firstLeft+'px');}
prepareFisheye();}
function sliderGoBack(is_first){if(is_first)activeBack=true;firstLeft+=speed;if(activeBack&&firstLeft<=initialLeft+50)
{$("#f2").css("left",firstLeft+'px');setTimeout("sliderGoBack(false)",timeOffset);}}
function sliderGoForward(is_first){if(is_first)activeForward=true;firstLeft-=speed;if(activeForward&&firstLeft>=(-lengthLeftToScroll-50))
{$("#f2").css("left",firstLeft+'px');setTimeout("sliderGoForward(false)",timeOffset);}}
function resetMovement(direction){if(direction==1)activeForward=false;else activeBack=false;}
function reportBrokenFlash(v_token){if(document.getElementById("add2list_ok_sel"))
{document.getElementById("add2list_ok_sel").innerHTML="";}
if(v_token!='')
{$("#report_broken_indicator").show();$.ajax({type:"POST",url:global_path+"reportbrokenflash.plain",data:{"v_t":v_token},dataType:"plain",success:function(data,textStatus){if(data.match(/Success/))
{$("#report_broken_link").hide();$("#flash_reported_span").show();}
if(data.match(/Error/))
{$("#flash_reported_span").html("Errors occured while reporting. Please try again later.")
$("#flash_reported_span").show();}
if(data.match(/Db_exception/))
{$("#flash_reported_span").html("Database errors occured while reporting. Please contact administrator immediately.")
$("#flash_reported_span").show();}
$("#report_broken_indicator").hide();}});}}
function performQuickSearch(page,cq){var phrase=(cq=='')?$("#quickSearchField").get(0).value:cq;if(phrase.length>0)
{$("#quick_search_indicator").show();$.ajax({type:"POST",url:global_path+"performQuickAction.json",data:{"phrase":phrase,"page":page},dataType:"plain",success:function(data,textStatus){if(data.match(/id="hiddenQuickSearchIsPager" value="1"/)){$("#quickSearch_results").css({'min-height':'440px'})}
$("#quick_search_indicator").hide();$("#quickSearch_results").html(data);}});}}
function showQuickSearchPage(pageNumber){alert(pageNumber);$("quick_results_"+pageNumber).show();}
function tt(element,action){if(action==1)
$(element).css({'opacity':0.6,'-moz-opacity':0.6,'filter':'alpha(opacity=60)'})
else
$(element).css({'opacity':1.0,'-moz-opacity':1.0,'filter':'alpha(opacity=100)'})}
function playFullscreen(token){window.location.href=global_path+'fullscreen,'+token+'.html';}