  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-26895632-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
  
  
//header js
var n=1,m=1,r=1,h=0;
var AutoPlayObj = null; 
AutoPlay(); 
function AutoPlay(){  
 clearInterval(AutoPlayObj); 
 AutoPlayObj = setInterval('tp_show();',3000); 
} 

function tp_show(){ 
	for(var i=1;i<=4;i++)
		{
			getID("banner_tp"+i).style.display="none";
			getID("banner_wz"+i).style.display="none";
			getID("a"+i).style.color="#666666";
		}
	h=n%4;
	m=n;
	if(h==0)
	h=4;
	getID("banner_tp"+h).style.display="block";
	getID("banner_wz"+h).style.display="block";
	getID("a"+h).style.color="white";
	n++;
	h=n%4;
	if(h==0)
		n=4;
	else
		n=h;
}


function getID(id){
    return window.document.getElementById?window.document.getElementById(id):null;
}

function fn_show_more(tid){
	clearInterval(AutoPlayObj);
	for(var i=1;i<=4;i++)
		{
			getID("banner_title"+i).style.display="none";
			getID("a"+i).style.color="#666666";			
		}
	getID("a"+m).style.color="white";
	getID(tid.replace("banner_no","banner_title")).style.display = "block";	
	getID(tid.replace("banner_no","a")).style.color="#99CCFF";	
}

function fn_show_out(){
	for(var i=1;i<=4;i++)
		{
			getID("banner_title"+i).style.display="none";
			getID("a"+i).style.color="#666666";			
		}	
	getID("a"+m).style.color="white";
	if(r==1)
		AutoPlay();
}

function fn_show_click(tid){
	for(var i=1;i<=4;i++)
		{
			getID("banner_tp"+i).style.display="none";
			getID("banner_wz"+i).style.display="none";
		}
	getID("a"+n).style.color="#666666";
	n=parseInt(tid.replace("banner_no",""));
	m=n;
	getID("a"+n).style.color="#99CCFF";
	getID("banner_tp"+n).style.display="block";
	getID("banner_wz"+n).style.display="block";
}

function fn_start(tid){
	if(r==1)
	{
		getID(tid).style.background="url(img/start.gif) center no-repeat";
		r=0;
		clearInterval(AutoPlayObj);
	}
	else{
		getID(tid).style.background="url(img/pause.gif) center no-repeat";
		r=1;		
		AutoPlay();
	}
}

//sidebar js
var nn=0,mm=0,rr=0,hh=0;
function getID(id){
    return window.document.getElementById?window.document.getElementById(id):null;
}

function fn_show(tid){
	for(var i=1;i<7;i++)
	{
		getID('li'+i).style.backgroundColor='#2e2e2e';
		getID('b'+i).style.background='url(http://www.chromeorebeneficiationplant.com/img/arrow3.gif) left center no-repeat';
		getID('b'+i).style.backgroundColor='#2e2e2e';
		getID('ul'+i).style.backgroundColor='#2e2e2e';
	}
	mm=parseInt(tid.replace('li',''));
	if(nn==mm && rr==1)
		{
			getID('ul'+nn).style.display='none';
			rr=0;
			hh=0;
		}
	else if (nn==mm && rr==0)
		{
			getID('ul'+nn).style.display='block';
			rr=1;
			hh=mm;
		}
	else if(nn!=mm)
	{
		for(var i=1;i<7;i++)
			getID('ul'+i).style.display='none';
		getID('ul'+mm).style.display='block';
		nn=mm;
		rr=1;
		hh=mm;
	}
	if(hh==0)
		{
			getID('li'+mm).style.backgroundColor='#2e2e2e';
			getID('b'+mm).style.background='url(http://www.chromeorebeneficiationplant.com/img/arrow3.gif) left center no-repeat';
			getID('b'+mm).style.backgroundColor='#2e2e2e';
		}		
	if(hh!=0)
		{
			getID('li'+mm).style.backgroundColor='#111111';
			getID('b'+mm).style.background='url(http://www.chromeorebeneficiationplant.com/img/arrow2.gif) left center no-repeat';
			getID('b'+mm).style.backgroundColor='#111111';
			getID('ul'+mm).style.backgroundColor='#111111';
		}
	
	
}

