var bRewrite=false;if(window.attachEvent){window.attachEvent('onload',rewrite_document);}else if(window.addEventListener){window.addEventListener('load',rewrite_document,false);window.addEventListener('pageshow',rewrite_document,false);if(get_browser()=="SA1"){window.addEventListener('unload',function(){},false);}}function rewrite_document(){if(bRewrite){return;}bRewrite=true;if(!document.getElementsByTagName){return;}var divs=document.getElementsByTagName('div');for(var i=0;i<divs.length;i++){var div=divs[i];var classes=div.className.split(" ");var bFlashContentBox=false;for(j=0;j<classes.length;j++){if(classes[j]=='flashContentBox'){bFlashContentBox=true;break;}}if(bFlashContentBox){var images=div.getElementsByTagName('img');if(images.length>0){var img=images[0];var path=img.src.split("/");var filename_el=path[path.length-1].split(".");filename_el[filename_el.length-1]="swf";var swfURL=path[0];for(j=1;j<path.length-1;j++){swfURL+="/"+path[j];}swfURL+="/"+filename_el.join(".");var swfWidth=img.width;var swfHeight=img.height;div.innerHTML=putSWF(swfURL,swfWidth,swfHeight,"#FFFFFF","flashMovie");}}}var anchors=document.getElementsByTagName('a');for(var i=0;i<anchors.length;i++){var a=anchors[i];var classes=a.className.split(" ");if(a.href){var bTargetBlank=false;var bPopupImage=false;var imgWidth=0;var imgHeight=0;for(var j=0;j<classes.length;j++){if(classes[j]=='popupNewWindow'){bTargetBlank=true;}else if(classes[j]=="popupImage"){bPopupImage=true;}else if(classes[j].substr(0,1)=="w"){imgWidth=classes[j].substr(1,9999);}else if(classes[j].substr(0,1)=="h"){imgHeight=classes[j].substr(1,9999);}}if(bTargetBlank){a.target='_blank';}if(bPopupImage&&imgWidth!=0&&imgHeight!=0){a.href='javascript:openImgWindow("'+a.href+'", '+imgWidth+', '+imgHeight+', "'+escape(a.title)+'");';}}}var images=document.getElementsByTagName('img');for(i=0;i<images.length;i++){var img=images[i];var classes=img.className.split(" ");var bRollOver=false;var bGoEntryForm=false;for(j=0;j<classes.length;j++){if(classes[j]=='rollOverButton'){bRollOver=true;break;}if(classes[j]=='goEntryForm'){bGoEntryForm=true;}}if(bGoEntryForm){path=img.src.split("/");filename=path[path.length-1].split(".");var target=new RegExp("_2$");if(!filename[0].match(target)){continue;}var activeFilename=filename[0].replace(target,"_0");var activeImg=path[0];for(j=1;j<path.length-1;j++){activeImg+="/"+path[j];}activeImg+="/"+activeFilename+"."+filename[1];img.src=activeImg;img.style.cursor="pointer";img.onclick=open_entryform;}if(bRollOver){var path=img.src.split("/");var filename=path[path.length-1].split(".");var target=new RegExp("_0$");if(!filename[0].match(target)){continue;}var rolloverFilename=filename[0].replace(target,"_1");var rolloverImg=path[0];for(j=1;j<path.length-1;j++){rolloverImg+="/"+path[j];}rolloverImg+="/"+rolloverFilename+"."+filename[1];img.srcMouseOut=img.src;img.srcMouseOver=rolloverImg;img.onmouseover=function(){this.src=this.srcMouseOver;};img.onmouseout=function(){this.src=this.srcMouseOut;};img.style.cursor="pointer";}}}function get_browser(){checkOP=window.opera;checkN6=document.getElementById;checkIE=document.all;checkN4=document.layers;if(checkOP){return"OP6";}else if(checkIE){return"IE4";}else if(checkN6){userAgent=navigator.userAgent;if(userAgent.indexOf("Safari")>=0){return"SA1";}return"NS6";}else if(myN4){return"NN4";}else{if(navigator.appName=="Netscape"){return"NS";}else if(navigator.appName=="Microsoft Internet Explorer"){return"IE";}}return"UNKNOWN";}function get_os(){platform=navigator.platform;if(platform>="Win"){return"WIN";}else if(platform>="Mac"){return"MAC";}return"UNKNOWM";}function btn_replace(btn,img){btn.src=img.src;}function openImgWindow(imgURL,imgWidth,imgHeight,titleStr){if(get_os()=="MAC"){newWin=window.open("","","toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+imgWidth+",height="+imgHeight);newWin.moveTo(10,10);}else{newWin=window.open("./","","toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+imgWidth+",height="+imgHeight);newWin.moveTo(10,10);}newWin.document.open();newWin.document.writeln("<html><head>");newWin.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=SHIFT_JIS">');newWin.document.writeln('<meta http-equiv="Content-Style-Type" content="text/css">');newWin.document.writeln('<meta http-equiv="Content-Script-Type" content="text/javascript">');newWin.document.writeln('<meta http-equiv="imagetoolbar" content="no">');newWin.document.writeln('<title>'+titleStr+'</title>');newWin.document.writeln('<style type="text/css">');newWin.document.writeln('<!--');newWin.document.writeln('* { margin:0px; paddingt:0px; }');newWin.document.writeln('-->');newWin.document.writeln('</style>');newWin.document.writeln('</head><body>');newWin.document.writeln('<img src="../../common/'+imgURL+'" width="'+imgWidth+'" height="'+imgHeight+'" alt="'+unescape(titleStr)+'" title="'+unescape(titleStr)+'" />');newWin.document.writeln('</body></html>');newWin.document.close();}function putSWF(win,swfURL,swfWidth,swfHeight,bgcolor,name){protocol=location.protocol;browser=get_browser();if(browser=="IE4"){browser="IE";}else{browser="OTHERS";}win.document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');win.document.writeln('        codebase="'+protocol+'//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');win.document.writeln('        width="'+swfWidth+'" height="'+swfHeight+'" id="'+name+'" align="">');win.document.writeln('   <param name="movie" value="'+swfURL+'">');win.document.writeln('   <param name="quality" value="high">');win.document.writeln('   <param name="bgcolor" value="'+bgcolor+'">');win.document.writeln('   <param name="FlashVars" value="browser='+browser+'">');win.document.writeln('   <embed src="../../common/'+swfURL+'" quality="high" bgcolor="'+bgcolor+'" width="'+swfWidth+'" height="'+swfHeight+'" name="'+name+'" align="" FlashVars="browser='+browser+'"');win.document.writeln('          type="application/x-shockwave-flash" pluginspage="'+protocol+'//www.macromedia.com/go/getflashplayer"></embed>');win.document.write('</object>');}