﻿function mainMenu(){
	var div=document.createElement("div");
	div.style.width = "580px";
	div.style.height="30px";
	div.style.position="relative";
	div.style.top = "-18px";
	div.style.left = "5px";
	div.style.paddingTop="8px";
	div.style.paddingLeft="10px";
	div.style.filter="progid:DXImageTransform.Microsoft.gradient(startColorstr=#63a5c8,endColorstr=#cae0eb);";
	var table="<table><tr>"+
                       "<td class='mainmenu' onclick='proxy(1)'>新闻中心</td>"+
                       "<td class='mainmenu'>/</td>"+
                       "<td class='mainmenu' onclick='proxy(2)'>走进经纬</td>"+
                       "<td class='mainmenu'>/</td>"+
                       "<td class='mainmenu' onclick='proxy(3)'>资质荣誉</td>"+
                       "<td class='mainmenu'>/</td>"+
                       "<td class='mainmenu' onclick='proxy(4)'>精品个案</td>"+
                       "<td class='mainmenu'>/</td>"+
                       "<td class='mainmenu' onclick='proxy(5)'>产品服务</td>"+
                       "<td class='mainmenu'>/</td>"+
                       "<td class='mainmenu' onclick='proxy(6)'>下载中心</td>"+
                       "<td class='mainmenu'>/</td>"+
                       "<td class='mainmenu' onclick='proxy(7)'>招聘信息</td>"+
                       "<td class='mainmenu'>/</td>"+
                       "<td class='mainmenu' onclick='proxy(8)'>联系我们</td>"+
				"</tr></table>";
	div.innerHTML = table;
	document.getElementById("upDiv").appendChild(div);
}
function mainInfoLeft(){
	var div = document.createElement("div");
	div.id="JJ";
	div.style.width="575px";
	div.style.height = "380px";
	div.style.position="relative";
	div.style.top = "-30px";
	div.style.left = "8px";
	var table = "<table cellpadding='0' cellspacing='0'><tr>"+
							"<td style='width:63;height:45;padding-left:10px'><img src='images/t1.gif' /></td>"+
							"<td style='font-size:14px;width:500px;padding-right:25px;color:#2a7294;font-family:宋体;font-size:16px;padding-bottom:5px' align='right' valign='bottom'>辽宁经纬测绘规划建设有限公司简介</td>"+
						"</tr><tr>"+
							"<td colspan='2'><img src='images/t2.gif' /></td>"+
						"</tr><tr>"+
							"<td colspan='2' id='gsjj' style='text-indent:24px;font-size:12px;padding-left:10px;padding-right:10px;height:60px;padding-top:10px'></td>"+
						"</tr></table>"+
						"<table>"+
							"<tr>"+
								"<td><img src='images/t3.gif' /></td>"+
								"<td><img src='images/t4.gif' style='cursor:hand;' onclick='proxy(2)' /></td>"+
							"</tr>"+
							"<tr>"+
								"<td colspan='2' id='mimg' style='padding-left:25px'>"+
								    "<table>"+  
								        "<tr>"+
								            "<td id='demo' style='width:118px;height:90px;'>"+
								            "</td>"+
								            "<td id='demo1' style='width:400px;'>"+
								            "</td>"+
								        "</tr>"+
								    "</table>"+

								"</td>"+
							"</tr>"+
						"</table>";
	div.innerHTML = table;
	div.style.filter="progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#c2d9f0) progid:DXImageTransform.Microsoft.DropShadow(color=#000000,offX=1,offY=1,positives=true);";
	document.getElementById("downDiv").appendChild(div);
	moveImg(0,1);
	syzp();
}
var pics = ["images/1.jpg","images/2.jpg","images/3.jpg","images/4.jpg","images/zpimg/g1.gif","images/zpimg/g2.gif","images/zpimg/g3.gif","images/zpimg/g4.gif","images/zpimg/g5.gif","images/zpimg/g6.gif","images/zpimg/g7.gif","images/zpimg/g8.gif"];
function syzp(){
    var div = document.createElement("div");
        div.style.top = "260px";
        div.style.left = "132px";
        div.style.width = "400px";
        div.style.height = "80px";
        div.style.overflow = "hidden";
    
    var tab = "<div id='demo3' style='OVERFLOW: hidden; WIDTH: 510px;'><table cellspacing='0' cellpadding='0' align='center' border='0' style='width: 510px'><tr>"+
                                        "<td id='marquePic1' valign='top'>"+
                                            "<table border='0' cellspacing='0' cellpadding='0' style='width:510px'>"+
                                                "<tr>"+
                                                    "<td align='center' style='cursor:hand'><img src='"+pics[4]+"'/></td>"+
                                                    "<td align='center' style='cursor:hand'><img src='"+pics[5]+"'/></td>"+
                                                    "<td align='center' style='cursor:hand'><img src='"+pics[6]+"'/></td>"+
                                                    "<td align='center' style='cursor:hand'><img src='"+pics[7]+"'/></td>"+
                                                    "<td align='center' style='cursor:hand'><img src='"+pics[8]+"'/></td>"+
                                                    "<td align='center' style='cursor:hand'><img src='"+pics[9]+"'/></td>"+
                                                    "<td align='center' style='cursor:hand'><img src='"+pics[10]+"'/></td>"+
                                                    "<td align='center' style='cursor:hand'><img src='"+pics[11]+"'/></td>"+
                                                "</tr></table>"+
                                                "</td>"+
                                                "<td id='marquePic2' valign='top'></td></tr>"+
                                            "</table>"+
                                    "</div>";
    div.innerHTML = tab;
    div.style.filter="progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#c2d9f0) progid:DXImageTransform.Microsoft.DropShadow(color=#000000,offX=1,offY=1,positives=true);";
    document.getElementById("demo1").appendChild(div);
    div.onclick = function(){
        //location.href("http://222.33.37.212/showImg/BrowerImg.html");
	location.href("http://jwxh.poco.cn");
    }
    syzpMove();
}
function syzpMove(){
    var speed=40 
    document.getElementById("marquePic2").innerHTML=document.getElementById("marquePic1").innerHTML 

    function Marquee(){ 
        if(demo3.scrollLeft>=marquePic1.scrollWidth){ 
            demo3.scrollLeft=0;
        }else{ 
            demo3.scrollLeft++;
        }
    }
     
    var MyMar=setInterval(Marquee,speed) 
    demo.onmouseover=function() {clearInterval(MyMar)} 
    demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} 
}