function fn_show_hover(tid){
	mm=parseInt(tid.replace('li',''));
	if(rr==0||(rr==1&&mm!=nn))
	{
		getID(tid).style.backgroundColor='#252525';
		getID('b'+mm).style.background='url(http://www.chromeorebeneficiationplant.com/img/arrow4.gif) left center no-repeat';
	}
}

function fn_show_out(tid){
	mm=parseInt(tid.replace('li',''));
	if(rr==0||(rr==1&&mm!=nn))
		{
			getID(tid).style.backgroundColor='#2e2e2e';
			getID('b'+mm).style.background='url(http://www.chromeorebeneficiationplant.com/img/arrow3.gif) left center no-repeat';
		}
}

function addFavorite(sURL, sTitle) { 
	try{ 
		window.external.addFavorite(sURL, sTitle); 
	} 
	catch (e){ 
		try{ 
		 window.sidebar.addPanel(sTitle, sURL, ""); 
		} 
		catch (e){ 
		} 
	} 
}




// JavaScript Document
window.onload = page_load;
document.write('<div class="fr" style="float:right;z-index:2000;position:fixed;right:20px;top:120px; border:none;display:block;_position:absolute;_top:expression(eval(document.documentElement.scrollTop+200));">'); 
document.write('<div id="lpButDivID-1320991921867"></div>');
document.write('<script type="text/javascript" charset="UTF-8" src="https://server.iad.liveperson.net/hc/33878321/?cmd=mTagRepstate&site=33878321&buttonID=2&divID=lpButDivID-1320991921867&bt=1&c=1"></script>'); 
document.write('<script language=\'javascript\'> var lpMTagConfig = {\'lpServer\' : "server.iad.liveperson.net",\'lpNumber\' : "33878321",\'lpProtocol\' : (document.location.toString().indexOf(\'https:\')==0) ? \'https\' : \'http\'}; function lpAddMonitorTag(src){if(typeof(src)==\'undefined\'||typeof(src)==\'object\'){src=lpMTagConfig.lpMTagSrc?lpMTagConfig.lpMTagSrc:\'/hcp/html/mTag.js\';}if(src.indexOf(\'http\')!=0){src=lpMTagConfig.lpProtocol+"://"+lpMTagConfig.lpServer+src+\'?site=\'+lpMTagConfig.lpNumber;}else{if(src.indexOf(\'site=\')<0){if(src.indexOf(\'?\')<0)src=src+\'?\';else src=src+\'&\';src=src+\'site=\'+lpMTagConfig.lpNumber;}};var s=document.createElement(\'script\');s.setAttribute(\'type\',\'text/javascript\');s.setAttribute(\'charset\',\'iso-8859-1\');s.setAttribute(\'src\',src);document.getElementsByTagName(\'head\').item(0).appendChild(s);} if (window.attachEvent) window.attachEvent(\'onload\',lpAddMonitorTag); else window.addEventListener("load",lpAddMonitorTag,false);</script>'); 
document.write('</div>');
function comm100_Chat(){
	window.open('https://server.iad.liveperson.net/hc/33878321/?cmd=file&file=visitorWantsToChat&site=33878321','','height=500,width=600,scrollbars=no,status=no');
}
function hidename(classnam,tagnam){
	tags = document.getElementsByTagName(tagnam);
	for(var i=0;i<tags.length;i++){
		if(tags[i].className == classnam){
			tags[i].style.display="none";
		}
	}
}
function page_load(){
	//changeurl();
	hidename("lpPoweredBy","tr");
}

