// JavaScript Document
showtime = 2;
function changtab(id,count,clear){
	for(i=1;i<=count;i++){
		document.getElementById('tab_'+i).className='tab_nomal';
	}
	document.getElementById('tab_'+id).className='tab_select';
	valueHtml = document.getElementById('content_'+id).innerHTML;
	//alert(removeHTMLTags(valueHtml));
	document.getElementById('tab_content').innerHTML = valueHtml;
	if(clear==1) clearInterval(showtime);
}

function removeHTMLTags(strInputCode){
	strInputCode = strInputCode.replace(/&(lt|gt);/g, function (strMatch, p1){
		return (p1 == "lt")? "<" : ">";
	});
	var strTagStrippedText = strInputCode.replace(/<\/?[^>]+(>|$)/g, "");
	alert(strTagStrippedText);
}

function mouseout(id,count){
	showtime = setInterval(function() {changtab(id,count,1)},1000);
}

function tabdetail(id,count, tabid, tablabel){
	for(i=1;i<=count;i++){
		document.getElementById(tablabel+'_detail_'+i).className='tab_nomal';
		document.getElementById(tabid+'_'+i).style.display='none';
	}
	document.getElementById(tablabel+'_detail_'+id).className='tab_select';
	document.getElementById(tabid+'_'+id).style.display='block';
}

function start(id){
		for(i=1;i<=10;i++){
			if(i<=id){
				document.write('<img src="/images/star1.gif" border="0" />');
			}else{
				document.write('<img src="/images/star0.gif" border="0" />');
			}
		}
}

function showmenu(mnname,mnlink,mnulever){
	if(mnulever==2){
		stm_aix("p2i0","p0i0",[1,mnname,"","",-1,-1,0,mnlink,"","","","","",0,0,0,"","",0,0,0,0,0,"#ffffff",0,"#D91102",0,"","",0,0,1,1,"#F27400","#ffffff","#F27400","#ffffff","12px Arial","12px Arial",0,0],130);
	}else{
		stm_bm(["",400,"","/images/space.gif",0,"","",0,0,140,0,20,0,0,0,""],this);
		stm_bp("p0",[1,0,0,0,0,0,0,0,100,"",-2,"",-2,0,0,0,"","","",0,0,0,""]);
		stm_ai("p0i0",[1,"<a href='"+mnlink+"'>"+mnname+"</a>","","",-1,-1,0,"","","","","","",0,0,0,"","",0,0,0,0,1,"#FFFFF7",1,"#B5BED6",1,"","",0,0,0,0,"#FFFFF7","#000000","#FFFFFF","#FFCC00","11px Bold Tahoma","11px Bold Tahoma",0,0]);
		stm_bpx("p1","p0",[1,4,0,0,0,3,0,0,100,"",-2,"",-2,100,0,0,"#999999","#FFFFF7","",3,0,0]);
	}
}
function closemenu(){
	stm_ep();
	stm_ep();
	stm_sc(1,["transparent","transparent","","",3,3,0,0,"#FFFFF7","#000000","","",7,9,0,"","",7,9,0,0,200]);
	stm_em();
}

function setTitle( title ){
	if( parent && parent._setTitle ){
		parent._setTitle( title );
	}
	
	document.title = title;
}

function SearchOnFocus(field, txttitle)
{
	if(field.value==txttitle)
	{
		field.value = '';
	}
}

function SearchOnBlur(field, txttitle)
{
	if(field.value=='')
	{
		field.value=txttitle;
	}
}
