//返回ID字符串为数组形式
function getEmenValeThree(objid){
var form=$(objid),eles = form.elements;
var reId="";
var arr=new Array();
var count = 0;
if (eles.length > 0){
var checkedboxNum=0; //选中的复选筐
for (var i=0; i<eles.length; i++){
var node = eles[i];
if (node.type == "checkbox" && node.disabled == false){
if(node.checked){
arr[count++] = eles[i].value;
}
}
}
}
return arr;
}
GetoffsetLeft = function(theObject)
{ //return theObject's absolute offsetLeft . translate by stz: 返回对象在页面中的绝对左距离
var absLeft = 0;
var thePosition="";
var tmpObject = theObject;
while (tmpObject != null)
{
thePosition = tmpObject.position;
tmpObject.position = "static";
absLeft += tmpObject.offsetLeft;
tmpObject.position = thePosition;
tmpObject = tmpObject.offsetParent;
}
return absLeft;
}
GetoffsetTop = function(theObject)
{ //return theObj's absolute offsetTop
var absTop = 0;
var thePosition = "";
var tmpObject = theObject;
while (tmpObject != null)
{
thePosition = tmpObject.position;
tmpObject.position = "static";
absTop += tmpObject.offsetTop;
tmpObject.position = thePosition;
tmpObject = tmpObject.offsetParent;
}
return absTop;
}
/*-----------------tab页效果---------------------------------*/
var CurComId=1,widthed=0;
function switchComment(Id,tabbar){
var tab=$("tab");
for(var i=0;i<tab.childNodes.length;i++) {
if(tab.childNodes[i].className!="horizontalSpace")
tab.childNodes[i].className="unitOff"
}//alert(tabbar.outerHTML);
tabbar.className="unitOn"
CurComId=Id;
}
function switchComment2(Id,tabbar){
var tab=$("tab"), imgBg=tab.style.backgroundImage; //alert(imgBg.substring(imgBg.indexOf("."),imgBg.length));
var imgNumPos=imgBg.lastIndexOf("."); //alert(imgBg.substring(imgNumPos-1,imgNumPos)); return;
tab.style.backgroundImage=imgBg.replace(imgBg.substring(imgNumPos-1,imgNumPos),Id);
//tab.style.backgroundImage=imgBg.replace(imgBg.substr(imgBg.length),Id);
if (Id!=CurComId){
eval("document.getElementById('tab" + Id.toString() + "').style.display='block';");
eval("document.getElementById('tab" + CurComId.toString() + "').style.display='none';");
CurComId=Id;
}
}
function showFAQlist(curObj){
var oprObj=curObj.nextSibling;
while(oprObj.nodeType!=1){
oprObj=oprObj.nextSibling;
}//alert(oprObj.nodeType); return;//.parentNode.childNodes[1] word_bold cursorHand
if(oprObj.style.display==""){
oprObj.style.display="none";
curObj.className="word_bold cursorHand";
}else{
oprObj.style.display="";
curObj.className="word_666 word_bold cursorHand"; //word_black
}
}
function getEmenValeThree(objid){
var form=$(objid),eles = form.elements;
var reId="";
var arr=new Array();
var count = 0;
if (eles.length > 0){
var checkedboxNum=0; //选中的复选筐
for (var i=0; i<eles.length; i++){
var node = eles[i];
if (node.type == "checkbox" && node.disabled == false){
if(node.checked){
arr[count++] = eles[i].value;
}
}
}
}
return arr;
}
GetoffsetLeft = function(theObject)
{ //return theObject's absolute offsetLeft . translate by stz: 返回对象在页面中的绝对左距离
var absLeft = 0;
var thePosition="";
var tmpObject = theObject;
while (tmpObject != null)
{
thePosition = tmpObject.position;
tmpObject.position = "static";
absLeft += tmpObject.offsetLeft;
tmpObject.position = thePosition;
tmpObject = tmpObject.offsetParent;
}
return absLeft;
}
GetoffsetTop = function(theObject)
{ //return theObj's absolute offsetTop
var absTop = 0;
var thePosition = "";
var tmpObject = theObject;
while (tmpObject != null)
{
thePosition = tmpObject.position;
tmpObject.position = "static";
absTop += tmpObject.offsetTop;
tmpObject.position = thePosition;
tmpObject = tmpObject.offsetParent;
}
return absTop;
}
/*-----------------tab页效果---------------------------------*/
var CurComId=1,widthed=0;
function switchComment(Id,tabbar){
var tab=$("tab");
for(var i=0;i<tab.childNodes.length;i++) {
if(tab.childNodes[i].className!="horizontalSpace")
tab.childNodes[i].className="unitOff"
}//alert(tabbar.outerHTML);
tabbar.className="unitOn"
CurComId=Id;
}
function switchComment2(Id,tabbar){
var tab=$("tab"), imgBg=tab.style.backgroundImage; //alert(imgBg.substring(imgBg.indexOf("."),imgBg.length));
var imgNumPos=imgBg.lastIndexOf("."); //alert(imgBg.substring(imgNumPos-1,imgNumPos)); return;
tab.style.backgroundImage=imgBg.replace(imgBg.substring(imgNumPos-1,imgNumPos),Id);
//tab.style.backgroundImage=imgBg.replace(imgBg.substr(imgBg.length),Id);
if (Id!=CurComId){
eval("document.getElementById('tab" + Id.toString() + "').style.display='block';");
eval("document.getElementById('tab" + CurComId.toString() + "').style.display='none';");
CurComId=Id;
}
}
function showFAQlist(curObj){
var oprObj=curObj.nextSibling;
while(oprObj.nodeType!=1){
oprObj=oprObj.nextSibling;
}//alert(oprObj.nodeType); return;//.parentNode.childNodes[1] word_bold cursorHand
if(oprObj.style.display==""){
oprObj.style.display="none";
curObj.className="word_bold cursorHand";
}else{
oprObj.style.display="";
curObj.className="word_666 word_bold cursorHand"; //word_black
}
}