﻿<!--
//-----------------
//直接显示日期和星期
//-----------------
function showWeekDate(){
	var tmpDate,myArray,date,month,year,weekday,mdate;
	tmpDate = new Date();
	myArray=new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
	date = tmpDate.getDate();
	month= tmpDate.getMonth()+1;
	year= tmpDate.getFullYear();
	weekday=tmpDate.getDay();
	mdate=year+"年"+month+"月"+date+"日"+" "+myArray[weekday];
	document.write(mdate);
}

function addToMyBox()
{
 if (document.all)
    {
       window.external.addFavorite('http://www.yunjin.cn/','南京理工大学分析测试中心');
    }
    else if (window.sidebar)
    {
       window.sidebar.addPanel('南京理工大学分析测试中心','http://www.yunjin.cn/', "");
    }
}

function setHomepage()
{
 if (document.all)
    {
  document.body.style.behavior='url(#default#homepage)';
  document.body.setHomePage('http://www.yunjin.cn/');
 
    }
    else if (window.sidebar)
    {
    if(window.netscape)
    {
         try
   	 {  
            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
         }  
         catch (e)  
         {  
    alert( "该操作被浏览器拒绝，如果想启用该功能，请在地址栏内输入 about:config,然后将项 signed.applets.codebase_principal_support 值该为true" );  
         }
    } 
    var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
    prefs.setCharPref('browser.startup.homepage','http://www.yunjin.cn/');
 }
}
-->