browserName=navigator.appName;browserVer=parseInt(navigator.appVersion);condition=!(((browserName.indexOf("Explorer")>=0)&&(browserVer<4))||((browserName.indexOf("Netscape")>=0)&&(browserVer<2)));if(condition==true){CanAnimate=true;}else{CanAnimate=false;}
$(function(){$(".img_w100_h75").LoadImage(true,100,75);$(".img_w120_h90").LoadImage(true,120,90);$(".img_w144_h144").LoadImage(true,144,144);$(".img_w100_h75").LoadImage(true,100,75);$(".img_h54").LoadImage(true,72,54);$('.show_img_small li').click(function(){$('.show_img_big .img_big').attr('src',$(this).find('img.img_thumb').attr('_src'));$('.show_img_big a').attr('href',$(this).find('img.img_thumb').attr('_src'));});$('.flo_le input.allselect').click(function(){if($(this).attr("checked")===true){$(this).attr("checked","checked");$('.con input.pids').attr("checked","checked");}else{$(this).removeAttr("checked");$('.con input.pids').removeAttr("checked");}});});jQuery.fn.LoadImage=function(scaling,width,height,loadpic){if(loadpic==null)loadpic="images/imgload.gif";return this.each(function(){var t=$(this);var src=$(this).attr("src")
var img=new Image();img.src=src;var autoScaling=function(){if(scaling){if(img.width>0&&img.height>0){if(width<=0){if(height<img.height){t.height(height);t.width((img.width/img.height)*height);}
else{t.height(img.height);t.width(img.width);}}
else if(height<=0){if(width<img.width){t.width(width);t.height((img.height/img.width)*width);}
else{t.height(img.height);t.width(img.width);}}
else if(img.width/img.height>=width/height){if(img.width>width){t.width(width);t.height((img.height*width)/img.width);}else{t.width(img.width);t.height(img.height);}}
else{if(img.height>height){t.height(height);t.width((img.width*height)/img.height);}
else{t.width(img.width);t.height(img.height);}}}}
else{t.width(width);t.height(height);}}
if(img.complete){autoScaling();return;}
$(this).attr("src","");var loading=$("<img alt=\"加载中\" title=\"图片加载中\" src=\""+loadpic+"\" />");t.hide();$(img).load(function(){autoScaling();loading.remove();t.attr("src",this.src);t.show();});});}
function betweenLength(str,_min,_max){return(str.length>=_min&&str.length<=_max);}
function trim(m){while((m.length>0)&&(m.charAt(0)==''))
m=m.substring(1,m.length);while((m.length>0)&&(m.charAt(m.length-1)==''))
m=m.substring(0,m.length-1);return m;}
document.onclick=function(e)
{var target=e?e.target:window.event.srcElement;while(target&&!/^(a|body)$/i.test(target.nodeName))
{target=target.parentNode;}
if(target&&target.getAttribute('rel'))
{if(target.rel=='external'){var external=window.open(target.href);return external.closed;}else if(target.rel=='setAsHomepage'){setAsHomepage(target,target.href);return false;}else if(target.rel=='addToBookmark'){addToBookmark(target.title,target.href,"");return false;}}}
function setAsHomepage(element,Url)
{try
{element.style.behavior='url(#default#homepage)';element.setHomePage(Url);}
catch(e){if(window.netscape)
{try
{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");}
catch(e)
{alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'");return false;}
var prefs=Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);prefs.setCharPref('browser.startup.homepage',Url);}}}
function addToBookmark(WebsiteName,Url,Description)
{if(window.sidebar){window.sidebar.addPanel(WebsiteName,Url,Description);}else if(document.all){window.external.AddFavorite(Url,WebsiteName);}else if(window.opera&&window.print){return true;}}
function translator(pattern){var open_in_same_window=0;var my_location=unescape(document.location.toString());var new_location="";var new_pattern="";if(my_location.indexOf("translate_c?")!=-1){var indexof_u=my_location.indexOf("u=");if(indexof_u==-1){new_location=document.location;}else{var subs=my_location.substring(indexof_u,my_location.length);var ss=subs.split("&");new_location=ss[0].substring(2,ss[0].length);}}else{new_location=document.location;}
indexof_p=pattern.indexOf("|");var isen="";if(indexof_p==-1){indexof_p1=pattern.indexOf("><");if(indexof_p1==-1){new_pattern=pattern;if(pattern=="en"){isen=1;}}else{var psplit=pattern.split("><");new_pattern=psplit[0]+"|"+psplit[1];if(psplit[1]=="en"){isen=1;}}}else{var psplit=pattern.split("|");new_pattern=psplit[0]+"|"+psplit[1];if(psplit[1]=="en"){isen=1;}}
var thisurl="";if(isen==1){thisurl=new_location;}else{thisurl="http://translate.google.com/translate_c?langpair="+new_pattern+"&u="+new_location;}
if(open_in_same_window==1){window.location.href=thisurl;}else{if(CanAnimate){msgWindow=window.open("","subwindow","toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0");msgWindow.focus();msgWindow.location.href=thisurl;}else{msgWindow=window.open(thisurl,"subwindow","toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0");}}}
