
/*机场贵宾休息厅*/
function doClickc(o){
o.className="data1";
var j;
var id;
var e;
for(var i=1;i<=7;i++){
id ="navc"+i;
j = document.getElementById(id);
e = document.getElementById("searc"+i);
if(id != o.id){
j.className="data2";
e.style.display = "none";
}else{
e.style.display = "block";
}
}
}




function getPos(obj){
    this.Left = 0;
    this.Top = 0;
    this.Height = obj.offsetHeight;
    this.Width = obj.offsetWidth;
    var tempObj = obj;
    while (tempObj.tagName.toLowerCase() != "body" && tempObj.tagName.toLowerCase() != "html") {
        this.Left += tempObj.offsetLeft;
        this.Top += tempObj.offsetTop;
        tempObj = tempObj.offsetParent;
    }
}

function tip(sender,showId)
{
 	var pos = new getPos(sender);
	showTip(pos,"www",showId);
}
function showTip(pos, changeStr,showId){
	var mesW = document.getElementById(showId);
 if ($.browser.msie && $.browser.version != 8) {
        pos.Top = pos.Top + 15;
        pos.Left = pos.Left - (parseInt(mesW.style.width) - pos.Width) / 2;
    }
    else {
        pos.Top = pos.Top;
        pos.Left = pos.Left - (parseInt(mesW.style.width) - pos.Width);
    }

var styleStr = "left:" + (pos.Left) + "px;";
 styleStr += "top:" + pos.Top + "px;position:absolute;width:"+mesW.style.width;
    mesW.style.cssText = styleStr;
    document.getElementById(showId).style.display="block";
	document.getElementById(showId).style.zIndex="100";  // jls 20110610 edit 
	
//    if ($.browser.msie && $.browser.version != 8) {
//        pos.Top = pos.Top;
//        pos.Left = pos.Left - (402 - pos.Width) / 2;
//    }
//    else {
//        pos.Top = pos.Top - 105;
//        pos.Left = pos.Left - (402 - pos.Width) / 2;
//    }
//    var tipHtml = "<div id=\"dw\" style=\"width:402;height:120px\">";
//    
//    tipHtml += "<div class=\"cartTip\" id=\"cartTip\">";
//    tipHtml += "<div class=\"action-hint\">";
//    tipHtml += " <h4>请选择需要的操作！</h4>";
//    tipHtml += "<p><span><a href=\"javascript:cart(" + changeStr + ");\" title=\"添加到购物车\"><img id=\"t\" src=\"/images/tjgwc.jpg\" border=\"0\" /></a></span>";
//    tipHtml += "<span><a href=\"javascript:direct(" + changeStr + ");\" title=\"直接购买\"><img id=\"z\" src=\"/images/zjgm.jpg\" border=\"0\"/></a></span></p>";
//    tipHtml += " <span><a href=\"/product/\" title=\"再逛逛\"><img id=\"g\" src=\"/images/zgg.jpg\" border=\"0\"/></a></span>";
//    tipHtml += "</div>";
//    tipHtml += "<a class=\"close\" href=\"javascript:closeTips()\" title=\"关闭\"><img src=\"/images/close.gif\" border=\"0\" /></a>";
//    tipHtml += " <div class=\"loading-indicator\">";
//    tipHtml += " </div>";
//    tipHtml += "</div>";
//    tipHtml += "</div>";
//    showTips(tipHtml, pos, 402);
}

function closeTips(showId)
{
    document.getElementById(showId).style.display="none";
}



