﻿//实现首页视频和对联广告的功能

document.writeln("<div id=\"dlgga\"style=\"POSITION:absolute;;Z-INDEX:99999;RIGHT:0px;top:400px;width:110px;height:250px;font-size:12px;\"><p style=\"line-height:25px;width:110px;text-align:right;color:#000;\"><span onclick=\"javascript:closegba()\" style=\"cursor:pointer;\">关闭<\/span><\/p> <a href=\"http://chengxin.shanghaigm.com/dapengche/index.aspx\" target=\"_blank\"><img src=images/dapengche.jpg ><\/a><\/div><div id=\"dlggb\"style=\"POSITION:absolute;;Z-INDEX:99999;left:0px;top:400px;width:110px;height:250px;font-size:12px;\"><p style=\"line-height:25px;width:110px;text-align:left;color:#000;\"><span onclick=\"javascript:closegbb()\" style=\"cursor:pointer;\">关闭<\/span><\/p> <a href=\"http://chengxin.shanghaigm.com/dapengche/index.aspx\" target=\"_blank\"><img src=images/dapengche.jpg ><\/a><\/div>																																																											<div id=\"sc\" style=\"POSITION:absolute;;Z-INDEX:99999;RIGHT:0px;top:400px;width: 300px;border:1px solid #ccc;background-color:#fff;padding:1px;font-size:12px\"><div style=\"width: 290px;padding-left:5px;line-height:25px;height:25px;text-align:left;padding-right:5px;cursor:pointer;background: #efefef;\"><span style=\"float:left;width:79px;\"><img src=images/sp_logo.jpg ></span><span onclick=\"javascript:closeSC()\" style=\"cursor:pointer;float:right;\">关闭<\/span><\/div><IFRAME marginHeight=0 marginWidth=0 noResize scrolling=no frameBorder=0 src=indexvideo.htm width=300 height=273><\/IFRAME><\/div>")
function closeSC() {
    document.getElementById("sc").innerHTML = '';
    document.getElementById("sc").style.visibility = 'hidden';
    document.getElementById("sc").style.display = 'none';
}

function closegba() {
    document.getElementById("dlgga").innerHTML = '';
    document.getElementById("dlgga").style.visibility = 'hidden';
    document.getElementById("dlgga").style.display = 'none';
}
function closegbb() {
    document.getElementById("dlggb").innerHTML = '';
    document.getElementById("dlggb").style.visibility = 'hidden';
    document.getElementById("dlggb").style.display = 'none';
}

function sc5() {
    document.getElementById("sc").style.top = (document.documentElement.scrollTop + document.documentElement.clientHeight - document.getElementById("sc").offsetHeight) + "px";
    document.getElementById("sc").style.left = (document.documentElement.scrollLeft + document.documentElement.clientWidth - document.getElementById("sc").offsetWidth) + "px";
    document.getElementById("dlgga").style.top = (document.documentElement.scrollTop) + "px";
    document.getElementById("dlgga").style.left = (document.documentElement.clientWidth / 2 + 500) + "px";
    document.getElementById("dlggb").style.top = (document.documentElement.scrollTop) + "px";
    document.getElementById("dlggb").style.left = (document.documentElement.clientWidth / 2 - 612) + "px";

}

function scall() {
    sc5();
}
window.onscroll = scall;
window.onresize = scall;
window.onload = scall;
