﻿//$(document).ready(function() {
//	$("#nbar > li").hover(function(){
//		$(this).addClass("on");
//	},function(){
//		$(this).removeClass("on");
//	});
//});
//hs.graphicsDir = '/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>inc/productImgShow/graphics/';
//hs.graphicsDir = '/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>inc/productImgShow/graphics/';
//hs.outlineType = 'rounded-white';
function addtocart(pid)
{
	if('<%=config.ShopStop%>' == 'True')
	{
		temp=window.open('/<%=System.Configuration.ConfigurationSettings.AppSettings["ShopFolder"]%>ShoppingCart.aspx?pid='+pid+'&ts='+Math.random(),'shopcat','scrollbars=yes,top=0,left=0,resizable=yes');
		temp.focus();
	}
	else
	{
		alert('<%=config.ShopStopWords%>');
		return false;
	}
}
function addLoadEvent(func)
{
	var oldonload = window.onload;
	if (typeof window.onload != 'function')
	{
		window.onload = func;
	}
	else
	{
		window.onload = function()
		{
			if (oldonload)
			{
				oldonload();
			}
			func();
		}
	}
}
function checkForm()
{
	var form=document.getElementById("loginForm");
	if (form.memberName.value=="")
	{	alert('请填写会员号');
		form.memberName.focus();
		return false;
	}
	if (form.memberPass.value=="")
	{	alert('请填写密码');
		form.memberPass.focus();
		return false;
	}
	if (form.logincode.value=="")
	{	alert('请填写验证码');
		form.logincode.focus();
		return false;
	}
	return true;
}

function srollv(demo3, demo4, demo5) {
    var speed2 = 40;
    var tab3 = document.getElementById(demo3);
    var tab4 = document.getElementById(demo4);
    var tab5 = document.getElementById(demo5);
    tab5.innerHTML = tab4.innerHTML;
    function Marquee2() {
        if (tab5.offsetWidth - tab3.scrollLeft <= 0)
            tab3.scrollLeft -= tab4.offsetWidth
        else {
            tab3.scrollLeft++;
        }
    }
    var MyMar2 = setInterval(Marquee2, speed2);
    tab3.onmouseover = function() { clearInterval(MyMar2) };
    tab3.onmouseout = function() { MyMar2 = setInterval(Marquee2, speed2) };
}

function nTabs(thisObj, Num) {
    if (thisObj.className == "active") return;
     
    var tabObj = thisObj.parentNode.id;
     
    var tabList = document.getElementById(tabObj).getElementsByTagName("li");
   
    for (i = 0; i < tabList.length; i++) {
        if (i == Num) {
            thisObj.className = "active";
            document.getElementById(tabObj + "_Content" + i).className = "block";
        }
        else {
            tabList[i].className = "normal";
    
            document.getElementById(tabObj + "_Content" + i).className = "none";
        }
    }
}

function cSize(size) {
    var obj = getElementById("article"); obj.style.fontSize = size + "px";
}

function copyUrl() {
    getElementById("ArtUrl").value = document.location.href;
    ToCopy("ArtUrl");
}
//复制文本框字符串
function ToCopy(ob) {
    var obj = FindObj(ob);
    if (obj) {
        obj.select();
        js = obj.createTextRange();
        js.execCommand("Copy");
        alert("成功复制到你的剪贴板，你可以直接粘贴！");
    }
}	
