// JavaScript Document

//行为定义
/*var myrules = {
	'#menu-bottom img' : function(d){
			d.onmouseover = function(){
				document.getElementById("t"+d.src.substring(d.src.length-10,d.src.length-5)).style.font="normal normal bold 12px/20px tahoma";
			}
			d.onmouseout = function(){
				document.getElementById("t"+d.src.substring(d.src.length-10,d.src.length-5)).style.font="normal normal normal 12px/20px tahoma";
			}
		},
	'#input-r img':function(c){
			c.onmouseover = function(){
				c.src="img/new06/send2.gif";
			}
			c.onmouseout = function(){
				c.src="img/new06/send1.gif";
			}
		},
	'#box-main-r-l img':function(g){
			g.onclick = function(){
				resize(g);
			}
		},
	'#menu-top-c a' : function(w){
			w.onmouseover = function(){
				w.style.font="normal normal bold 12px/20px tahoma";
			}
			w.onmouseout = function(){
				w.style.font="normal normal normal 12px/20px tahoma";
			}
		}
	};
Behaviour.register(myrules);*/


//
function switchTab_new07(tabpage,tabid){
  var oItem = document.getElementById(tabpage);
	for(var i=0;i<oItem.childNodes.length;i++){
		var x = oItem.childNodes[i];
    if ((i+1)!=tabid.substring(4,tabid.length) && x.className=="clients_m") continue;
		x.className = "clients";
    try{if (document.getElementById("mname"+(i+1)).innerHTML==words_head[4]) x.className = "clients_l";}catch(e){}
	}
	document.getElementById(tabid).className = "clients_s";
	showTb(tabid.substring(4,tabid.length));
}
function switchTab(tabpage,tabid,tplname){
  if (tplname=='new07') return switchTab_new07(tabpage,tabid);
  var oItem = document.getElementById(tabpage);   
	if (menu_type=="")  {
    for(var i=0;i<oItem.childNodes.length;i++){
      var x = oItem.childNodes[i];
      x.className = "caller";
    }
    document.getElementById(tabid).className = "caller_ck";
    showTb(tabid.substring(4,tabid.length));
  } else  {
    for(var i=0;i<oItem.children.length;i++){
      var x = oItem.children(i);	
      x.className = "";
    }
    document.getElementById(tabid).className = "Selected";
    showTb(tabid.substring(tabid.length-1,tabid.length));
  }
}
function resize(g){
	if( g.src.indexOf("c-pr.gif")>0){
		document.getElementById('box-main-r-r').style.display='none';
		document.getElementById('box-main-r').style.width='8px';
		g.src='img/new06/c-pl.gif';
		document.getElementById('box-main-l').style.width='660px';
		document.getElementById('box-main-l-disp').style.width='636px';
		document.getElementById('input-l').style.width='564px';
	}
	else{
		document.getElementById('input-l').style.width='384px';
		document.getElementById('box-main-l-disp').style.width='456px';
		document.getElementById('box-main-l').style.width='480px';
		g.src='img/new06/c-pr.gif';
		document.getElementById('box-main-r').style.width='188px';
		document.getElementById('box-main-r-r').style.display='';
	}
}

