/*@cc_on
@if ( @_jscript )
	function hasClass(c,e) {
		var rx = new RegExp("(^|\\s)" + c + "(\\s|$)");
		return ( e.className && rx.test(e.className) );
		return false;
	}

	function findElements(c,e) {
		var rv = [];
		var rx = new RegExp("(^|\\s)" + c + "(\\s|$)");
		var ln = e.childNodes.length;
		for( var i = 0; i < ln; i++ ) {
			var cn = e.childNodes[i];
			if( cn.nodeType == 1 ) {
				if( cn.className && rx.test(cn.className) )
					rv[rv.length] = e.childNodes[i];
				rv = rv.concat(findElements(c,cn));
			}
		}
		return rv;
	}

	function showhide(e,show) { 
		if( e ) e.style.display = show?'block':'none'; 
	}

	function init() {
		var S = findElements('submenu',document.body);
		for( var s in S ) {
			var es = S[s];
			if( es.id.indexOf('_') < 0 ) continue;
			var id = es.id.substr(es.id.indexOf('_')+1,es.id.length);
			var em = document.getElementById('mainmenu_'+id);
			var emp= em.parentNode;
			if( id > 7 )
				es.style.top = em.offsetTop+emp.offsetTop-8;
			else
				es.style.top = parseInt(em.style.top?em.style.top:0)+25;
		}
		for( s in S ) S[s].style.display = 'none';

		var M = findElements('mainmenu',document.body);
		for( var m in M ) {
			var em = M[m];
			if( em.id.indexOf('_') >= 0 ) {
				em.onmouseover = function() {
					// show Submenu
					var id = this.id.substr(this.id.indexOf('_')+1,this.id.length);
					this.dohide = true;
					this.isover = true;
		
					var e = document.getElementById('submenu_'+id);
					showhide(e,true);
			
					var p = this.parentNode
					var pid = p.id.substr(p.id.indexOf('_')+1,p.id.length);
					if(pid) {
						var pm = document.getElementById('mainmenu_'+pid);
						if( pm ) { pm.isover = true; }
					}
	
					// keep submenu
					var self = this; 
					e.onmouseover = function() {
						self.dohide = false;
					}
					e.onmouseout = function() {
						var me = this;
						setTimeout(function() {
							var isover = self.isover;
							for( var i = 0; i < me.childNodes.length; i++ ) {
								if( me.childNodes[i].nodeType == 1 && me.childNodes[i].isover )
									isover = true;
							}
							if( !isover ) {
								self.dohide = true;
								self.onmouseout();
							}
						},10);
					}

					// text & background color
					var classes = this.className.split(' ');
					var hbgc = '';
					for( c in classes )
						if( classes[c].indexOf('hbgc:') == 0 ) hbgc = classes[c].split(':')[1];
					var a;
					for( var i = 0; i < this.childNodes.length; i++ ) if( this.childNodes[i].nodeType == 1 ) {
						a = this.childNodes[i];
						break;
					}
					if( a.id.indexOf('Active') < 0 ) {
						if( id > 5 ) a.style.color = hcol;
						a.style.backgroundColor = hbgc;
					}
				}
				em.onmouseout = function() {
					// hide Sbmenu
					var id = this.id.substr(this.id.indexOf('_')+1,this.id.length);
					this.isover = false;
	
					var p = this.parentNode
					var pid = p.id.substr(p.id.indexOf('_')+1,p.id.length);
					if(pid) {
						var pm = document.getElementById('mainmenu_'+pid);
						if( pm ) { pm.isover = false; }
					}
	
					var self = this;
					var e = document.getElementById('submenu_'+id);
					var p = this.parentNode;
					setTimeout(function() { 
						if(self.dohide)
							showhide(e,false);
						if( hasClass('submenu',p) )
							p.onmouseout();
						// text & background color
						var classes = self.className.split(' ');
						var bgc = '';
						var hbgc = '';
						for( c in classes ) {
							if( classes[c].indexOf('bgc:') == 0 )  bgc  = classes[c].split(':')[1];
							if( classes[c].indexOf('hbgc:') == 0 ) hbgc = classes[c].split(':')[1];
						}
						var a;
						for( var i = 0; i < self.childNodes.length; i++ ) if( self.childNodes[i].nodeType == 1 ) {
							a = self.childNodes[i];
							break;
						}
						if( a && a.id.indexOf('Active') < 0 ) {
							if( id > 5 ) a.style.color = (self.dohide)?col:hcol;
							a.style.backgroundColor = (self.dohide)?bgc:hbgc;
						}
					}, 10);
				}
			}
		}
	}

	document.write('<script id="__ie_onload" defer src="javascript:void(0)"></script>');
	var script = document.getElementById('__ie_onload');
	script.onreadystatechange = function() {
	    if (this.readyState == 'complete') {
	        init();
	    }
	};

@else */

/* @end
@*/