function moveImg(m,n){
    var imgfront = document.createElement("img");
        imgfront.id = "imgfrontid";
        imgfront.src = pics[m];
        imgfront.style.position = "absolute";
        imgfront.style.top = "260px";
        imgfront.style.left = "32px";
        imgfront.style.zIndex = 10;
        imgfront.style.cursor = "hand";
    document.getElementById("demo").appendChild(imgfront);
        imgfront.onclick = function(){
            proxy(104);
        }
    var imgback = document.createElement("img");
        imgback.id = "imgbackid";
        imgback.src = pics[n];
        imgback.style.position = "absolute";
        imgback.style.top = "260px";
        imgback.style.left = "32px";
        imgback.style.zIndex = 5;
        imgback.style.cursor = "hand";
        document.getElementById("demo").appendChild(imgback);
    var qtimer = setInterval(function(){
        var timer = setInterval(function(){
            var ifs = document.getElementById("imgfrontid");
            var ibs = document.getElementById("imgbackid");
             if(parseInt(ifs.style.top)>200){
                ifs.style.top = parseInt(ifs.style.top)-5;
             }
             else{
                clearInterval(timer);
                ifs.style.zIndex = 5;
                ibs.style.zIndex = 10;
                var ttimer = setInterval(function(){
                    if(parseInt(ifs.style.top)<260){
                        ifs.style.top = parseInt(ifs.style.top)+5;
                    }
                    else{
                        clearInterval(ttimer);
                        ifs.id = "imgbackid";
                        ibs.id = "imgfrontid";
                        ibs.name = n;
                        ibs.onclick = function(){
                            if(this.name == 0){proxy(104);}
                            if(this.name == 1){proxy(102);}
                            if(this.name == 2){proxy(101);}
                            if(this.name == 3){proxy(103);}
                        }
                        if(n<3){
                            n++;
                        }
                        else{
                            n = 0;
                        }
                        ifs.src = pics[n];
                    }
                },1);
             }
        },1)
    },3000);
}

