function copyToClipBoard() {
    var clipBoardContent = document.title + '\r\n' + document.location;
    clipBoardContent += '\r\n';
    window.clipboardData.setData("Text", clipBoardContent);
    alert("耶！复制成功喽！赶快发送给QQ/MSN上的好友，与他们分享哦！");
}

function gosearch() {
    var wdobj = document.getElementsByName("keyword")[0];
    var wd = wdobj.value;
    var f0 = document.getElementsByName("searchbox")[0].checked;
    var f1 = document.getElementsByName("searchbox")[1].checked;
    var f2 = document.getElementsByName("searchbox")[2].checked;
    if (wd == "" || wd == null) {
        alert("请输入关键词！");
        wdobj.focus();
        return false;
    }
    if (f2) {
        window.open("http://search.cn.yahoo.com/search?vs=1155815.com&p=" + wd);
    }
    if (f1) {
        window.open("http://www.google.com/search?domains=1155815.com&sitesearch=www.1155815.com&q=" + wd);
    }
    if (f0) {
        window.open("http://www.baidu.com/s?si=1155815.com&cl=3&ct=2097152&tn=baidulocal&word=" + wd);
    }
    document.forms["formsearch"].submit();
}

function engosearch() {
    var wdobj = document.getElementsByName("wd")[0];
    var wd = wdobj.value;
    var f0 = document.getElementsByName("searchbox")[0].checked;
    var f1 = document.getElementsByName("searchbox")[1].checked;
    var f2 = document.getElementsByName("searchbox")[2].checked;
    if (wd == "" || wd == null) {
        alert("Please Enter Keywords!");
        wdobj.focus();
        return false;
    }
    if (f2) {
        window.open("http://www.baidu.com/s?si=1155815.com&cl=3&ct=2097152&tn=baidulocal&word=" + wd);
    }
    if (f1) {
        window.open("http://search.cn.yahoo.com/search?vs=1155815.com&p=" + wd);
    }
    if (f0) {
        window.open("http://www.google.com/search?domains=1155815.com&sitesearch=www.1155815.com&q=" + wd);
    }
}

function ShowTabs(ID, tabcount) {
    for(i = 0; i < tabcount; i++) {
         TabTitle[i].className = 'tabOff';
         Tabs[i].style.display = 'none';
    }
    TabTitle[ID].className = 'tabOn';
    Tabs[ID].style.display = 'block';
}

function ShowInnerTabs(tabname, tabcount, tabno) {
    for(i = 0; i < tabcount; i++) {
        document.getElementById('Menu' + tabname + '_' + i).className = 'InnerTabOff';
        document.getElementById(tabname + '_' + i).style.display = 'none';
    }
    document.getElementById('Menu' + tabname + '_' + tabno).className = 'InnerTabOn';
    document.getElementById(tabname + '_' + tabno).style.display = 'block';
}

function submitchecken() {
	if (document.zhuge.str1.value == "") {
		alert("请输入您的尊姓大名！");
		document.zhuge.str1.focus();
		return false;
		}
	if (document.zhuge.str2.value == "") {
		alert("请输入对方的姓名！");
		document.zhuge.str2.focus();
		return false;
		}
	if (document.zhuge.str1.value.length > 4) {
		alert("有你这样的名字吗？");
		document.zhuge.str1.focus();
		return false;
		}
	if (document.zhuge.str1.value.length < 2) {
		alert("有你这样的名字吗？");
		document.zhuge.str1.focus();
		return false;
		}
	if (document.zhuge.str2.value.length > 4) {
		alert("有他这样的名字吗？");
		document.zhuge.str2.focus();
		return false;
		}
	if (document.zhuge.str2.value.length < 2) {
		alert("有他这样的名字吗？");
		document.zhuge.str2.focus();
		return false;
		}
	return true;
}

/*向上滚动*/
function scrollTop(speed, demo, demo1, demo2) {
  demo2.innerHTML = demo1.innerHTML;
  var MyMar = setInterval("Marquee(demo, demo1, demo2)", speed);
  demo.onmouseover = function() {
    clearInterval(MyMar);
  };
  demo.onmouseout = function() {
    MyMar = setInterval("Marquee(demo, demo1, demo2)", speed);
  };
}
function Marquee(demo, demo1, demo2) {
  if(demo2.offsetTop - demo.scrollTop <= 0) {
    demo.scrollTop -= demo1.offsetHeight;
  }
  else {
    demo.scrollTop++;
  }
}