
function g(o) {
	return document.getElementById(o);
}
function OnmouseBg(n) {
	var size = document.getElementById("tab").children.length;
	for (var i = 1; i <= size; i++) {
		if (i == n) {
			g("tc_" + i).className = "hovertab";
			g("tcc_" + i).className = "dis";
		} else {
			g("tc_" + i).className = "normaltab";
			g("tcc_" + i).className = "undis";
		}
	}
}
function OnmouseBg1(n) {
	var size = document.getElementById("ult").children;
	for (var i = 0; i < size; i++) {
		if (i == n) {
			g("tc_" + i).className = "hovertab2";
   // g('tcc_'+i).className="dis";
		} else {
			g("tc_" + i).className = "normaltab";
	//g('tcc_'+i).className='undis';
		}
		
	}
}
/**
id  被选中区域id
index 要操作对象的下标 0开始
*/
function selected(id, index) {
	var arry = document.getElementById(id).children;
	for (var i = 0; i < arry.length; i++) {
		if (i == index) {
			var chil = arry[index].children;
			chil[0].style.color="red";
		} else {
			var chil = arry[i].children;
			chil[0].style.color= "";
		}
	}
}
var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]   
//extra height in px to add to iframe in FireFox 1.0+ browsers   
var FFextraHeight=getFFVersion>=0.1? 16 : 0    
function dyniframesize(iframename) {
//  alert("iframename==="+iframename);
  var pTar = null;   
  if (document.getElementById){     
    pTar = document.getElementById(iframename);   
  }else{   
    eval('pTar = ' + iframename + ';');   
  }   
  if (pTar && !window.opera){   
    //begin resizing iframe     
    pTar.style.display="block"  
    if (pTar.contentDocument && pTar.contentDocument.documentElement.scrollHeight){   
      //ns6 syntax   
//      alert("11111111");
	      pTar.height =0;
		pTar.height=pTar.contentDocument.documentElement.scrollHeight;    
//		  alert("size=="+pTar.height);
//				pTar.height = pTar.contentDocument.documentElement.scrollHeight+FFextraHeight;    
  //    alert("go to 11111111="+pTar.contentDocument.body.scrollHeight);      

    }else if (pTar.Document && pTar.Document.body.scrollHeight){   
      //ie5+ syntax   
      pTar.height = pTar.Document.body.scrollHeight;   
    //  alert("go to 2222222="+pTar.height);      
      
    }   
//alert("pTar.height===="+pTar.height);

  }     
} 
