function reg_Validator(f) {
				
	if (window.RegExp) {
	  var reg = new RegExp("[^ ]+", "gi");
	  
	  if (!reg.test(f.elements[0].value)) {
	    alert("评论标题不能为空！");
	    f.elements[0].focus();
	    return(false);
	  }
	}
	
	
	if (window.RegExp) {
	   var reg = new RegExp("[^ ]+", "gi");
	   if (!reg.test(f.elements[1].value)) {
	    alert("评论内容不能为空！");
	    f.elements[1].focus();
	    return(false);
	  }
	}
	
	if (window.RegExp) {
	   var reg = new RegExp("[^ ]+", "gi");
	   if (!reg.test(f.elements[2].value)) {
	    alert("请您填写验证码！");
	    f.elements[2].focus();
	    return(false);
	  }
	}
}
function rollover(shoe_view) {
    document["view" + shoe_view].src = small_on_images[shoe_view].src;
    document.targetimage.src = large_images[shoe_view].src;

    for (var i=1; i <= 8; i++) {
        if (i != shoe_view) {
            if (document["view" + i]) {
                document["view" + i].src = small_off_images[i].src;
            }
        }
    }
}



function ChgNav(curDiv) {
	navlist = new Array("navDtl", "navPay", "navDst", "navCmt");
	for(i=0;i<4;i++)
	{
		document.getElementById(navlist[i]).className = "";
		if( i < 3 )
			document.getElementById(navlist[i]+"_div").className = "comInfoOff"
	}

	document.getElementById(curDiv).className = "current" ;
	
	if(curDiv == "navCmt")
		document.getElementById("navDtl_div").className = "comInfoOn"
	else
		document.getElementById(curDiv+"_div").className = "comInfoOn"

}


//右侧栏
function HMRolling()
{
	this.version = "1.0.6.0227";
	this.name = "HMRolling";	
	this.HeaderText = "";		
	this.FooterText = "";		

	this.item = new Array();	
	this.itemcount = 0;
	this.mitem = new Array();	
	this.mitemcount = 0;
	this.curmitemidx = 0;
	this.itemdivision = 5;		
	
	this.AutoRepli = true;		
	this.AutoRolling = true;	

	this.currentspeed = 0;
	this.scrollspeed = 1000;	
	this.pausedelay = 1000;

	this.pausemouseover = false;
	this.stop = false;

	this.add = function()
	{
		var text = arguments[0];
		this.item[this.itemcount] = text;
		this.itemcount = this.itemcount + 1;
	}//add
	this.start = function()
	{	

		if(this.itemcount == "")
		{
			return;
		}

		var lp;
		if(this.itemcount % this.itemdivision == 0)
		{
			lp = parseInt(this.itemcount / this.itemdivision);
		}
		else
		{
			lp = parseInt(this.itemcount / this.itemdivision) + 1;
		}

		var curitemidx = 0;
		var contents = "";
		for(i = 0 ; i < lp ; i++)
		{
			for(j = 0 ; j < this.itemdivision ; j ++)
			{

				if(curitemidx >= this.itemcount)
				{
					if (this.AutoRepli == false)
					{
						break;
					}
					else
					{
						curitemidx = 0;
					}
				}
				contents += this.item[curitemidx];
				curitemidx++;				
			}
			this.mitem[i] = contents;
			contents = ""
			this.mitemcount = this.mitemcount + 1;
		}
		this.display();
		this.currentspeed = this.scrollspeed;
		this.stop = true;


		setTimeout(this.name+'.rolling()',this.currentspeed);
		window.setTimeout(this.name+".stop = false", this.pausedelay);

	}//start
	this.display = function()
	{
		document.write('<div id="'+this.name+'" style="position:relative; overflow:hidden; " OnMouseOver="'+this.name+'.onmouseover(); " OnMouseOut="'+this.name+'.onmouseout(); ">');
		
		document.write(this.HeaderText);
		document.write(this.mitem[0]);
		document.write(this.FooterText);
		
		document.write('</div>');
	}//display
	this.rolling = function()
	{

		if(this.AutoRolling == false) return;
		
		if (this.stop == false)this.next();
		
		window.setTimeout(this.name+".rolling()",this.scrollspeed);
	}//rolling
	this.next = function() 
	{
		if(this.curmitemidx >= this.mitemcount - 1)
		{
			this.curmitemidx = 0;
		}
		else
		{
			this.curmitemidx++;
		}
		var obj = document.getElementById(this.name);
		var contents = "";
		contents = this.HeaderText;
		contents += this.mitem[this.curmitemidx];
		contents += this.FooterText;
		obj.innerHTML = contents;

	}//next
	this.prev = function() 
	{
		if((this.curmitemidx) <= 0)
		{
			this.curmitemidx = this.mitemcount - 1;
		}
		else
		{
			this.curmitemidx--;
		}
		var obj = document.getElementById(this.name);
		var contents = "";
		contents = this.HeaderText;
		contents += this.mitem[this.curmitemidx];
		contents += this.FooterText;
		obj.innerHTML = contents;
	}//prev
	this.unext = function () 
	{
		this.onmouseover();
		this.next();
		window.setTimeout(this.name+".onmouseout()",this.pausedelay);
	}//unext
	this.uprev = function ()
	{
		this.onmouseover();
		this.prev();
		window.setTimeout(this.name+".onmouseout()",this.pausedelay);
	}//uprev
	this.onmouseover = function()
	{
		if(this.pausemouseover) this.stop = true;
	}//onmouseover
	this.onmouseout = function()
	{
		if(this.pausemouseover) this.stop = false;
	}//onmouseout
}//HMScroll

var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");

function CheckUIElements(){

     

//      setTimeout ("CheckUIElements()", timeoutNextCheck);

}

function OnLoad()
{	
      
	

      CheckUIElements();
      return true;
}
