<!--
////////////Powered by haiyun @ haiyun.net

var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var enableanchorlink=0 //Enable or disable the anchor link when clicked on? (1=e, 0=d)
var hidemenu_onclick=1 //hide menu when user clicks within menu? (1=yes, 0=no)

/////No further editting needed

var ie5=document.all
var ns6=document.getElementById&&!document.all

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function showhide(obj, e, visible, hidden){
if (ie5||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie5 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var windowedge=ie5 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
return edgeoffset
}

function dropdownmenu(obj, e, dropmenuID, imgid, imgurl)
{
	if (window.event) event.cancelBubble=true
	else if (e.stopPropagation) e.stopPropagation()
	
	if (typeof dropmenuobj!="undefined") //hide previous menu
		dropmenuobj.style.visibility="hidden"
	clearhidemenu()
	
	if (ie5||ns6)
	{
		obj.onmouseout=delayhidemenu
		dropmenuobj=document.getElementById(dropmenuID)
		if (hidemenu_onclick) dropmenuobj.onclick=function(){dropmenuobj.style.visibility='hidden'}
		dropmenuobj.onmouseover=clearhidemenu
		dropmenuobj.onmouseout=ie5? function(){ dynamichide(event)} : function(event){ dynamichide(event)}
		showhide(dropmenuobj.style, e, "visible", "hidden")
		dropmenuobj.x=getposOffset(obj, "left")
		dropmenuobj.y=getposOffset(obj, "top")
		dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
		dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
	}
	
	MM_swapImage(imgid, '', imgurl,1)
	return clickreturnvalue()
}

function clickreturnvalue(){
if ((ie5||ns6) && !enableanchorlink) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie5&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("dropmenuobj.style.visibility='hidden'",disappeardelay)
MM_swapImgRestore()
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


/////////////////////////Check Email Begin////////////////////////////////////////////
function CheckForm(){
	if(document.UserData.name.value==""){
		alert("Please enter your name!");
		return false;
	}
   if(document.UserData.email.value == "" ){
        alert("Please enter your email!");
		return false;
      } 
  
	if (document.UserData.email.value!=""){
		if(emailCheck(UserData.email.value)==false){
			return false;}
			}
	return true;
}
function emailCheck(mailstr) {
	txt=mailstr;
	if (txt.indexOf("@")<2){ 

	alert("The email address is invalid!");
	return false;
	}

	if (txt.indexOf(".")<4){

	alert("The email address is invalid!");
	return false;
	}

}
///////////////////////Check Email Over////////////////////////////////////////////////////

////////////////////////Popup Function Begin////////////////////////////

function popup(filename, winname){
newWin=window.open(filename, winname, 'resizable=yes,scrollbars=yes,toolbar=no,width=720,height=600');
newWin.moveTo((window.screen.width)/2-360,0);
newWin.focus();
return;}

////////////////////////Popup Function End////////////////////////////


///////////////////////load flash with values///////////////////////////////
function LoadFlashBanner(url,hpart)
{

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="700" height="168" id="about_hkrita_banner" align="middle">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="movie" value="'+ url +'" />' );///+"swf/about_hkrita_banner.swf" />');
document.write('<param name=FlashVars VALUE="highlight_part='+hpart+'&link1=about_hkrita.html&link2=message.html&link3=vision_mission.html&link4=org_stucture.html&link5=people.html">');
document.write('<param name="wmode" value="transparent" >');
document.write('<param name="quality" value="high" />');
document.write('<param name="bgcolor" value="#ffffff" />');
document.write('<embed src="'+ url +'" quality="high" bgcolor="#ffffff" width="700" height="168" wmode="transparent" name="about_hkrita_banner" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="highlight_part='+hpart+'&link1=about_hkrita.html&link2=message.html&link3=vision_mission.html&link4=org_stucture.html&link5=people.html"/>');
document.write('</object>');
}
/////////////////////////////////////////////////////

///////////////////////load flash with values///////////////////////////////
function LoadNewsBanner(hpart)
{

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="700" height="168" id="news_banner" align="middle">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="movie" value="swf/news_banner.swf" />' );///+"swf/about_hkrita_banner.swf" />');
document.write('<param name=FlashVars VALUE="highlight_part='+hpart+'&link1=news.asp&link2=enewsletter.asp&link3=Press_release.asp">');
document.write('<param name="wmode" value="transparent" >');
document.write('<param name="quality" value="high" />');
document.write('<param name="bgcolor" value="#ffffff" />');
document.write('<embed src="swf/news_banner.swf" quality="high" bgcolor="#ffffff" width="700" height="168" wmode="transparent" name="news_banner" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="highlight_part='+hpart+'&link1=news.asp&link2=enewsletter.asp&link3=Press_release.asp"/>');
document.write('</object>');
}
/////////////////////////////////////////////////////

///////////////////////load flash without values///////////////////////////////
function LoadFlash(url,width,height)
{

document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+ width +'" height="'+ height +'">');
document.write('<param name="movie" value="'+ url +'" />' );
document.write('<param name="wmode" value="transparent" >');
document.write('<param name="wmode" value="opaque" >');
document.write('<param name="quality" value="high" />');
document.write('<embed src="'+ url +'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"  wmode="transparent" width="'+ width +'" height="'+ height +'"></embed>');
document.write('</object>');
}
/////////////////////////////////////////////////////

///////////////////////load flash head///////////////////////////////
function LoadFlashHead()
{

document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="780" height="78">');
document.write('<param name="movie" value="swf/header.swf">' );
document.write('<param name=FlashVars VALUE="link1=index.asp&link2=../index.asp?language=E">');
document.write('<param name="wmode" value="transparent" >');
document.write('<param name="wmode" value="opaque" >');
document.write('<param name="quality" value="high" />');
document.write('<PARAM NAME=FlashVars VALUE="link1=index.asp">');
document.write('<embed src="swf/header.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="780" height="78"   wmode="transparent"  FlashVars="link1=index.asp&link2=../index.asp?language=E"></embed>');
document.write('</object>');
}
/////////////////////////////////////////////////////

///////////////////////load project flash with values///////////////////////////////
function LoadPrjBanner(hpart)
{

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="700" height="168" id="news_banner" align="middle">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="movie" value="swf/project_banner.swf" />' )
document.write('<param name=FlashVars VALUE="highlight_part='+hpart+'&link1=project_guide.html&link2=project_App.html&link3=project_current.html">');
document.write('<param name="wmode" value="transparent" >');
document.write('<param name="wmode" value="opaque" >');
document.write('<param name="quality" value="high" />');
document.write('<param name="bgcolor" value="#ffffff" />');
document.write('<embed src="swf/project_banner.swf" quality="high" bgcolor="#ffffff" width="700" height="168"  wmode="transparent" name="news_banner" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="highlight_part='+hpart+'&link1=project_guide.html&link2=project_App.html"/>');
document.write('</object>');
}
/////////////////////////////////////////////////////
function chglng(strLanguage)
{
	window.location="../index.asp?language="+strLanguage
}