﻿var userAgent = navigator.userAgent.toLowerCase();
var is_opera = userAgent.indexOf('opera') != -1 && opera.version();
var is_moz = (navigator.product == 'Gecko') && userAgent.substr(userAgent.indexOf('firefox') + 8, 3);
var is_ie = (userAgent.indexOf('msie') != -1 && !is_opera) && userAgent.substr(userAgent.indexOf('msie') + 5, 3);
function now(){
    today=new Date();
    var week; var date; var nian; var yue;
    yue="日";
    nian="年";
    if(today.getDay()==0) week="星期日"
    if(today.getDay()==1) week="星期一"
    if(today.getDay()==2) week="星期二"
    if(today.getDay()==3) week="星期三"
    if(today.getDay()==4) week="星期四"
    if(today.getDay()==5) week="星期五"
    if(today.getDay()==6) week="星期六"

    moth=today.getMonth()+1;

    if(moth==1) mth="1月"
    if(moth==2) mth="2月"
    if(moth==3) mth="3月"
    if(moth==4) mth="4月"
    if(moth==5) mth="5月"
    if(moth==6) mth="6月"
    if(moth==7) mth="7月"
    if(moth==8) mth="8月"
    if(moth==9) mth="9月"
    if(moth==10) mth="10月"
    if(moth==11) mth="11月"
    if(moth==12) mth="12月"

    date=" "+(today.getFullYear())+""+nian+mth+today.getDate()+""+yue+"&nbsp;";
    document.write("<font color='#0153b7'>" + date +"&nbsp;"+ week + "</font>");
}
document.write("<scr"+"i"+"pt language=\"javascript\" type=\"text/javascript\" src=\"/Scripts/jquery.pack.js\"></scr"+"i"+"pt>");
document.write("<scr"+"i"+"pt language=\"javascript\" type=\"text/javascript\" src=\"/Scripts/Common.js\"></scr"+"i"+"pt>");
document.write("<scr"+"i"+"pt language=\"javascript\" type=\"text/javascript\" src=\"/Scripts/swfobject_modified.js\"></scr"+"i"+"pt>");

function ShowDetail(obj){
    if(g(obj).style.display == "none"){
        g(obj).style.display = "block";
    }
    else{
        g(obj).style.display = "none";
    }
}

function SetSrc(obj,src){
    obj.src = "/Images/" + src;
}

function toggle_collapse(objname, noimg) {
	var obj = g(objname);
	obj.style.display = obj.style.display == '' ? 'none' : '';
	if(!noimg) {
		var img = g(objname + '_img');
		img.src = img.src.indexOf('_yes.gif') == -1 ? img.src.replace(/_no\.gif/, '_yes\.gif') : img.src.replace(/_yes\.gif/, '_no\.gif')
	}
}

function setcopy(text, alertmsg){
	if(is_ie) {
		clipboardData.setData('Text', text);
		alert(alertmsg);
	} else if(prompt('Press Ctrl+C Copy to Clipboard', text)) {
		alert(alertmsg);
	}
}