
var cachedBlocks=new Array();var bannerViews=new Array();Event.observe(window,'load',function(){new Ajax.Request(rootUrl+'async/banners_view/view.php?banners='+bannerViews,{metdod:'get',onSuccess:function(transport){}});});function createAdTypeFilter(rootUrl,type_id){if(!rootUrl&&!type_id){return false;}
var create_filter_block=$('create_filter_block');var filter_name=$('filter_name');var create_filter_block_button=$('create_filter_block_button');if(create_filter_block&&filter_name&&filter_name.value&&filter_name.value!=''&&filter_name.value.length!=0){if(create_filter_block_button){create_filter_block_button.disabled=true;}
new Ajax.Request(rootUrl+'async/create_filter/save.php?type_id='+parseInt(type_id)+'&filter_name='+filter_name.value,{method:'get',onSuccess:function(transport){create_filter_block.innerHTML=transport.responseText;}});}
return false;}
function getSelectValue(id){var opt=$(id);var val=opt.options[opt.selectedIndex].value;return val;}
function getSearchNewspaper(rootUrl,newspaper_loader_src,path){var location=$('newspaper_data');var loaderSrc='<div class="whf tac"><img src="'+newspaper_loader_src+'" style="margin: 0px auto;" /></div>';location.innerHTML=loaderSrc;var url=rootUrl+'async/newspapers/get.php?'+path;unFocus.History.addHistory(path);new Ajax.Request(url,{method:'get',onSuccess:function(transport){location.innerHTML=transport.responseText;}});}
function AppHistory(){this.historyListener=function(historyHash){if(!historyHash){return false;}
var newspaper_loader_src='media/images/dec/loader_big.gif';var location=$('newspaper_data');var loaderSrc='<div class="whf tac"><img src="'+rootUrl+newspaper_loader_src+'" style="margin: 0px auto;" /></div>';location.innerHTML=loaderSrc;var path=historyHash;var url=rootUrl+'async/newspapers/get.php?'+path;new Ajax.Request(url,{method:'get',onSuccess:function(transport){location.innerHTML=transport.responseText;}});}
unFocus.History.addEventListener('historyChange',this.historyListener);}
var oHistory=new AppHistory();function getSearchAds(res_place,rootUrl,loaderSrc,itemId,params){new Ajax.Request(rootUrl+'async/title_search_ads/get.php?item_id='+itemId+'&limit='+params['limit']+'&type='+params+'&parent_type='+params['type'],{onSuccess:function(transport){$(res_place).innerHTML=transport.responseText;}});}
function getCatDetails(rootUrl,loaderSrc,itemId,itemName,adsCount){var catBlock=$('cat_block_'+itemId);if(typeof(cachedBlocks[itemId])=='undefined'){cachedBlocks[itemId]=new Array();}
if(typeof(cachedBlocks[itemId]['details'])=='undefined'){if(typeof(cachedBlocks[itemId]['basic'])=='undefined'){cachedBlocks[itemId]['basic']=catBlock.innerHTML;}
var previewBlock=$('subcategories_'+itemId);previewBlock.innerHTML=loaderSrc;new Ajax.Request(rootUrl+'async/title_categories/get.php?item_id='+parseInt(itemId)+'&item_name='+encodeURIComponent(itemName)+'&ads_count='+parseInt(adsCount),{method:'get',onSuccess:function(transport){cachedBlocks[itemId]['details']=transport.responseText;catBlock.innerHTML=transport.responseText;}});}else{catBlock.innerHTML=cachedBlocks[itemId]['details'];}
return false;}
function getPathDetails(loaderSrc,itemId,ad_item){var pathBlock=$('path_block_'+itemId);var pathFrame=$('path_elifr_'+itemId);var pathTable=$('path_el_'+itemId);if(typeof(cachedBlocks[itemId])=='undefined'){cachedBlocks[itemId]=new Array();}
if(typeof(cachedBlocks[itemId]['path'])=='undefined'){pathBlock.innerHTML=loaderSrc;new Ajax.Request(rootUrl+'async/path_items/get.php?item_id='+parseInt(itemId)+'&ad='+ad_item,{method:'get',onSuccess:function(transport){pathBlock.innerHTML=cachedBlocks[itemId]['path']=transport.responseText;if(document.uniqueID){var height=pathTable.offsetHeight;height=height-2;pathFrame.style.height=height+"px";}}});}else{if(pathBlock.innerHTML!=cachedBlocks[itemId]['path']){pathBlock.innerHTML=cachedBlocks[itemId]['path'];}}}
function restoreSimpleView(itemId){var catBlock=$('cat_block_'+itemId);catBlock.innerHTML=cachedBlocks[itemId]['basic'];return false;}
pathElementOutObject=new Array();pathElementOutTimeout=null;function setOverClass(el,state){var obj_class=el.className;var class_length=obj_class.length-3;if(state==true){if(obj_class.substring(class_length)==' ov'){}else if(obj_class=='ov'){}else{obj_class+=' ov';}}else{if(obj_class.substring(class_length)==' ov'){obj_class=obj_class.substring(0,class_length);}else if(obj_class=='ov'){obj_class='';}else{}}
el.className=obj_class;}
function pathElementMouseOver(el){el=$('path_item_m_'+el);if(el){if(pathElementOutObject[el.id]!=null){pathElementOutObject[el.id]=null;}
elem=el;pathElementOverTimeout=setTimeout("setOverClass(elem, true);",150);if(pathElementOutTimeout!=null){clearTimeout(pathElementOutTimeout);}
pathElementMouseOutHelper();}}
function pathElementMouseOut(el){el=$('path_item_m_'+el);if(el){pathElementOutObject[el.id]=el;if(pathElementOverTimeout!=null){clearTimeout(pathElementOverTimeout);}
if(pathElementOutTimeout!=null){clearTimeout(pathElementOutTimeout);}
pathElementOutTimeout=setTimeout("pathElementMouseOutHelper();",200);}}
function pathElementMouseOutHelper(){var tmp=pathElementOutObject;for(key in tmp){var item=tmp[key];if(item==null){continue;}
setOverClass(item,false);}
pathElementOutObject=new Array();pathElementOutTimeout=null;}
mouseOutObject=new Array();mouseOutTimeout=null;function mouseOver2(el){el=$(el);if(el){if(mouseOutObject[el.id]!=null){mouseOutObject[el.id]=null;}
elem=el;mouseOverTimeout=setTimeout("setOverClass(elem, true);",150);if(mouseOutTimeout!=null){clearTimeout(mouseOutTimeout);}
mouseOut2Helper();}}
function mouseOut2(el){el=$(el);if(el){mouseOutObject[el.id]=el;if(mouseOverTimeout!=null){clearTimeout(mouseOverTimeout);}
if(mouseOutTimeout!=null){clearTimeout(mouseOutTimeout);}
mouseOutTimeout=setTimeout("mouseOut2Helper();",200);}}
function mouseOut2Helper(){var tmp=mouseOutObject;for(key in tmp){var item=tmp[key];if(item==null){continue;}
setOverClass(item,false);}
mouseOutObject=new Array();mouseOutTimeout=null;}
function ajaxReplaceCall(url,block,value){var output=false;if(!url||typeof(url)=='undefined')return output;if(!block||typeof(block)=='undefined')return output;var oBlock=$(block);if(!oBlock||typeof(oBlock)=='undefined')return output;if(!value||typeof(value)=='undefined')value='';var oRequest=new Ajax.Request(url);oRequest.onLoad=function(oResponse){oBlock.innerHTML=value;}
oRequest.send();output=true;return output;}
function gotoURL(url){window.location=url;}
function asyncSubmitForm(form){var callback=arguments[1];var cbparam=arguments[2];var url=form.action.replace(/&amp;/,"&");if((typeof(url)=='undefined')||!(url.length>0))return false;var postdata='';for(var i=0;i<form.elements.length;i++){if(form.elements[i].name.length>0){if(form.elements[i].type=='radio'||form.elements[i].type=='checkbox'){if(form.elements[i].checked){postdata+=encodeURIComponent(form.elements[i].name)+'='+encodeURIComponent(form.elements[i].value)+'&';}}else{postdata+=encodeURIComponent(form.elements[i].name)+'='+encodeURIComponent(form.elements[i].value)+'&';}}}
if(postdata.length>0){url=url+'&'+postdata;new Ajax.Request(url,{method:'post',onSuccess:function(transport){if(typeof(callback)=='function')callback(cbparam);}});return true;}else{return false;}}
function updateBlock(preUrl,blockElement,updAct){var appReq=arguments[3];var callback=arguments[4];var cbparam=arguments[5];if(typeof(appReq)=='undefined')appReq='';new Ajax.Request(preUrl+'&action='+updAct+appReq,{method:'get',onSuccess:function(transport){if(blockElement)blockElement.innerHTML=transport.responseText;if(typeof(callback)=='function')callback(cbparam);}});}
function showObject(object_id){target_object=document.getElementById(object_id);if(!target_object){return false;}
switch(target_object.tagName){case'TABLE':try{target_object.style.display='table';}catch(e){target_object.style.display='block';}
break;case'TR':try{target_object.style.display='table-row';}catch(e){target_object.style.display='block';}
break;case'TD':try{target_object.style.display='table-cell';}catch(e){target_object.style.display='block';}
break;default:target_object.style.display='block';break;}}
function hideObject(object_id){if($(object_id)){$(object_id).style.display='none';}}
function hideObjects(object_id,countObjects){for(var i=0;i<countObjects;i++){if($(object_id+i)){$(object_id+i).style.display='none';}}}
function toggleASElements(elements_arr,disable_value){for(var i=0;i<elements_arr.length;i++){if(elements_arr[i]){elements_arr[i].disabled=disable_value;}}}
function updateElement(url,element,updAct){new Ajax.Request(url+'&action='+updAct,{method:'get',onSuccess:function(transport){$(element).innerHTML=transport.responseText;}});}
function makeAsyncCall(url,ad_id,type){var params='&ad='+ad_id+'&type='+type;new Ajax.Request(url+params,{method:'get',onSuccess:function(transport){var data=transport.responseText.replace(/^\s+|\s+$/g,'');if(data=='no_quantity'){alert(no_q_text);return false;}else if(data&&(isNaN(data)==true)){if((type=='favorites')||(type=='favorite')){if($('favorites_links_'+ad_id)){$('favorites_links_'+ad_id).innerHTML=data;}
if($(type+'_favorites_links_'+ad_id)){$(type+'_favorites_links_'+ad_id).innerHTML=data;}
if($('si_favorites_links_'+ad_id)){$('si_favorites_links_'+ad_id).innerHTML=data;}
if($('user_favorites_links_'+ad_id)){$('user_favorites_links_'+ad_id).innerHTML=data;}
if($('favorites_count_container')){fav_count=getDataFromCookie('favorites_count');$('favorites_count_container').innerHTML=fav_count;}}else if(type=='cart'){if($('cart_quantity_'+ad_id)){$('cart_quantity_'+ad_id).innerHTML=data;}
if($('si_cart_quantity_'+ad_id)){$('si_cart_quantity_'+ad_id).innerHTML=data;}
if($('user_cart_quantity_'+ad_id)){$('user_cart_quantity_'+ad_id).innerHTML=data;}
if($('cart_count_container')){cart_count=parseInt($('cart_count_container').innerHTML);$('cart_count_container').innerHTML=cart_count+1;}}}}});}
function getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
return[pageWidth,pageHeight];}
function showMessage(event,ContentText,ContentClose,ContentId){pageSize=getPageSize();if($('messageoverbox')){$('messageoverbox').show().observe('click',(function(){$('messageoverbox').hide();$('message').hide();}).bind(this));}else{var objBody=$$('body')[0];objBody.appendChild(Builder.node('div',{id:'messageoverbox'}));$('messageoverbox').setStyle({'top':'0px','left':'0px','position':"absolute",'background':"white",'display':"none",'width':pageSize[0]+'px','height':pageSize[1]+'px','z-index':50});$('messageoverbox').setOpacity(0.5);$('messageoverbox').show().observe('click',(function(){$('messageoverbox').hide();$('message').hide();}).bind(this));}
if($('message')){$('message').setStyle({'z-index':150});if((this.Event.pointerY(event)-200)<0){$('message').style.top=this.Event.pointerY(event)+'px';}else{$('message').style.top=this.Event.pointerY(event)+'px';}
$('message').style.left=this.Event.pointerX(event)+'px';if(ContentId){$('message_text').innerHTML=$(ContentId).innerHTML;}else{$('message_text').innerHTML="<h1 style='color:white;font-size:14px;'>"+ContentText+"</h1>";}
$('message').show();}else{var objBody=$$('body')[0];objBody.appendChild(Builder.node('div',{id:'message',className:'helptext'},[Builder.node('div',{className:'inner'},[Builder.node('a',{className:'closelink fr',style:'color:white;',onclick:"$('message').hide(); $('messageoverbox').hide(); return false;"},'X'),Builder.node('div',{id:'message_text',style:'text-align:center;',className:'padding10'})])]));$('message').setStyle({'z-index':150});if((this.Event.pointerY(event)-200)<0){$('message').style.top=this.Event.pointerY(event)+'px';}else{$('message').style.top=this.Event.pointerY(event)+'px';}
$('message').style.left=this.Event.pointerX(event)+'px';if(ContentId){$('message_text').innerHTML=$(ContentId).innerHTML;$('message_text').setStyle({textAlign:'left'});$('message_text').className='';}else{$('message_text').innerHTML="<h1 style='color:white;font-size:14px;'>"+ContentText+"</h1>";}
$('message').show();}}
function overMenu(menu_id,type,self){if((type=='ov_sub')||(type=='out_sub')){var pathHiddenSubMenuBlock=$('hidden_sub_menu_'+menu_id);aLinkClass=self.getElementsByTagName('a');}else{var pathMenuBlock=$('menu_'+menu_id);var pathTopSubMenuBlock=$('up_sub_menu_'+menu_id);var top_divs=$('menu_blocks').getElementsByTagName('div');for(var i=0;i<top_divs.length;i++){if((top_divs[i].className!='menu_item')&&(top_divs[i].id!='down_sub_menu')&&(top_divs[i].id!='up_sub_menu')&&(top_divs[i].id!='show_sub_menu_'+menu_id)&&(top_divs[i].id!='hidden_sub_menu'))
top_divs[i].style.display='none';else top_divs[i].style.display='block';}}
switch(type)
{case'ov':pathMenuBlock.style.display='none';pathTopSubMenuBlock.style.display='block';break;case'out':pathMenuBlock.style.display='block';pathTopSubMenuBlock.style.display='none';break;case'ov_sub':if(pathHiddenSubMenuBlock.style.display=='none')
{pathHiddenSubMenuBlock.style.display='block';aLinkClass[0].className='active';}
else
{pathHiddenSubMenuBlock.style.display='none';aLinkClass[0].className='';}
break;case'out_sub':pathHiddenSubMenuBlock.style.display='none';break;}}
function displayObject(object_id){if($(object_id)){$(object_id).style.display='block';}}
function showHideBlock(value,block1,block2){if(value==1){displayObject(block1);hideObject(block2);}else{hideObject(block1);displayObject(block2);}}
function setRecipient(elId,blockId){if($(elId).value==0){$(elId).setAttribute('value','1');displayObject(blockId);}else{$(elId).setAttribute('value','0');hideObject(blockId);}}
function showItems(elementName,elementIndex,elementsCount,childsName,linkName){var i=1;while(i<=elementsCount){if(i==elementIndex){$(childsName+elementName+i).style.display='block';$(linkName+elementName+i).className='active';}else{$(childsName+elementName+i).style.display='none';$(linkName+elementName+i).className='';}
i++;}}
function changeSelectValues(childValues,sourceSelect,targetSelectId,isMultiple){var targetSelect=$(targetSelectId);var selectedOptions=new Array();while(targetSelect.length>0){targetSelect.remove(0);}
if(isMultiple){if(sourceSelect.options.length>0){for(var i=0;i<sourceSelect.options.length;i++){if(sourceSelect.options[i].selected){selectedOptions.push(sourceSelect.options[i].value);}}}}else{selectedOptions.push(sourceSelect.options[sourceSelect.selectedIndex].value);}
targetSelect.options[targetSelect.options.length]=new Option(LANG_cms_controls_option_no_matter,'');if(selectedOptions.length>0){selectedOptions.each(function(option){if(childValues[option]!=null){childValues[option].each(function(targetData){if(targetData!=null){var nameParts=targetData.name.split('-',2);var isBold=false;var isIndent=false;if(nameParts[0]=='BOLD'){isBold=true;}else if(nameParts[0]=='INDENT'){nameParts[1]="&nbsp;&nbsp;"+nameParts[1];}else{nameParts[1]=targetData.name;}
targetSelect.options[targetSelect.options.length]=new Option(nameParts[1],targetData.id);targetSelect.options[targetSelect.options.length-1].innerHTML=nameParts[1];if(isBold){targetSelect.options[targetSelect.options.length-1].style.fontWeight='bold';}}});}});}}
function changeSelectValuesAsync(valuesLink,sourceSelect,targetSelectId,isMultiple){var targetSelect=$(targetSelectId);var selectedIds='';targetSelect.options.length=0;targetSelect.options[0]=new Option(LANG_site_search_wait,"");if(isMultiple){if(sourceSelect.options.length>0){for(var i=0;i<sourceSelect.options.length;i++){if(sourceSelect.options[i].selected){selectedIds+=sourceSelect.options[i].value+',';}}}}else{selectedIds=sourceSelect.options[sourceSelect.selectedIndex].value;}
new Ajax.Request(valuesLink+selectedIds,{method:'get',onSuccess:function(transport){var values=new Array();for(var i in transport.responseJSON){var element=transport.responseJSON[i];if(values[element.parent_id]==null){values[element.parent_id]=new Array();}
values[element.parent_id][values[element.parent_id].length]=element;}
changeSelectValues(values,sourceSelect,targetSelectId,isMultiple);}});}
function is_object(mixed_var){if(mixed_var instanceof Array){return false;}else{return(mixed_var!==null)&&(typeof(mixed_var)=='object');}}
function is_function(mixed_var){if(mixed_var instanceof Array){return false;}else{return(mixed_var!==null)&&(typeof(mixed_var)=='function');}}
var requestUrl='';var createBannerUrl='';var AD_ID=0;var loaderImageSrc=rootUrl+'media/images/dec/loader.gif';var loaderSrc='<img src="'+loaderImageSrc+'" />';var LoadingImage=new Image();LoadingImage.src=loaderImageSrc;var form_types=new Array('ss','si','sp','sl');function showRenew(type){showObject('renew_'+type);hideObject('renew_'+type+'_btn');}
function hideRenew(type){hideObject('renew_'+type);showObject('renew_'+type+'_btn');}
function showOrderForm(type){for(var i=0;i<form_types.length;i++){hideRenew(form_types[i]);}
$(type+'_form_block_container').innerHTML=loaderSrc;updateBlock(requestUrl,$(type+'_form_block_container'),'order_form_block','&ad_id='+AD_ID+'&banner_type='+type,showRenew,type);}
function updateBlocks(params){if(typeof(params)=='object'){var url=params[0];var idToUpdate=params[1];var action=params[2];var appReq=params[3];updateBlock(url,$(idToUpdate),action,appReq);if($('user_money_container'))updateBlock(requestUrl,$('user_money_container'),'user_money');if($('user_money_menu_container'))updateBlock(requestUrl,$('user_money_menu_container'),'user_money_menu');}}
var mouseX=0;var mouseY=0;function getcords(e){mouseX=Event.pointerX(e);mouseY=Event.pointerY(e);}
function showBlockWithCustomString(id,str){displayObject(id);$(id).innerHTML=str;$(id).setStyle({left:(mouseX+15)+'px',top:(mouseY-20)+'px'});return false;}
function submitBannerOrder(frm,idToUpdate,action,appReq){var allowSubmit=false;for(var i=0;i<frm.elements.length;i++){if(frm.elements[i].type=='radio'&&frm.elements[i].checked){allowSubmit=true;break;}}
if(allowSubmit){frm.action=createBannerUrl+appReq;var f=frm.cloneNode(true);if(!!document.all)f.innerHTML=frm.innerHTML;$(idToUpdate).innerHTML=loaderSrc;var params=new Array(requestUrl,idToUpdate,action,appReq);asyncSubmitForm(f,updateBlocks,params);}else{alert('Pasirinkite užsakymą!');}}
function showMessageBlock(id){var active=$('block_'+id);var status=$(id+'_st');if(active.style.display=='block'){return true;}
$('block_friend').style.display='none';$('block_admin').style.display='none';$('block_author').style.display='none';active.style.display='block';if($('block_author').style.display=='block'){if((($('sms')&&!$('sms').checked)||!$('sms'))&&(($('mail')&&!$('mail').checked)||!$('mail'))&&$('inner')){toggle_check('author_inner','author_sms','author_mail');$('inner').checked='checked';}else if((($('sms')&&!$('sms').checked)||!$('sms'))&&$('mail')){toggle_check('author_mail','author_inner','author_sms');$('mail').checked='checked';}else{toggle_check('author_sms','author_mail','author_inner');$('sms').checked='checked';}}else if($('block_friend').style.display=='block'){if((($('f_sms')&&!$('f_sms').checked)||!$('f_sms'))&&$('f_mail')){toggle_check('friend_mail','friend_sms','');$('f_mail').checked='checked';}else{toggle_check('friend_sms','friend_mail','');$('f_sms').checked='checked';}}else{}}
function toggle_check(type_show,type_hide,type_hide2){var active=$(type_show);if(type_hide!=''){var deactive=$(type_hide);deactive.style.display='none';}
if(type_hide2!=''){var deactive2=$(type_hide2);deactive2.style.display='none';}
active.style.display='block';}
function toggle_admin(id){$('admin_bad').style.display='block';var subType=$(id).value;$('adminSubType').value=subType;}
function unsuccess(){if($('msg_mail_sent_friend')){$('msg_mail_sent_friend').style.display='none';}
if($('msg_sms_sent_friend')){$('msg_sms_sent_friend').style.display='none';}
if($('msg_sms_sent_author')){$('msg_sms_sent_author').style.display='none';}
if($('msg_mail_sent_author')){$('msg_mail_sent_author').style.display='none';}
if($('msg_inner_sent_author')){$('msg_inner_sent_author').style.display='none';}
if($('msg_sent_admin')){$('msg_sent_admin').style.display='none';}}
function checkPhone(input_,event_){var e=event_;if(typeof(e.keyCode)=='number'){e=e.keyCode;}else if(typeof(e.which)=='number'){e=e.which;}else if(typeof(e.charCode)=='number'){e=e.charCode;}else{}
if(((e>46)&&(e<58))||(e==8)||(e==13)||(e==116)||(e==35)||(e==36)||((e>95)&&(e<106))){return e;}else{return false;}}
function checkPrice(input_,event_){var e=event_;if(typeof(e.keyCode)=='number'){e=e.keyCode;}else if(typeof(e.which)=='number'){e=e.which;}else if(typeof(e.charCode)=='number'){e=e.charCode;}else{}
if(((46<e)&&(e<58))||(e==8)||(e==110)||(e==190)||(e==188)||(e==46)||(e==13)||(e==116)||(e==107)||(e==109)||(e==35)||(e==36)||((95<e)&&(e<106))){return e;}else{return false;}}
var iSlide=0
var intSlide
var speed
var defaultSpeed=30
var viewerWidth=326
var defaultWidth=0
function SlideRight()
{speed=defaultSpeed
intSlide=setTimeout("GoRight()",defaultSpeed)}
function SlideLeft()
{speed=defaultSpeed
intSlide=setTimeout("GoLeft()",defaultSpeed)}
function GoLeft()
{speed=speed-1
if(speed<2)speed=2
iSlide=iSlide-speed
if(iSlide<-1*(defaultWidth-viewerWidth))
{iSlide=-1*(defaultWidth-viewerWidth);clearTimeout(intSlide)}
else{intSlide=setTimeout("GoLeft()",defaultSpeed)}
$('ImagesList').style.left=iSlide+'px';}
function GoRight()
{speed=speed-1
if(speed<1)speed=1
iSlide=iSlide+speed
if(iSlide>0)
{iSlide=0
clearTimeout(intSlide)}
else{intSlide=setTimeout("GoRight()",defaultSpeed)}
$('ImagesList').style.left=iSlide+'px';}
function checkValues(input_,event_,type,list_words){var e=event_;if(type=="number"){if(typeof(e.keyCode)=='number'){e=e.keyCode;}else if(typeof(e.which)=='number'){e=e.which;}else if(typeof(e.charCode)=='number'){e=e.charCode;}else{}
if(((46<e)&&(e<58))||(e==8)||(e==110)||(e==190)||(e==188)||(e==46)||(e==13)||(e==116)||(e==107)||(e==109)||(e==35)||(e==36)||((95<e)&&(e<106))){return e;}else{return false;}}else if(type=='abc'){if(typeof(e.keyCode)=='number'){e=e.keyCode;}else if(typeof(e.which)=='number'){e=e.which;}else if(typeof(e.charCode)=='number'){e=e.charCode;}else{}
if((e==107)||(e==109)||(e==191)||(e==188)||(e==59)||(e==111)||(e==106)||(e==192)||(e==32)||(e==110)||((event_.shiftKey==true)&&((46<e)&&(e<58)))){return false;}else{if(inArray(input_.value.toLowerCase(),list_words.split(','))&&(e==190)){return false;}
if((e>46)&&(e<91)){input_.value=input_.value+String.fromCharCode(e).toLowerCase();}else if(e<191){return e;}
return false;}}}
function inArray(value,array){var i;for(i=0;i<array.length;i++){if(array[i]==value){return true;}}
return false;}