function fnSetItemSlider(arrParams){ if (!$(arrParams.rotationObject)) { return; } /** Created By Amir Saleh Sample Params Array var arrParams = { "rotationObject":"more_results", "btnNextElement":"mr_up_arrow", "btnBackElement":"mr_down_arrow", "btnNextClassName":"mr_up_ar", "btnNextDisabledClassName":"mr_up_disabled", "btnBackClassName":"mr_down_ar", "btnBackDisabledClassName":"mr_down_disabled", "MaxResults":75, "MaxStep":24, "StepLength":699 }; **/ $(arrParams.rotationObject).current_step=0; $(arrParams.rotationObject).max_results=arrParams.MaxResults; $(arrParams.rotationObject).max_step=arrParams.MaxStep; $(arrParams.rotationObject).scrolling=0; $(arrParams.rotationObject).scrollingy=0; $(arrParams.rotationObject).mr_intervalID; $(arrParams.rotationObject).scrollingspeed=20; $(arrParams.rotationObject).step_length=arrParams.StepLength; $(arrParams.rotationObject).m_opacity=1; $(arrParams.rotationObject).opacity_speed=0.1; $(arrParams.rotationObject).scrolling=false; $(arrParams.rotationObject).btnNextClassName=arrParams.btnNextClassName?arrParams.btnNextClassName:'mr_up_ar'; $(arrParams.rotationObject).btnNextDisabledClassName=arrParams.btnNextDisabledClassName?arrParams.btnNextDisabledClassName:'mr_up_disabled'; $(arrParams.rotationObject).btnBackClassName=arrParams.btnBackClassName?arrParams.btnBackClassName:'mr_down_ar'; $(arrParams.rotationObject).btnBackDisabledClassName=arrParams.btnBackDisabledClassName?arrParams.btnBackDisabledClassName:'mr_down_disabled'; if($(arrParams.rotationObject).max_step<1){ $(arrParams.btnNextElement).className=$(arrParams.rotationObject).btnNextDisabledClassName; $(arrParams.btnBackElement).className=$(arrParams.rotationObject).btnBackDisabledClassName; } $(arrParams.btnNextElement).onclick=function(){if(!$(arrParams.rotationObject).scrolling) $(arrParams.rotationObject).mr_go(1);}; $(arrParams.btnBackElement).onclick=function(){if(!$(arrParams.rotationObject).scrolling) $(arrParams.rotationObject).mr_go(-1);}; $(arrParams.rotationObject).fade_scroller = function (dir){ $(arrParams.rotationObject).use_step=$(arrParams.rotationObject).current_step+(-1*dir); if($(arrParams.rotationObject).current_step<0){ $(arrParams.rotationObject).step=-1*$(arrParams.rotationObject).current_step; } else { $(arrParams.rotationObject).step=$(arrParams.rotationObject).current_step; } $(arrParams.rotationObject).step=$(arrParams.rotationObject).step*3+1; $(arrParams.rotationObject).step2=$(arrParams.rotationObject).step+2; if($(arrParams.rotationObject).step2>$(arrParams.rotationObject).max_results){ $(arrParams.rotationObject).step2=$(arrParams.rotationObject).max_results; } // $('paging_for_items').innerHTML= step + ' - '+ step2; if($(arrParams.rotationObject).max_step>1 && document.getElementById('paging_for_items')) { $('paging_for_items').innerHTML= $(arrParams.rotationObject).step + ' - '+ $(arrParams.rotationObject).step2; } clearInterval($(arrParams.rotationObject).mr_intervalID); newOffset=(($(arrParams.rotationObject).use_step*$(arrParams.rotationObject).step_length)+dir*$(arrParams.rotationObject).step_length)+'px'; if (PageInfo.boolRTL) { $(arrParams.rotationObject).style.right=newOffset; } else { $(arrParams.rotationObject).style.left=newOffset; } $(arrParams.rotationObject).scrollingy=0; if($(arrParams.rotationObject).current_step<0){ $(arrParams.btnNextElement).className=$(arrParams.rotationObject).btnNextClassName; } else { $(arrParams.btnNextElement).className=$(arrParams.rotationObject).btnNextDisabledClassName; } if($(arrParams.rotationObject).current_step<=(-$(arrParams.rotationObject).max_step)){ $(arrParams.btnBackElement).className=$(arrParams.rotationObject).btnBackDisabledClassName; } else { $(arrParams.btnBackElement).className=$(arrParams.rotationObject).btnBackClassName; } } $(arrParams.rotationObject).fnFadeOut=function (dir){ $(arrParams.rotationObject).m_opacity=$(arrParams.rotationObject).m_opacity-$(arrParams.rotationObject).opacity_speed; if($(arrParams.rotationObject).m_opacity<0){ $(arrParams.rotationObject).m_opacity=0; Common.fnSetOpacity(arrParams.rotationObject,$(arrParams.rotationObject).m_opacity) $(arrParams.rotationObject).fade_scroller(dir); clearInterval($(arrParams.rotationObject).mr_intervalID); $(arrParams.rotationObject).mr_intervalID=setInterval("$('"+arrParams.rotationObject+"').fnFadeIn("+dir+")",50); } else { Common.fnSetOpacity(arrParams.rotationObject,$(arrParams.rotationObject).m_opacity) } } $(arrParams.rotationObject).fnFadeIn = function (dir){ $(arrParams.rotationObject).m_opacity+=$(arrParams.rotationObject).opacity_speed; if($(arrParams.rotationObject).m_opacity>1){ $(arrParams.rotationObject).m_opacity=1; Common.fnSetOpacity(arrParams.rotationObject,$(arrParams.rotationObject).m_opacity) $(arrParams.rotationObject).scrolling=0; clearInterval($(arrParams.rotationObject).mr_intervalID); } else { Common.fnSetOpacity(arrParams.rotationObject,$(arrParams.rotationObject).m_opacity) } } $(arrParams.rotationObject).mr_go=function(dir){ if($(arrParams.rotationObject).max_step<1){ return 1; } if($(arrParams.rotationObject).scrolling) return; if($(arrParams.rotationObject).current_step==0 && dir==1) { return; } if($(arrParams.rotationObject).current_step==(-$(arrParams.rotationObject).max_step) && dir==-1) { return; } $(arrParams.rotationObject).scrolling=1; $(arrParams.rotationObject).current_step=$(arrParams.rotationObject).current_step+dir; if(Common.Browser.is_ff()){ $(arrParams.rotationObject).mr_intervalID=setInterval("$('"+arrParams.rotationObject+"').fnFadeOut("+dir+")",50); } else { $(arrParams.rotationObject).mr_intervalID=setInterval("$('"+arrParams.rotationObject+"').mr_scrolltop("+dir+")",10); } } $(arrParams.rotationObject).mr_scrolltop= function (dir){ $(arrParams.rotationObject).use_step=$(arrParams.rotationObject).current_step+(-1*dir); $(arrParams.rotationObject).scrollingy+=$(arrParams.rotationObject).scrollingspeed; if($(arrParams.rotationObject).scrollingy>$(arrParams.rotationObject).step_length-$(arrParams.rotationObject).scrollingspeed){ if($(arrParams.rotationObject).current_step<0){ $(arrParams.rotationObject).step=-1*$(arrParams.rotationObject).current_step; } else { $(arrParams.rotationObject).step=$(arrParams.rotationObject).current_step; } $(arrParams.rotationObject).step=$(arrParams.rotationObject).step*3+1; $(arrParams.rotationObject).step2=$(arrParams.rotationObject).step+2; if($(arrParams.rotationObject).step2>$(arrParams.rotationObject).max_results){ $(arrParams.rotationObject).step2=$(arrParams.rotationObject).max_results; } if($(arrParams.rotationObject).max_step>1 && document.getElementById('paging_for_items')) { $('paging_for_items').innerHTML= $(arrParams.rotationObject).step + ' - '+ $(arrParams.rotationObject).step2; } clearInterval($(arrParams.rotationObject).mr_intervalID); newOffset=(($(arrParams.rotationObject).use_step*$(arrParams.rotationObject).step_length)+dir*$(arrParams.rotationObject).step_length)+'px'; if (PageInfo.boolRTL) { $(arrParams.rotationObject).style.right=newOffset; } else { $(arrParams.rotationObject).style.left=newOffset; } $(arrParams.rotationObject).scrollingy=0; $(arrParams.rotationObject).scrolling=0; if($(arrParams.rotationObject).current_step<0){ $(arrParams.btnNextElement).className=$(arrParams.rotationObject).btnNextClassName; } else { $(arrParams.btnNextElement).className=$(arrParams.rotationObject).btnNextDisabledClassName; } if($(arrParams.rotationObject).current_step<=(-$(arrParams.rotationObject).max_step)){ $(arrParams.btnBackElement).className=$(arrParams.rotationObject).btnBackDisabledClassName; } else { $(arrParams.btnBackElement).className=$(arrParams.rotationObject).btnBackClassName; } } else { newOffset = (($(arrParams.rotationObject).use_step*$(arrParams.rotationObject).step_length)+dir*$(arrParams.rotationObject).scrollingy)+'px'; if (PageInfo.boolRTL) { $(arrParams.rotationObject).style.right=newOffset; } else { $(arrParams.rotationObject).style.left=newOffset; } } } } var HomePage={ Cache:[],MenuConfig:null, RebuildMenusData:function(strMenusDataConfig,UniqueParam){ this.GetBrowseData('BuildMenuData',"[\""+strMenusDataConfig+"\","+$F('ItemType')+","+$F('ViewType2')+",\""+UniqueParam+"\"]",function(res){ for(var a=0;a'; }, CreateCategoriesSubMenus : function (pos,strMenusData,md5_unique_id) { UI.AddSubMenus({ SubMenuStyle:function(obj) { obj.style.position='absolute'; }, AutoCreateSubMenu:1, AutoMenuList:{ ParentPrefix:'p', FirstIndex:1, LastIndex: pos }, setLeft:(PageInfo.boolRTL?'afterobjectMinusMenuWidth':'afterobject'), MenuGroup:'MedicalCategories', TargetMouseOverClass:'div3b', TargetMouseOutClass:'div3bw', MenuRebuildFunction:"HomePage.BuildRatedDevicesMenu(objMenu)" }); HomePage.RebuildMenusData(strMenusData,md5_unique_id); } }; Element.observe(window, 'load',function() { /* if($('view_auctions_button').offsetWidth > $('recently_posted_button').offsetWidth){ $('recently_posted_button').style.width=($('view_auctions_button').offsetWidth-32) +'px'; } else { $('view_auctions_button').style.width=($('recently_posted_button').offsetWidth-32) +'px'; } */ var o1 = UI.getElementsByClassName("circle_blue")[0]; var o2 = UI.getElementsByClassName("circle_green")[0]; var oh = o1.offsetHeight>o2.offsetHeight?o1.offsetHeight:o2.offsetHeight; o1.style.height = o2.style.height = oh +'px'; //o1.childNodes[1].style.bottom = o2.childNodes[1].style.bottom = '0'; UI.addCssStyle(".HomeSeller ul,.HomeBuyer ul {position:absolute;}"); });