function scrolling(a,b,c){ var speedp=30; var tabp=document.getelementbyid(a); var tab1p=document.getelementbyid(b); var tab2p=document.getelementbyid(c); tab2p.innerhtml=tab1p.innerhtml; function marqueep(){ if(tab2p.offsetwidth-tabp.scrollleft<=0) tabp.scrollleft-=tab1p.offsetwidth else{ tabp.scrollleft++; } } var mymarp=setinterval(marqueep,speedp); tabp.onmouseover=function(){clearinterval(mymarp);}; tabp.onmouseout=function(){mymarp=setinterval(marqueep,speedp);}; } function jgform(tinput,tshow,tcla,tlist,tbtn){ var finput=$("."+tinput); var fshow=$("."+tshow); var fcla=$("."+tcla); var flist=$("."+tlist); var fbtn=$("."+tbtn); var input_txt = finput.val(); finput.focus(function(){ if(input_txt === $(this).val()) $(this).val(""); }).blur(function(){ if($(this).val() == "") $(this).val(input_txt); }); $(".head,.nav,.pfla_in").click(function(){ flist.hide(); }) fshow.click(function(){ flist.slidetoggle("fast"); return false; }); flist.find("li").hover(function(){ $(this).addclass("li_hover"); },function(){ $(this).removeclass("li_hover"); }).click(function(){ var cla_txt=$(this).html(); var cla_val=$(this).attr("rel"); fcla.val(cla_val); fshow.html(cla_txt); }) flist.find("li:last").css("background","none"); fbtn.focus(function(){$(this).blur();}) } $(function(){ scrolling("n_con","n1p","n2p"); jgform("s_txt","s_show","s_cla","s_cla_list","s_btn"); })