//-----------------------------------------
function smDown(){
	var div = document.createElement("div");
	div.innerHTML = "技术支持：辽宁经纬测绘规划建设有限公司&nbsp;&nbsp;电话：024-62285678<br />COPYRIGHT 2010 ASA ALL RESERVED.<br><a href='http://www.miibeian.gov.cn'>辽ICP备05003744号</a>";
	div.style.marginTop = -15;
	div.style.marginLeft="15px";
	div.style.fontSize = "12px";
	div.style.fontFamily = "宋体";
	div.style.left = "8px";
	document.getElementById("downDiv").appendChild(div);
}
function rightInfowin(){
	var div = document.createElement("div");
	div.id = "forid"
	div.style.width = "410px";
	div.style.height = "490px";
	div.style.position="relative";
	div.style.top = "-19px";
	div.style.left = "0px"
	div.style.filter="progid:DXImageTransform.Microsoft.gradient(startColorstr=#d6e8f1,endColorstr=#f1f7fa)";
	document.getElementById("leftDiv").appendChild(div);
	
	var div1 = document.createElement("div");
	div1.id = "innerB";
	div1.style.width = "404px";
	div1.style.height = "484px";
	div1.style.position="absolute";
	div1.style.top = "3px";
	div1.style.left = "3px"
	div1.style.filter="progid:DXImageTransform.Microsoft.gradient(startColorstr=#6bafca,endColorstr=#c9dfea);";
	div.appendChild(div1);
	
	//-----------------外框四个角-------------------
	setangle("0px",div.style.left,"images/03.gif","forid");
	setangle("0px",(parseInt(div.style.width)-8)+"px","images/05.gif","forid");
	setangle((parseInt(div.style.height)-7)+"px","0px","images/28.gif","forid");
	setangle((parseInt(div.style.height)-7)+"px",(parseInt(div.style.width)-7)+"px","images/30.gif","forid");
	setNews();
	showDH();
}
function setNews(){
	var div = document.createElement("div");
	div.id="newimg";
	div.style.position="absolute";
	div.style.top = "15px";
	div.style.left = "15px";
	div.style.width = "170px";
	div.style.height = "200px";
	var tab = "<table style='width:150px'><tr><td align='center' style='color:#2a7294;font-family:黑体;padding-top:2px'>经纬快讯  <span style='color:#2a7294;font-size:14px'>NEWS</span></td></tr></table>";
	div.innerHTML = tab;
	div.style.backgroundColor="#acd0e0";
	document.getElementById("innerB").appendChild(div);
	var Hdiv = document.createElement("div");
	Hdiv.id="hdivid";
	Hdiv.style.position="absolute";
	Hdiv.style.top="55px";
	Hdiv.style.left = (parseInt(div.style.width)+15)+"px";
	Hdiv.style.width = "200px";
	Hdiv.style.height = "160px";
	Hdiv.style.backgroundColor="#acd0e0";
	document.getElementById("innerB").appendChild(Hdiv);
	setangle(div.style.top,div.style.left,"images/10.gif","innerB");
	setangle(div.style.top,(parseInt(div.style.left)+parseInt(div.style.width)-9)+"px","images/12.gif","innerB");
	setangle((parseInt(div.style.top)+(parseInt(div.style.height)-parseInt(Hdiv.style.height))-7)+"px",(parseInt(div.style.left)+parseInt(div.style.width))+"px","images/16.gif","innerB");
	setangle((parseInt(div.style.top)+(parseInt(div.style.height)-parseInt(Hdiv.style.height)))+"px",(parseInt(div.style.width)+parseInt(Hdiv.style.width)+7)+"px","images/19.gif","innerB");
	setangle((parseInt(div.style.top)+parseInt(div.style.height)-9)+"px",(parseInt(div.style.width)+parseInt(Hdiv.style.width)+6)+"px","images/23.gif","innerB");
	setangle((parseInt(div.style.top)+parseInt(div.style.height)-8)+"px",div.style.left,"images/24.gif","innerB");
	var more = document.createElement("img");
	more.src="images/112.gif";
	more.style.top = div.style.top;
	more.style.position="absolute";
	more.style.cursor="hand";
	more.style.left = (parseInt(document.getElementById("innerB").style.width)-100)+"px";
	document.getElementById("innerB").appendChild(more);
	more.onmousedown = function(){
		proxy(105);
	}
}
function showDH(){
	var div = document.createElement("div");
	div.id = "DHid";
	div.style.position="absolute";
	div.style.backgroundColor="#fff";
	div.style.height = "250px";
	div.style.width = "370px";
	div.style.top = (parseInt(document.getElementById("newimg").style.top)+parseInt(document.getElementById("newimg").style.height)+5)+"px";
	div.style.left = document.getElementById("newimg").style.left;
	document.getElementById("innerB").appendChild(div);
	setangle(div.style.top,div.style.left,"images/1.gif","innerB");
	setangle(div.style.top,(parseInt(div.style.left)+parseInt(div.style.width)-8)+"px","images/2.gif","innerB");
	setangle((parseInt(div.style.top)+parseInt(div.style.height)-8)+"px",div.style.left,"images/3.gif","innerB");
	setangle((parseInt(div.style.top)+parseInt(div.style.height)-8)+"px",(parseInt(div.style.left)+parseInt(div.style.width)-8)+"px","images/4.gif","innerB");
	right_down_info();
}
function setangle(top,left,imgs,parentID){
	var img = document.createElement("img");
	img.src = imgs;
	img.style.top = top;
	img.style.left = left;
	img.style.position="absolute";
	document.getElementById(parentID).appendChild(img);
}
function Right_new_img(){
	var div = document.createElement("div");
	div.style.position="absolute";
	div.style.left="10px";
	var divB = document.createElement("div");
	divB.style.position = "absolute";
	divB.style.width = "50px";
	divB.style.height = "50px";
	divB.style.top = "10px"
	divB.style.backgroundColor="#1b3565";
	div.appendChild(divB);
	var divB1 = document.createElement("div");
	divB1.style.position = "absolute";
	divB1.style.width = "50px";
	divB1.style.height = "50px";
	divB1.style.left = (parseInt(document.getElementById("newimg").style.width)-65)+"px";
	divB1.style.top = (parseInt(document.getElementById("newimg").style.height)-85)+"px";
	divB1.style.backgroundColor="#1b3565";
	div.appendChild(divB1);
	var divQ = document.createElement("div");
	divQ.style.position="absolute";
	divQ.style.left = "5px";
	divQ.style.top = "15px";
	divQ.style.width = "145px";
	divQ.style.height = "145px";
	divQ.style.backgroundColor="#1b3565";
	div.appendChild(divQ);
	var divQq = document.createElement("div");
	divQq.id = "showNewsImg"
	divQq.style.position="absolute";
	divQq.style.left = "10px";
	divQq.style.top = "20px";
	divQq.style.width = "135px";
	divQq.style.height = "135px";
	divQq.style.backgroundColor="#fff";
	divQq.style.cursor="hand";
	div.appendChild(divQq);
	document.getElementById("newimg").appendChild(div)
	divQq.onmousedown = function(){
	}
}
function gl_img(imgs){
    var imgss = imgs.split("|");
    var imgList = new Array();
    for(var i=0;i<imgss.length;i++){
        var imgName = imgss[i].split("/")[imgss[i].split("/").length-1];
        if(imgName != "empty.gif"){
            imgList.push(imgss[i]);
        }
    }
    return imgList;
}
function dynamic_img(imgs){
    var imgss = gl_img(imgs)
    var i = 0;
    var img = document.createElement("img");
        img.id="nowimg";
        img.style.position='absolute';
        img.style.top="0px";
        img.style.left="0px"
        img.src=imgss[0].split(",")[1];
        img.style.width="135px";
        img.style.height="135px";
        document.getElementById("showNewsImg").appendChild(img);
    var timer = setInterval(function(){
        if(i<imgss.length){
            if(document.getElementById("nowimg")!=null){document.getElementById("showNewsImg").removeChild(document.getElementById("nowimg"));}
            var img = document.createElement("img");
            img.id="nowimg";
            img.name = imgss[i].split(",")[0];
            img.style.position='absolute';
            img.style.top="0px";
            img.style.left="0px"
            img.src=imgss[i].split(",")[1];
            img.style.width="135px";
            img.style.height="135px";
            img.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=0)";
            document.getElementById("showNewsImg").appendChild(img);
            var talpha = 0;
            var Ttimer = setInterval(function(){
                if(talpha<100){
                    img.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity="+talpha+")"
                    talpha+=10;
                }
                else{
                    clearInterval(Ttimer);
                }
            },1)
            img.onclick=function(){
                proxy(9,this.name)
            }
            i++;
        }
        else{
            i=0;
        }
    },4500);
}
function show_new_infos(infos){
    var infoss = infos.split("|");
    var div = document.createElement("div");
    div.id="main_new_infos";
    div.style.position="absolute";
    div.style.top="10px";
    div.style.left ="5px";
    div.style.width="180px";
    div.style.height="140px";
    div.style.paddingTop="3px";
    div.style.paddingLeft="3px";
    var tab = "<table style='height:130px' cellspacing='0' cellpadding='0' border='0'>"+
                    "<tr><td align='center' style='border-bottom:1px dotted #fff;width:15px;'><img src='images/point.gif' /></td><td style='font-size:12px;border-bottom:1px dotted #fff;cursor:hand;' onclick='proxy(9,"+infoss[0].split(",")[0]+")'>"+infoss[0].split(",")[1]+"</td></tr>"+
                    "<tr><td align='center' style='border-bottom:1px dotted #fff;width:15px;'><img src='images/point.gif' /></td><td style='font-size:12px;border-bottom:1px dotted #fff;cursor:hand;' onclick='proxy(9,"+infoss[1].split(",")[0]+")'>"+infoss[1].split(",")[1]+"</td></tr>"+
                    "<tr><td align='center' style='border-bottom:1px dotted #fff;width:15px;'><img src='images/point.gif' /></td><td style='font-size:12px;border-bottom:1px dotted #fff;cursor:hand;' onclick='proxy(9,"+infoss[2].split(",")[0]+")'>"+infoss[2].split(",")[1]+"</td></tr>"+
                    "<tr><td align='center' style='border-bottom:1px dotted #fff;width:15px;'><img src='images/point.gif' /></td><td style='font-size:12px;border-bottom:1px dotted #fff;cursor:hand;' onclick='proxy(9,"+infoss[3].split(",")[0]+")'>"+infoss[3].split(",")[1]+"</td></tr>"+
                    "<tr><td align='center' style='border-bottom:1px dotted #fff;width:15px;'><img src='images/point.gif' /></td><td style='font-size:12px;border-bottom:1px dotted #fff;cursor:hand;' onclick='proxy(9,"+infoss[4].split(",")[0]+")'>"+infoss[4].split(",")[1]+"</td></tr>"+
                    "<tr><td align='center' style='border-bottom:1px dotted #fff;width:15px;'><img src='images/point.gif' /></td><td style='font-size:12px;border-bottom:1px dotted #fff;cursor:hand;' onclick='proxy(9,"+infoss[5].split(",")[0]+")'>"+infoss[5].split(",")[1]+"</td></tr>"+
              "</table>";
    div.innerHTML = tab;
    document.getElementById("hdivid").appendChild(div);
    
}
function right_down_info(){
	var divtitle = document.createElement("div");
	divtitle.style.marginLeft="15px";
	divtitle.style.marginTop = "10px";
	var tab = "<table style='width:340px'><tr><td style='font-family:黑体;font-size:16px;'>产品与服务&nbsp;<span style='font-size:12px;font-family:黑体;'>Manufacture & Service</span></td><td><img src='images/111.gif' onclick='proxy(5)' style='cursor:hand' /></td></tr><tr><td colspan='2'><hr /></td></tr></table><table style='width:340px'><tr><td style='border-right:1px dotted #000'><img src='images/225.gif' onclick='proxy(11)' style='cursor:hand' /></td><td style='border-right:1px dotted #000'><img src='images/223.gif' onclick='proxy(31)' style='cursor:hand' /></td><td><img src='images/224.gif' onclick='proxy(21)' style='cursor:hand' /></td></tr></table><table style='width:340px'><tr><td><hr /></td></tr><tr><td align='right'><span style='font-size:12px;'>快速通道：</span><select onchange='changes(this)'>"+
																			"<option value='0'>请选择</option>"+
																			"<option value='11'>地图产品</option>"+
																			"<option value='41'>测绘工程</option>"+
																			"<option value='21'>系统开发</option>"+
																			"<option value='61'>规划设计</option>"+
																			"<option value='71'>无人机</option>"+
																			"<option value='81'>沙盘多媒体</option>"+
																			"<option value='31'>代理产品</option>"+
																			"</select></td></tr></table>";
	divtitle.innerHTML = tab;
	document.getElementById("DHid").appendChild(divtitle);
}
function changes(t){
    location.href="ChildPage.htm?id="+t.value;
}
function proxy(n,m){
    if(n == 9){
        location.href="ChildPage.htm?id=9&ip="+m;
    }
    else{
        location.href="ChildPage.htm?id="+n;
    }
}
onload = function(){
	mainMenu();	
	mainInfoLeft();
	rightInfowin();
	smDown();
	Right_new_img();
	ajaxProxy(15);
}
