
function saveUrl(url){
  $.get("/clk.do",{href: url, t: new Date().getTime()});
}
function swf_load(fileid, filename, widths, heights, fvs, wmd)
{
this.FlashVars = (fvs != undefined)? fvs :'';
this.Wmod = (wmd != undefined)? wmd :''; 
var strSwf = "";
strSwf += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
strSwf += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"';
strSwf += 'width="'+widths+'" height="'+heights+'" id="'+fileid+'" >';
strSwf += '<param name="movie" value="'+filename+'" />';
strSwf += '<param name="quality" value="high" />';
strSwf += '<param name="menu" value="false" />';
strSwf += (FlashVars != null) ? '<param name="FlashVars" value="'+FlashVars+'">' : '';
strSwf += (Wmod != null) ? '<param name="wmode" value="'+Wmod+'">' : ''; 
strSwf += '<embed';
strSwf += (FlashVars != null) ? ' FlashVars="'+FlashVars+'"' : ''; 
strSwf += (Wmod != null) ? ' wmode="'+Wmod+'"' : ''; 
strSwf += ' src="'+filename+'" quality="high" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer"';
strSwf += 'type="application/x-shockwave-flash" width="'+widths+'" height="'+heights+'"  name="'+fileid+'" ></embed>';
strSwf += '</object>';
document.write(strSwf);
}
function setHome(obj)
    {
        try
        {
                obj.style.behavior='url(#default#homepage)';obj.setHomePage('http://www.ilantu.com/');
        }
        catch(e){
                if(window.netscape) {
                        try {
                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 
                        } 
                        catch (e) { 
                                alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'"); 
                        }
                        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
                        prefs.setCharPref('browser.startup.homepage',vrl);
                 }
        }
    }
function AddFavorite()
{
   if (document.all)
   {
      window.external.addFavorite("http://www.ilantu.com/","爱蓝图");
   }
   else if (window.sidebar)
   {
      window.sidebar.addPanel("爱蓝图", "http://www.ilantu.com/",  "");
   }
} 

function AddFavorite(url, title)
{
	if (!url) {
		url="http://www.ilantu.com/";
	}
	if(!title) {
		title = "爱蓝图";
	}
   if (document.all) {
      window.external.addFavorite(url,title);
   } else if (window.sidebar) {
      window.sidebar.addPanel(title,url,  "");
   }
}
