var prLocation="";


function processPRM(prmValue,prmType,langCode){
	if(prmType==0){
		prLocation = prmValue;
	}else{
		if(location.href.toString().search("/text/")!=-1){
			location = "index"+prLocation+".htm";			
		}else{
			if(langCode==1){
				location = "pressrelease"+prLocation+".htm";
			}else{
				location = "pressrelease"+prLocation+".htm";
			}
	   }
	}
}

function getPressReleaseMenu(langCode){
	var altText="GO";

	document.write('	  <div align="left">');	
		
	if(langCode==1){
		document.write('	  <b>新聞稿資料庫</b>');
		altText="去";
	}else{
		document.write('	  <b>Press Releases Archives</b>');
	}

	document.write('	  <br>');
	document.write('	  <form name="prmForm">');
	document.write('		 <select onChange="processPRM(this.options[selectedIndex].value,0)" name=prmBox>');

	if(langCode==1){
		document.write('		 <option value="">請選擇');
		document.write('		 <option value="">二○一一年');
		document.write('		 <option value="10">二○一○年');
		document.write('		 <option value="09">二○○九年');
		document.write('		 <option value="08">二○○八年');
		document.write('		 <option value="07">二○○七年');
		document.write('		 <option value="06">二○○六年');		
		document.write('		 <option value="05">二○○五年');
		document.write('		 <option value="04">二○○四年');
		document.write('		 <option value="03">二○○三年');
		document.write('		 <option value="02">二○○二年');
		document.write('		 <option value="01">二○○一年');
		document.write('		 <option value="00">二○○○年十二月');
	}else{
		document.write('		 <option value="">Please select');
		document.write('		 <option value="">Year 2011');
		document.write('		 <option value="10">Year 2010');
		document.write('		 <option value="09">Year 2009');
		document.write('		 <option value="08">Year 2008');
		document.write('		 <option value="07">Year 2007');
		document.write('		 <option value="06">Year 2006');
		document.write('		 <option value="05">Year 2005');
		document.write('		 <option value="04">Year 2004');
		document.write('		 <option value="03">Year 2003');
		document.write('		 <option value="02">Year 2002');
		document.write('		 <option value="01">Year 2001');
		document.write('		 <option value="00">Dec 2000');
	}	
	document.write('	     </select>');
	document.write('	     <input type="button" value="'+altText+'" onClick="processPRM(prLocation,1,'+langCode+');">');
	document.write('	  </form>');
	document.write('	  </div>');
}
