﻿function diypd(tt){
        switch(tt){
            case"diypdfirst":
                document.getElementById("diypdfirst").style.display="block";
                document.getElementById("diypdtwo").style.display = "none";
                document.getElementById("diypdthree").style.display = "none";
                break;
            case"diypdtwo":
                document.getElementById("diypdfirst").style.display="none";
                document.getElementById("diypdtwo").style.display = "block";
                document.getElementById("diypdthree").style.display = "none";
                break;
            case"diypdthree":
                document.getElementById("diypdfirst").style.display="none";
                document.getElementById("diypdtwo").style.display = "none";
                document.getElementById("diypdthree").style.display = "block";
                break;
    }
}

function bookmarkit(){
	window.external.addFavorite('http://www.52meilihui.com /','天银投资咨询公司')
}

function OnlineQuery(){
	top.location="/centre/index.html";

}


function FunInit ()
{
	var arrPage = new Array ("diypdfirst", "diypdtwo", "diypdthree");
	var nRound = parseInt (3 * Math.random () + 1);
	//diypd (arrPage[nRound - 1]);
}

function TrimString (strVal)
{
    strTmp = strVal + "";
    if (strTmp.length == 0)
        return (strTmp);
    reVal = /^(\s|　)*/;
    strTmp = strTmp.replace (reVal, '');
    reVal = /(\s|　)*$/;
    return (strTmp.replace (reVal, ''));
}

function CheckEmail (strEmail)
{
    strEmail = (TrimString (strEmail));
    if (strEmail.length == 0)
        return (false);
    reVal = /^[\-!#\$%&'\*\+\\\.\/0-9=\?A-Z\^_`a-z{|}~]+@[\-!#\$%&'\*\+\\\.\/0-9=\?A-Z\^_`a-z{|}~]+(\.[\-!#\$%&'\*\+\\\.\/0-9=\?A-Z\^_`a-z{|}~]+)+$/;
    return (reVal.test (strEmail));
}

function OrtOpenCenterWindow (URL, Name, Features)
{
    var nWidth;
    var nHeight;
    var nLeft;
    var nTop;
    var strVal;
    var nPos;
    var strComb;
    var i;
    var chVal;
    nLeft = 0;
    nTop = 0;
    if (Features == null)
        return (window.open (URL, Name, Features));
    strVal = Features.toUpperCase ();
    if (strVal.indexOf ("LEFT", 0) >= 0 || strVal.indexOf ("TOP", 0) >= 0)
        return (window.open (URL, Name, Features));
    if ((nPos = strVal.indexOf ("WIDTH", 0)) < 0)
        return (window.open (URL, Name, Features));
    if ((nPos = strVal.indexOf ("=", nPos)) < 0)
        return (window.open (URL, Name, Features));
    strComb = "";
    for (i = nPos + 1; i < Features.length; i ++)
    {
        chVal = Features.charAt (i);
        if (chVal == " " || (chVal >= "0" && chVal <= "9"))
            strComb += chVal;
        else
            break;
    }
    if ((nWidth = eval (TrimString (strComb))) <= 0)
        return (window.open (URL, Name, Features));
    if ((nPos = strVal.indexOf ("HEIGHT", 0)) < 0)
        return (window.open (URL, Name, Features));
    if ((nPos = strVal.indexOf ("=", nPos)) < 0)
        return (window.open (URL, Name, Features));
    strComb = "";
    for (i = nPos + 1; i < Features.length; i ++)
    {
        chVal = Features.charAt (i);
        if (chVal == " " || (chVal >= "0" && chVal <= "9"))
            strComb += chVal;
        else
            break;
    }
    if ((nHeight = eval (TrimString (strComb))) <= 0)
        return (window.open (URL, Name, Features));
    nLeft = (window.screen.width - nWidth) / 2;
    nTop = (window.screen.height - nHeight) / 2;
    Features += ",left=" + nLeft + ",top=" + nTop;
    return (window.open (URL, Name, Features));
}
///////////////////////////////////////////////////
var imgheight;
var imgright;
var uimlink = new Array ();
uimlink[0] = "<a href='tencent://message/?uin=1609790067&Site=c2m.cn&Menu=yes'><img src='http://wpa.qq.com/pa?p=1:1609790067:3' alt='在线咨询' border=0 ?></a>";
uimlink[1] = "<a href='tencent://message/?uin=1609996176&Site=c2m.cn&Menu=yes'><img src='http://wpa.qq.com/pa?p=1:1609996176:3' alt='在线咨询' border=0 ?></a>";
uimlink[2] = "<a href='tencent://message/?uin=1641530718&Site=c2m.cn&Menu=yes'><img src='http://wpa.qq.com/pa?p=1:1641530718:3' alt='在线咨询' border=0 ?></a>";
//uimlink[3] = "";

///////////////////////////////////////////////////////////
window.screen.width>800 ? imgheight=-98:imgheight=-98
window.screen.width>800 ? imgright=148:imgright=148
function myload(){
	var nC2mtop = document.body.scrollTop+document.body.offsetHeight/2-imgheight;

	var nC2mleft = document.body.offsetWidth-imgright;


	nC2mtop = (nC2mtop < 0 ? 180 : nC2mtop);

	myRight.style.top=nC2mtop;

	myRight.style.left=nC2mleft;

	mymove();
	//alert (myRight.style.top+'\n\r'+myRight.style.left);
}
function mymove()
{
	var nC2mtop = document.body.scrollTop+document.body.offsetHeight/2-imgheight;
	var nC2mleft = document.body.offsetWidth-imgright;

	nC2mtop = (nC2mtop < 0 ? 182 : nC2mtop);
	
	myRight.style.top=nC2mtop;
 	myRight.style.left=nC2mleft;
 	setTimeout("mymove();",180)
}

if(window.screen.width>800)
{
	document.write("<div id=myRight style='position: absolute;width:150;top:0;left:578;visibility: visible;z-index: 1'><table width=129 height=105 border=0 cellspacing=5 cellpadding=2 background=/images2/2_28.jpg>");
	document.write ("<tr><td width=129 height=62></td><td align=right valign=top></td></tr>");
	for(var i=0;i<uimlink.length;i++){
		document.write ("<tr><td height=30></td><td>");
		document.write (uimlink[i]+"\n");
		document.write ("</td></tr>");
	}
	document.write ("</table></div>");
        myload();
}

