﻿
/*左侧广告*/
//$(document).ready(function() {
//    $("li[name='title']+li[name='ad']").hide();
//    $("li[name='title']").bind('click', function() {
//        var theAnswer = $(this).next("li[name='ad']");
//        $("li[name='title']+li[name='ad']").not(theAnswer).hide();
//        if (theAnswer.is(":hidden")) { theAnswer.show(); this.className = 'ad_box down'; }
//        else { theAnswer.hide(); this.className = 'ad_box'; }
//    });
//});
jQuery(document).ready(function() {
    jQuery("dd:not(:first)").hide();
    jQuery("dt a").click(function() {
        jQuery("dd:visible").slideUp("slow");
        jQuery(this).parent().next().slideDown("slow");
        return false;
    });
});
//获取当前元素的X，Y位置
function XP_getPoint(source) {
    var pt = { x: 0, y: 0 };
    do {
        pt.x += source.offsetLeft;
        pt.y += source.offsetTop;
        source = source.offsetParent;
    }
    while (source);
    return pt;
}
document.onclick = function(oEvent) {
    var e;
    var ta;
    if (document.all) {
        e = window.event;
        ta = e.srcElement;
    }
    else {
        e = oEvent;
        ta = e.target;
    }
}
//让IFREAM自动适应高度
function reSetIframe(iframe) {
    try {
        var bHeight = iframe.contentWindow.document.body.scrollHeight;
        var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
        var height = Math.max(bHeight, dHeight);
        iframe.height = height;
    } catch (ex) { }
}

