function copyToClipBoard(){
    var clipBoardContent="";
    clipBoardContent+=window.location.href;
    if (window.clipboardData){
    	if(window.clipboardData.setData("Text",clipBoardContent)){
    		alert("复制成功！点击鼠标右键再粘贴即可");   
    	}
    }else{
   }
}

function zhuanzai(){
	if(document.getElementById('zhuanzai').style.display=='block'){
		document.getElementById('zhuanzai').style.display='none';
	}else{		
		document.getElementById('zhuanzai').style.display= 'block';
	}	
}

function addFavorite() {
    if (document.all) {
        window.external.addFavorite('http://www.eeg.com.cn/','【易易购】网上购物系统'); 
    } else if (window.sidebar) { 
        window.sidebar.addPanel('【易易购】网上购物系统', 'http://www.eeg.com.cn/', ""); 
    } 
    return false;
}
window.onerror=function(){return true}

function readCookie (name) {
  var cookieValue = "";
  var search_s = name + "=";
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search_s);
    if (offset != -1)
    { 
      offset += search_s.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}

function close_topic(id,username){

    var username = readCookie('username');
    if(!username){
		alert('您还没有登录，登录后才可以收藏到您的收藏夹里！');
		backUrl =window.location.href;		
		location.href='Register.asp?action=login&backUrl='+backUrl;
		return false;
}
   window.open('User/Favicon.asp?action=add&id='+id+'','','status=no,scrollbars=yes,top=20,left=110,width=800,height=500')
    } 

function close_cart(id,username){

    var username = readCookie('username');
    if(!username){
		alert('您还没有登录，登录后才可以购买东西！');
		backUrl =window.location.href;		
		location.href='Register.asp?action=login&backUrl='+backUrl;
		return false;
}
   window.open('User/Buy.asp?action=add&id='+id+'','','status=no,scrollbars=yes,top=20,left=110,width=800,height=580')
    } 


//<!滑动门 如果要做成点击后再转到请将<li>中的onmouseover 改成 onclick;
function g(o){return document.getElementById(o);}
function HoverLi(n){
//如果有N个标签,就将i<=N;
for(var i=1;i<=3;i++){g('tb_'+i).className='normaltab';g('tbc_0'+i).className='undis';}g('tbc_0'+n).className='dis';g('tb_'+n).className='hovertab';
}
//

function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
function pl()
{
  if(checkspace(document.pinglunform.pinglunname.value)) {
	document.pinglunform.pinglunname.focus();
    alert("请填写您的姓名！");
	return false;
  }

  if(checkspace(document.pinglunform.pingluncontent.value)) {
	document.pinglunform.pingluncontent.focus();
    alert("请填写评论内容！");
	return false;
  }
	  }
//-->