function GetCookie(sName)
{
var aCookie = document.cookie.split("; ");
for (var i=0; i < aCookie.length; i++)
{
var aCrumb = aCookie[i].split("=");
if (sName == aCrumb[0])
{
return aCrumb[1];
}
}
return null;
}
function SetCookie(name, value, time, domain)
{
var expdate = new Date();
var expires = time;
if(expires!=null){
expdate.setTime(expdate.getTime() + ( expires * 1000 ));
expd = "expires="+expdate.toGMTString()+";";
}else
expd = "";
if (domain)
{
domain = "domain="+ domain +"; path=/; ";
}
document.cookie = name + "=" + escape (value) + "; " + expd + domain;
}
var cookieTag = "Crystal_skin";
var vSkin = GetCookie(cookieTag);
function setSkinColor(vSkinNum)
{
SetCookie( cookieTag, vSkinNum, 60*60*24*30,"cnwest.com");
document.getElementById("skinCss").href = "images/1.files/css_"+vSkinNum+".css";
}
if( vSkin && vSkin!="Style" )
{
document.getElementById("skinCss").href = "images/1.files/css_"+vSkin+".css";
}
//mname=标题的id,csson=鼠标滑上的样式,cssout=离开的样式,obj=div框的id,id=当前的菜单编号,num=菜单总个数
//其中mname,obj不包含id值,如4个菜单第一个1是title1,div为div1则 c_tab("title","","","div",1,4)
function c_tab(mname,csson,cssout,obj,id,num)
{
for(var i=1;i<=num;i++)
{
menu=eval(""+obj+i);
m=eval(""+mname+i);
if(i==id)
{
menu.style.display="";
m.className=csson;
}
else
{
menu.style.display="none";
m.className=cssout;
}
}
}
$=function(id){
return document.getElementById(id);
}
//转换字号
function doZoom(size){
if(size==12){
$("contentText").style.fontSize = size + "px";
$("fs12").style.display = "";
$("fs14").style.display = "none";
$("fs16").style.display = "none";
}
if(size==14){
$("contentText").style.fontSize = size + "px";
$("fs12").style.display = "none";
$("fs14").style.display = "";
$("fs16").style.display = "none";
}
if(size==16){
$("contentText").style.fontSize = size + "px";
$("fs12").style.display = "none";
$("fs14").style.display = "none";
$("fs16").style.display = "";
}
}
function copyLink(){
try {
var cText = document.location.toString();
if (window.clipboardData) {
window.clipboardData.setData("Text", cText);
alert("复制完成!");
} else if (window.netscape) {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
} catch (e) {
alert("您的浏览器设置为不允许复制!\n如果需要此操作,请在浏览器地址栏输入'about:config'并回车\n然后将'signed.applets.codebase_principal_support'设置为'true',再重试复制操作!");
return false;
}
var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
if (!clip)
return;
var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
if (!trans) {
return;
}
trans.addDataFlavor('text/unicode');
var str = new Object();
var len = new Object();
var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
str.data = cText;
trans.setTransferData("text/unicode", str, cText.length * 2);
var clipid = Components.interfaces.nsIClipboard;
if (!clip)
return false;
clip.setData(trans, null, clipid.kGlobalClipboard);
alert("复制完成!");
}
} catch (e) {
}
}
|
来源:户外资料网 |
2011-11-16 16:09:21 |
|
[提要] 夫唱妇随二人行—菜鸟改装大行SP8经验分享 |
白色PD-M40培林脚踏(60元)
Jagwire 彩色变速线管(1.2米10元)这个线管帽很重要,不然前变速线没法固定,我开始没弄明白只好自己用发令枪子弹壳DIY一个。
借用了个后拨走线口,自己用小弹壳DIY了个固定变速线管的线帽。
前变速线导轮安装在五通上。
|
|
var comment_id,url;comment_id="27839";url="/inc/comment/cmt.asp";
|
|
|
|