jaw.PhotoGallery={version:1.2,preLoadImgNumber:0,indexImageNumber:6,hasFavorFeature:false,viewModule:"b",hasDownloadFeature:true,name:"\u56fe\u5e93\u7cfb\u7edf",isSyncURL:true,tjXML:null,previousGroup:null,currentGroup:null,nextGroup:null,currentImgNode:null,groupArray:[],largeScreen:screen.height>800?true:false,loadingImageURL:"http://www.royalerp.com/pic_module/images/loading02.gif",elem:{leftArrow:null,rightArrow:null,upArrow:null,downArrow:null,mainPic:null,loadingPic:null,loadingBorder:null,groupInfoText:null,picTitle:null,picText:null,groupTitle:null,groupInfo:null,previousGroupLink:null,nextGroupLink:null,pageofcate:null,maskLayer:null,previewImageList:null,downloadImage:null,downloadImageContainer:null},flash:{getConfig:function(){var B=jaw.PhotoGallery.flashObject;if(B){try{B.GetJsObj(phgaConfig)}catch(A){}}},getCacheNumber:function(){if(typeof js2fla=="function"){js2fla("cacheNumber|"+jaw.PhotoGallery.preLoadImgNumber)}},notifyFlash:function(){var D=jaw.PhotoGallery;if(D.hasFlashFeatrue&&typeof js2fla=="function"){var F=D.currentImgNode;var C=D.currentGroup;if(F&&C){var B=F.getAttribute("id"),E=C.id,A=B+","+E;if(typeof js2fla=="function"){phgaConfig.gId=E;phgaConfig.pId=B;js2fla(A)}}}},notifyJS:function(A,B){if(A&&B){jaw.PhotoGallery.initGId=B;jaw.PhotoGallery.initPId=A}},escFullScreen:function(){return jaw.PhotoGallery.init()},playEnd:function(){return jaw.PhotoGallery.exit()}},resPath:phgaConfig.resPath,cssImgArray:["images/picA.gif","images/text_bg.png","images/photoframe.png"],exit:function(){window.location.href=jaw.PhotoGallery.notFoundPage},readConfig:function(){(new Image).src=this.loadingImageURL;if(typeof phgaConfig!="object"){throw new Error("\u8bf7\u521d\u59cb\u5316\u56fe\u7247\u5e93\u7684\u914d\u7f6e\u6587\u4ef61");return undefined}this.name=phgaConfig.name;this.notFoundPage=phgaConfig.notFound;this.isSyncURL=phgaConfig.syncURL!=undefined?!!phgaConfig.syncURL:true;this.preLoadImgNumber=+phgaConfig.cache;this.tjXML=phgaConfig.tjXML;var initGId=phgaConfig.gId,initPId=phgaConfig.pId,hash=window.location.hash,search=window.location.search;if(search&&search.trim()!=""){var searchPId=search.replace(/^\?/g,"");if(searchPId>0){initPId=searchPId}}if(hash&&hash.trim()){try{var hashGId=jaw.getParameter("g","hash"),hashPId=jaw.getParameter("p","hash"),viewModule=jaw.getParameter("m","hash");initGId=hashGId||initGId;initPId=hashPId||initPId;if(typeof viewModule!="undefined"){this.viewModule=viewModule}}catch(e){jaw.PhotoGallery.exit()}}if(!initGId){throw escape("\u8bf7\u6307\u5b9a\u521d\u59cb\u5316\u7ec4Id");return }if(this.viewModule!="r"){var bigImageModule=$("bigImageModule"),smallImageModule=$("smallImageModule");if(bigImageModule&&bigImageModule.nodeType){this.viewModule="b"}else{if(smallImageModule&&smallImageModule.nodeType){this.viewModule="s"}}}if(this.viewModule=="r"){var cssURL=this.resPath+"style/style-1.2-r.css";jaw.loadCSS(cssURL,"defaultCSS")}if(this.largeScreen&&this.viewModule=="b"){var h1=704;if(jaw.browser.ie6){jaw.addCssRule(".lH","line-height:"+h1+"px")}var h2=45+h1+75;jaw.addCssRule(".defH","height:"+h1+"px");jaw.addCssRule(".pg_defH","height:"+h2+"px")}var pg_imageArea=$("pg_imageArea"),pg_textArea=$("pg_textArea"),pg_indexImageArea=$("pg_indexImageArea");if(pg_imageArea&&pg_imageArea.nodeType){if(this.viewModule=="r"){if(pg_textArea&&pg_textArea.nodeType){pg_textArea.parentNode.removeChild(pg_textArea)}if(pg_indexImageArea&&pg_indexImageArea.nodeType){pg_indexImageArea.parentNode.removeChild(pg_indexImageArea)}pg_imageArea.innerHTML="<div class=\"pp\"><ul class=\"pic_list\" id=\"pg_imageList\"></ul></div><ul class=\"control_bar\"><li class=\"top\"><a href=\"javascript:void(0)\" id=\"pg_upArrow\" hidefocus=\"true\" class=\"up\"></a></li><li class=\"middle\"></li><li class=\"bottom\"><a href=\"javascript:void(0)\" id=\"pg_downArrow\" hidefocus=\"true\" class=\"down\"></a></li></ul>"}}this.initGId=initGId;this.initPId=initPId;this.elem.leftArrow=$("leftArrow");this.elem.rightArrow=$("rightArrow");this.elem.upArrow=$("pg_upArrow");this.elem.downArrow=$("pg_downArrow");this.elem.mainPic=$("mainPic");this.elem.loadingBorder=$("loadingBorder");this.elem.loadingPic=$("loadingPic");this.elem.picText=$("picText");this.elem.picTitle=$("picTitle");this.elem.groupTitle=$("groupTitle");this.elem.groupInfo=$("groupInfo");this.elem.previousGroupLink=$("previousGroupLink");this.elem.nextGroupLink=$("nextGroupLink");this.elem.pageofcate=$("pageofcate");this.elem.maskLayer=$("maskLayer");this.elem.downloadImage=$("downBigImage");this.elem.previewImageList=$("pg_imageList");this.elem.downloadImageContainer=this.elem.downloadImage?this.elem.downloadImage.parentNode:null;this.elem.resElem=$("g-research");this.hasFavorFeature=typeof phgaConfig.up=="object";this.hasDownloadFeature=!!phgaConfig.download;var favoriteElem=$("pg_favorite");if(favoriteElem&&favoriteElem.nodeType){if(this.hasFavorFeature){this.Favor.addURL=phgaConfig.up.add;this.Favor.countURL=phgaConfig.up.count;favoriteElem.style.visibility="visible"}else{favoriteElem.style.visibility="hidden"}}var groupTitle=jaw.PhotoGallery.elem.groupTitle;if(groupTitle&&groupTitle.nodeType){groupTitle.ondblclick=function(){jaw.PhotoGallery.init(0)}}jaw.PhotoGallery.Research.init();if(this.elem.downloadImageContainer&&this.elem.downloadImageContainer.nodeType){if(this.hasDownloadFeature){jaw.Elem.show(this.elem.downloadImageContainer);$("downBigImage").title="\u4e0b\u8f7d\u5927\u56fe2"}else{jaw.Elem.hide(this.elem.downloadImageContainer)}}var cateXMLURL=phgaConfig.cateXMLURL;jaw.PhotoGallery.cateListURL=phgaConfig.cateListURL;jaw.ajax({url:cateXMLURL,success:jaw.PhotoGallery.readXML.readCateXML,cache:true});var swfSrc=phgaConfig.swf;this.hasFlashFeatrue=!!swfSrc;if(this.hasFlashFeatrue){var href=phgaConfig.cateXMLURL;var path=href.substring(0,href.lastIndexOf("/"));var fVars="picId="+initPId+"&groupId="+initGId+"&cateXML="+cateXMLURL+"&up="+jaw.PhotoGallery.hasFavorFeature;var flashId="ful_btn";var paramsObj={wmode:"transparent",allowScriptAccess:"sameDomain",allowFullScreen:true,scale:"noscale",flashVars:fVars,javascriptid:"flashId"};var flashObj={border:$("swfWrapper"),id:flashId,src:swfSrc,width:39,height:31,params:paramsObj};jaw.loadFlash(flashObj);var flashObject=$("ful_btn");if(flashObject){this.flashObject=flashObject;window["js2fla"]=function(args){try{flashObject.SetVariable("_level0.tt",args);flashObject.TCallFrame("_level0.main",1)}catch(e){setTimeout(function(){js2fla(args)},100)}};window["fla2js"]=function(str){return eval(str)}}if(jaw.browser.ie){js2fla("cateXML|"+cateXMLURL)}window["getConfig"]=jaw.PhotoGallery.flash.getConfig;window["notifyJS"]=jaw.PhotoGallery.flash.notifyJS;window["escFullScreen"]=jaw.PhotoGallery.flash.escFullScreen}return jaw.PhotoGallery.init()},init:function(A){this.previousGroup=null;this.currentGroup=null;this.nextGroup=null;this.currentImgNode=null;var B=false;if(A<0){B=true}if(A<0||!A){A=this.initGId}var C=phgaConfig.cateXMLURL;if(B){C+="?"+Math.random()}return jaw.ajax({url:C,success:jaw.PhotoGallery.readXML.readGroupXML,cache:true})},preLoadImgQueue:[],preLoadTempImg:(new Image),preLoadDone:false,startPreLoadImg:function(F){if(F&&this.preLoadImgNumber==0){return }var H=this.currentImgNode,C=this.currentGroup.imgNodeList,B=+H.getAttribute("index")+1;this.preLoadImgQueue=[];var E=B,A=B+this.preLoadImgNumber<C.length?(B+this.preLoadImgNumber):C.length;for(;E<A;E++){var G=C[E];if(G&&G.nodeType){this.preLoadImgQueue.push(G)}}var D=function(){var I=jaw.PhotoGallery.preLoadImgQueue;if(I.length){var J=I.shift();jaw.PhotoGallery.preLoadTempImg.onload=jaw.PhotoGallery.preLoadTempImg.onerror=function(){D()};jaw.PhotoGallery.preLoadTempImg.src=jaw.PhotoGallery.getImageURL(J)}};D()},getImageURL:function(E){var B,D=jaw.PhotoGallery.viewModule,A=jaw.PhotoGallery.largeScreen;if(E&&E.nodeType){if(D=="s"){B=E.getAttribute("url")}else{if(D=="b"){B=E.getAttribute("url2");if(!B||A){var C=E.getAttribute("url2");B=C?C:B}}}}return B},reload:function(A){if(typeof A=="string"){window.location.href=A;window.location.reload()}},readXML:{cacheImage:(new Image),readGroupXML:function(I,F){if(I){var G=I.documentElement,C=G.getAttribute("id"),B=G.getAttribute("t"),A=I.getElementsByTagName("item");var D=0;len=A.length,__imgNodeList=[];for(;D<len;D++){var H=A[D];if(H&&!isNaN(H.getAttribute("id"))){__imgNodeList.push(H)}}A=__imgNodeList;if(jaw.PhotoGallery.viewModule!="r"){jaw.PhotoGallery.readXML.cacheImage.src=jaw.PhotoGallery.getImageURL(A[0])}var E={id:C,name:B,imgNodeList:A};if(F==undefined){jaw.PhotoGallery.initGroup(E)}else{if(F<0){jaw.PhotoGallery.previousGroup=E;jaw.PhotoGallery.setPreviousGroupLink()}else{jaw.PhotoGallery.nextGroup=E;jaw.PhotoGallery.setNextGroupLink()}}}},readCateXML:function(K){if(K){var A=K.getElementsByTagName("group");var D={id:jaw.PhotoGallery.initGId,count:0};var B=undefined;for(var G=0,I=A.length;G<I;G++){var C=A[G];if(C&&C.nodeType==1){var E=C.getAttribute("id"),H=C.getAttribute("pcount");var F={id:E,count:H};if(E==jaw.PhotoGallery.initGId){B=G}jaw.PhotoGallery.groupArray.push(F)}}if(B!=undefined){var J=jaw.PhotoGallery.groupArray.splice(0,B);jaw.PhotoGallery.groupArray=jaw.PhotoGallery.groupArray.concat(J);}else{jaw.PhotoGallery.groupArray.unshift(D)}}}},switchViewModule:function(A){var B=jaw.PhotoGallery.currentGroup.id,C=jaw.PhotoGallery.currentImgNode?jaw.PhotoGallery.currentImgNode.getAttribute("id"):-1,D="m="+A+"&g="+B;if(C>0){D+="&p="+C}window.location.hash=D;window.location.reload()},setCurrentImgNode:function(A){jaw.PhotoGallery.currentImgNode=A;var B=jaw.PhotoGallery.elem;if(jaw.PhotoGallery.hasDownloadFeature&&B.downloadImage){B.downloadImage.href=A.getAttribute("url")}},setLocationHash:function(){if(this.isSyncURL){var A=jaw.PhotoGallery.currentGroup.id,B=jaw.PhotoGallery.currentImgNode.getAttribute("id"),C=jaw.PhotoGallery.viewModule,D="m="+C+"&g="+A+"&p="+B;window.location.hash=D}},setPageOfCate:function(){var B=jaw.PhotoGallery.elem.pageofcate;if(B&&B.nodeType){var A=jaw.PhotoGallery.getCurrentPicIndex();B.innerHTML="<span>"+(+A+1)+"</span>/"+jaw.PhotoGallery.currentGroup.imgNodeList.length}},setDocumentTitle:function(){var B=jaw.PhotoGallery.currentImgNode;if(B&&B.nodeType){var A=B.getAttribute("t");if(!A){A=jaw.PhotoGallery.currentGroup.name}document.title=jaw.PhotoGallery.name+"-"+A+""}},setPreviousGroupLink:function(){var C=jaw.PhotoGallery.elem.previousGroupLink;if(C){var A=jaw.PhotoGallery.previousGroup;if(A){var B="\u4e0a\u4e00\u7ec4:"+A.name;C.innerHTML=B;C.title=B;C.onclick=function(){return jaw.PhotoGallery.init(A.id)}}else{C.onclick=null;C.innerHTML=""}}},setNextGroupLink:function(){var A=jaw.PhotoGallery.elem.nextGroupLink;if(A&&A.nodeType){var C=jaw.PhotoGallery.nextGroup;if(C){var B="\u4e0b\u4e00\u7ec4:"+C.name;A.innerHTML=B;A.title=B;A.onclick=function(){return jaw.PhotoGallery.init(C.id)}}else{A.onclick=null;A.innerHTML=""}}},viewImageInfo:function(){var D=jaw.PhotoGallery.currentImgNode;if(D){var F=jaw.browser.ie?D.text:D.textContent,E=jaw.PhotoGallery.currentGroup.name,C=jaw.PhotoGallery.elem;C.picText.innerHTML=F;var B=D.getAttribute("t");B=B||E;if(C.picTitle&&C.picTitle.nodeType){C.picTitle.innerHTML=B}}var A=D.getAttribute("id");this.callPV(A)},setTH:function(){var B=$("thumbnailBtn");if(B&&B.nodeType){var A=jaw.PhotoGallery.currentGroup.id;B.title="\u7f29\u7565\u56fe";B.onclick=function(){location.hash="#m=r&g="+A;window.location.reload()}}},viewGroupInfo:function(){var E=jaw.PhotoGallery.currentGroup.name;document.title=jaw.PhotoGallery.name+":"+E+"";var B=jaw.PhotoGallery.elem.groupTitle;if(B&&B.nodeType){B.innerHTML=E}var C=jaw.PhotoGallery.elem.groupInfo;if(C&&C.nodeType){if(C.style.display=="none"){C.style.display=""}C.innerHTML=E;var A=100,D=30;if(typeof timer!="undefined"&&timer!=null){clearInterval(timer);timer=null}timer=setInterval(function(){if(jaw.browser.ie){C.style.filter="alpha(opacity="+(A)+")"}else{C.style.opacity=A/100}A-=2;if(A<=0){clearInterval(timer);timer=null}},D)}},showPicCallback:function(){jaw.PhotoGallery.startPreLoadImg();jaw.PhotoGallery.setLocationHash();jaw.PhotoGallery.viewImageInfo();jaw.PhotoGallery.setPageOfCate();jaw.PhotoGallery.setDocumentTitle();jaw.PhotoGallery.Favor.letsUp();jaw.PhotoGallery.flash.notifyFlash()},initGroup:function(L,Y){if(L){var C=(jaw.PhotoGallery.currentGroup=L),O=jaw.PhotoGallery,T=jaw.PhotoGallery.viewModule,W=$("bigImageModule"),J=$("previewModule");var E=C.imgNodeList;if(E&&E.length){var Z=0,D=E.length,N=C.id;if(T=="r"){var b=O.elem.loadingBorder;if(b&&b.nodeType){b.style.display="none"}O.elem.upArrow.onclick=function(){jaw.PhotoGallery.show.up();return false};O.elem.downArrow.onclick=function(){jaw.PhotoGallery.show.down();return false};var A=O.elem.previewImageList;if(A&&A.nodeType){A.innerHTML="";for(;Z<D;Z++){var U=E[Z],S=document.createElement("li"),G=U.getAttribute("id"),H=U.getAttribute("cover"),X=location.href.split("#")[0]+"#g="+N+"&p="+G;S.innerHTML="<a hidefocus='true' href='javascript:jaw.PhotoGallery.reload(\""+X+"\");'><i></i><img src='"+H+"' width='170' height='113'/></a>";S.setAttribute("href",X);A.appendChild(S);S.onmouseover=function(){jaw.addClass(this,"current")};S.onmouseout=function(){jaw.removeClass(this,"current")};if(jaw.browser.ie6){S.onclick=function(){window.location.href=this.getAttribute("href");window.location.reload()}}}}}else{var c=C.groupTitle,V;if(Y){jaw.PhotoGallery.setCurrentImgNode(E[E.length-1])}else{if(!jaw.PhotoGallery.currentImgNode){for(;Z<D;Z++){var Q=E[Z];if(O.initPId==Q.getAttribute("id")){jaw.PhotoGallery.setCurrentImgNode(Q);break}}}if(!jaw.PhotoGallery.currentImgNode){jaw.PhotoGallery.setCurrentImgNode(E[0])}}var K=jaw.PhotoGallery.elem.mainPic,P=jaw.PhotoGallery.elem.leftArrow,R=jaw.PhotoGallery.elem.rightArrow,a=jaw.PhotoGallery.elem.maskLayer;if(K&&K.nodeType){var B=jaw.PhotoGallery.currentImgNode;imgURL=jaw.PhotoGallery.getImageURL(B);K.onload=function(){this.removeAttribute("err");var f=jaw.PhotoGallery.elem.loadingBorder;if(f&&f.nodeType){f.style.display="none"}};K.onerror=function(){var f=this.getAttribute("err");if(!f){this.setAttribute("err","1");this.src=jaw.PhotoGallery.currentImgNode.getAttribute("url2")}};K.src=imgURL;P.onclick=function(){jaw.PhotoGallery.show.previous();return false};R.onclick=function(){jaw.PhotoGallery.show.next();return false};if(a&&a.nodeType){a.onclick=function(){jaw.PhotoGallery.show.next();return false}}else{K.style.cursor="pointer";K.onclick=function(){jaw.PhotoGallery.show.next();return false}}jaw.PhotoGallery.showPicCallback();jaw.PhotoGallery.indexImage.init()}}jaw.PhotoGallery.viewGroupInfo();jaw.PhotoGallery.setTH();var d=O.groupArray.slice(),F=O.getCurrentGroupIndex(),I=F-1,e=F+1;if(!(I<0)){var L=d[I];if(L&&L.id!=undefined){var M="group-"+L.id+".xml";jaw.ajax({url:M,success:jaw.PhotoGallery.readXML.readGroupXML,argu:-1,cache:true})}}else{O.previousGroup=null;O.setPreviousGroupLink()}if(e<d.length){var L=d[e];if(L&&L.id!=undefined){var M="group-"+L.id+".xml";jaw.ajax({url:M,success:jaw.PhotoGallery.readXML.readGroupXML,argu:1,cache:true})}}else{O.nextGroup=null;O.setNextGroupLink()}}}},getCurrentPicIndex:function(){var A=jaw.PhotoGallery.currentImgNode.getAttribute("index");return A},getCurrentGroupIndex:function(){var B=jaw.PhotoGallery.currentGroup.id,A=jaw.PhotoGallery.groupArray,C=0,D=A.length,E=0;for(;C<D;C++){if(A[C].id==B){E=C;break}}return E},indexImage:{prefix:"pgImage",historyImage:null,totalPage:0,currentPage:0,indexIMGBorder:null,preIndexIMGPage:null,nextIndexIMGPage:null,setButton:function(){var A=jaw.PhotoGallery.indexImage;var C=A.preIndexIMGPage,B=A.nextIndexIMGPage;if(A.currentPage==0){jaw.Elem.hide(C)}else{jaw.Elem.show(C)}if(A.currentPage==A.totalPage-1){jaw.Elem.hide(B)}else{jaw.Elem.show(B)}},gotoPage:function(D){var B=jaw.PhotoGallery.indexImage;var A=jaw.PhotoGallery.currentGroup.id;var E=jaw.PhotoGallery.getCurrentPicIndex();var F=B.preIndexIMGPage,C=B.nextIndexIMGPage;if(D>=0&&D<B.totalPage){jaw.PhotoGallery.indexImage.currentPage=D;B.draw()}},show:function(F){var G=jaw.PhotoGallery.indexImage;var E=jaw.PhotoGallery.currentGroup.id;var C=Math.floor(F/jaw.PhotoGallery.indexImageNumber);G.gotoPage(C);var A=G.historyImage;if(A){jaw.removeClass(A,"current")}var D=G.prefix+"_"+E+"_"+F;var H=$(D);if(H&&H.nodeType){jaw.addClass(H,"current");jaw.PhotoGallery.indexImage.historyImage=H}var I=jaw.getSWFObject("isp_a_980x25");if(I){var B=F-C*jaw.PhotoGallery.indexImageNumber+1;I.SetVariable("ad_point",B)}},draw:function(){var M=jaw.PhotoGallery.indexImage;var C=M.indexIMGBorder;if(C&&C.nodeType){C.innerHTML="";var R=M.prefix;var A=jaw.PhotoGallery.getCurrentPicIndex(),K=jaw.PhotoGallery.indexImageNumber;var B=document.createDocumentFragment(),J=jaw.PhotoGallery.currentGroup.imgNodeList,N=jaw.PhotoGallery.currentGroup.id,S=M.currentPage,I=M.totalPage;var O=S+1<=I?S+1:I;var U=S*K,H=O*K;for(;U<H;U++){var Q=J[U];if(Q&&Q.nodeType){var G=Q.getAttribute("url2");var F=document.createElement("DIV");F.className="scrollerImageArea";var D=document.createElement("DIV");D.className="scrollerImage";D.id=M.prefix+"_"+N+"_"+U;D.setAttribute("index",U);D.onclick=function(){var W=M.historyImage;if(!W){var X=jaw.PhotoGallery.getCurrentPicIndex();W=$(M.prefix+"_"+N+"_"+X)}if(W&&W.nodeType){jaw.removeClass(W,"current")}var V=this.getAttribute("index");jaw.PhotoGallery.show.showMainPic(+V);jaw.addClass(this,"current");M.historyImage=this};if(U==A){D.className="scrollerImage current";jaw.PhotoGallery.indexImage.historyImage=D;var P=jaw.getSWFObject("isp_a_980x25");if(P){var E=U-S*jaw.PhotoGallery.indexImageNumber+1;P.SetVariable("ad_point",E)}}var L=document.createElement("div");var T="width:100%;height:100%;background:url("+G+") no-repeat center center";if(jaw.browser.ie){L.style.cssText=T}else{L.setAttribute("style",T)}F.appendChild(D);D.appendChild(L);B.appendChild(F)}C.appendChild(B)}}this.setButton()},init:function(){var C=jaw.PhotoGallery.indexImage;if(!C.indexIMGBorder){C.indexIMGBorder=$("indexIMGBorder")}if(!C.preIndexIMGPage){C.preIndexIMGPage=$("preIndexIMGPage")}if(!C.nextIndexIMGPage){C.nextIndexIMGPage=$("nextIndexIMGPage")}var B=jaw.PhotoGallery.currentGroup.imgNodeList.length,A=jaw.PhotoGallery.indexImageNumber,E=jaw.PhotoGallery.getCurrentPicIndex();jaw.PhotoGallery.indexImage.totalPage=Math.ceil(B/A);jaw.PhotoGallery.indexImage.currentPage=Math.floor(E/A);jaw.PhotoGallery.indexImage.draw();var F=C.preIndexIMGPage,D=C.nextIndexIMGPage;if(F&&D){F.onclick=function(){jaw.PhotoGallery.indexImage.previous()};D.onclick=function(){jaw.PhotoGallery.indexImage.next()}}},previous:function(){var A=this.currentPage-1;if(A>=0&&A<this.totalPage&&A!=this.currentPage){return this.gotoPage(A)}},next:function(){var A=this.currentPage+1;if(A>=0&&A<this.totalPage&&A!=this.currentPage){return this.gotoPage(A)}}},show:{up:function(){var A=jaw.PhotoGallery.elem.previewImageList;if(A&&A.nodeType){A.parentNode.scrollTop-=192}},down:function(){var A=jaw.PhotoGallery.elem.previewImageList;if(A&&A.nodeType){A.parentNode.scrollTop+=192}},next:function(){var B=jaw.PhotoGallery.currentImgNode,A=B.getAttribute("index");return jaw.PhotoGallery.show.showMainPic(+A+1)},previous:function(){var B=jaw.PhotoGallery.currentImgNode,A=B.getAttribute("index");return jaw.PhotoGallery.show.showMainPic(A-1)},showMainPic:function(B){B=typeof B=="number"?B:0;if(B<0){if(!jaw.PhotoGallery.previousGroup){return jaw.PhotoGallery.exit()}else{jaw.PhotoGallery.currentImgNode=null;return jaw.PhotoGallery.initGroup(jaw.PhotoGallery.previousGroup,true)}}else{var E=jaw.PhotoGallery.currentGroup,G=E.imgNodeList;if(G){var D=jaw.PhotoGallery.elem.mainPic,C=G.length;if(B!=C){var F=G[B];if(F&&F.nodeType){jaw.PhotoGallery.setCurrentImgNode(F);var A=jaw.PhotoGallery.getImageURL(F);D.src=A;jaw.PhotoGallery.showPicCallback();jaw.PhotoGallery.indexImage.show(B)}}else{if(!jaw.PhotoGallery.nextGroup){return jaw.PhotoGallery.exit()}else{jaw.PhotoGallery.currentImgNode=null;jaw.PhotoGallery.Research.view()}}}}}},Research:{resElem:undefined,forceHide:!!jaw.cookie.get("g-research"),init:function(){if(this.forceHide){return }var C=window.location.host;var A=$("go-research");if(A&&A.nodeType){var B=$("out-research");if(B&&B.nodeType){B.onclick=function(){jaw.PhotoGallery.Research.close(1)}}if(C=="pic.news.royalerp.com"){A.href="http://news.royalerp.com/20090318/n262874024.shtml"}else{if(C=="pic.yule.royalerp.com"){A.href="http://yule.royalerp.com/20090318/n262873818.shtml"}else{if(C=="pic.sports.royalerp.com"){A.href="http://sports.royalerp.com/20090319/n262884541.shtml"}else{if(C=="pic.women.royalerp.com"){A.href="http://women.royalerp.com/20090318/n262874597.shtml"}else{return }}}}}else{return }this.resElem=jaw.PhotoGallery.elem.resElem},view:function(){if(this.resElem){jaw.Elem.show(this.resElem);var A=Math.floor(Math.random()*5+1);if(A==5){jaw.Elem.show(this.resElem)}}else{this.exit()}},close:function(A){if(A){jaw.cookie.set("g-research","no-show",24*30,"/",window.location.host)}else{jaw.Elem.hide(this.resElem);this.exit()}},exit:function(){return jaw.PhotoGallery.initGroup(jaw.PhotoGallery.nextGroup)}},RecomPic:{setData:function(M){var H=$("pg_recompic");if(M&&H&&H.nodeType){var G=M.getElementsByTagName("item"),B=G.length,E=0,C=H.getElementsByTagName("ul")[0];C.innerHTMl="";for(;E<B;E++){var L=G[E],D=L.getAttribute("gid");if(L&&L.nodeType){var I=document.createElement("li"),F=new StringBuilder(),A=L.text||L.textContent,J=L.getAttribute("tit"),K=L.getAttribute("Spic_url");I.setAttribute("gid",D);F.append("<a href=\"").append(A).append("\" target=\"_blank\"><span class=\"middle\"></span>").append("<img src=\"").append(K).append("\"/>").append("</a>").append("<span><a href=\"").append(A).append("\" target=\"_blank\">").append(J).append("</a></span>");I.innerHTML=F;I.style.display="none";C.appendChild(I)}}jaw.PhotoGallery.RecomPic.view()}},view:function(){var H=$("pg_recompic");if(H){var J=H.getElementsByTagName("li");if(J&&J.length){var E=0,D=0,B=J.length,F=jaw.PhotoGallery.currentGroup?jaw.PhotoGallery.currentGroup.id:jaw.PhotoGallery.initGId,A={};for(;E<B;E++){J[E].style.display="none"}while(D<3){var G=Math.floor(Math.random()*B+1)-1,I=J[G],C=I.getAttribute("gid");if(C!=F&&A[G]==undefined){I.style.display="";A[G]=G;D++}}}}}},Favor:{done:false,favorGroupId:0,addURL:"",countURL:"",upCount:0,letsUp:function(A){if(typeof window["upResult"]!="function"){window["upResult"]=jaw.PhotoGallery.Favor.upResult}var B,D=jaw.PhotoGallery.currentGroup.id;if(A==undefined){B=this.countURL.replace("{$1}",D)}else{B=this.addURL.replace("{$1}",D)+"&r="+new Date().getTime()}var C=false;if(!A){if(this.favorGroupId==0||D!=this.favorGroupId){C=false;jaw.PhotoGallery.Favor.done=false}else{if(D==this.favorGroupId){if(jaw.PhotoGallery.Favor.done){C=true}else{C=false}}}}else{C=true}if(B){jaw.evalScript({url:B});jaw.PhotoGallery.Favor.upCallback(C)}this.favorGroupId=D},upCallback:function(A){var B=$("favButton");if(!A){jaw.removeClass(B,"disabled");B.onclick=function(){jaw.PhotoGallery.Favor.done=true;jaw.PhotoGallery.Favor.letsUp("up");var C=$("upCount");C.innerHTML=1+(+C.innerHTML);return false}}else{jaw.addClass(B,"disabled");B.onclick=function(){return false}}},upResult:function(B){if(B){var A=$("upCount"),C=1;if(A){try{C=+B}catch(D){}if(C>0){jaw.PhotoGallery.Favor.upCount=C;A.innerHTML=C}}}else{if(typeof window["js2fla"]=="function"){js2fla("upcount|"+jaw.PhotoGallery.Favor.upCount)}}}},bindKeyBoardUpEvent:function(){var B=window.event||arguments.callee.caller.arguments[0],C=B.target||B.srcElement,E=B.keyCode||B.which,D=jaw.PhotoGallery.currentImgNode;if(D&&D.nodeType){var A=D.getAttribute("index");if(E==37){jaw.PhotoGallery.show.previous()}else{if(E==39){jaw.PhotoGallery.show.next()}}}},keyBoardEvent:(function(){document.onkeyup=function(){return jaw.PhotoGallery.bindKeyBoardUpEvent()}})(),pvCalled:false,callPV:function(E){var D="http://pv.biz.itc.cn/pv_pic.gif?picId="+E+"&"+Math.random();var C=(new Image);C.src=D;if(!jaw.PhotoGallery.pvCalled){jaw.PhotoGallery.pvCalled=true;return }var G=escape(+(new Date)*1000+Math.round(Math.random()*1000)),F=encodeURI(document.referrer);var B="http://pv.royalerp.com/pv.gif?t?="+G+"?r?="+F;var A=(new Image);A.src=B;if(typeof vjEventTrack=="function"){vjEventTrack("")}},clickAnalysis:function(B){if(B!=undefined){var A="http://pv.biz.itc.cn/pv_pic.gif?r="+B+"&"+Math.random();(new Image).src=A}}};window.addDOMLoadEvent(function(){var B=$("pg_indexImageArea");var A=$("controlIIArea");var C=$("pg_textArea");if(A&&A.nodeType){A.onclick=function(){if(B.style.display!="none"){jaw.Elem.hide(B);jaw.addClass(C,"text-area-b");this.parentNode.className="show";var D=jaw.getSWFObject("isp_a_980x25");if(D){D.SetVariable("ad_point",0)}}else{jaw.Elem.show(B);jaw.removeClass(C,"text-area-b");this.parentNode.className="hide"}}};return jaw.PhotoGallery.readConfig()});window.ondblclick=function(){return false}

