window.onerror = function(){   
   return   true;   
}

$$$(function(){
	$$$("#button").DMenu("#content");
	show_comment();
	show_seller();
	show_photo();
});

function flash(ur,w,h){ 
document.write('<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+w+'" height="'+h+'">'); 
document.write('<param name="movie" value="'+ur+'">'); 
document.write('<param name="quality" value="high"> '); 
document.write('<param name="wmode" value="transparent"> '); 
document.write('<param name="menu" value="false"> '); 
document.write('<embed src="'+ur+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="'+w+'" height="'+h+'" quality="High" wmode="transparent">'); 
document.write('</embed>'); 
document.write('</object>'); 
} 

function setTab(m,n){
var tli=document.getElementById("tag").getElementsByTagName("div");
var mli=document.getElementById("tag_content").getElementsByTagName("div");
for(i=0; i<tli.length; i++){
tli[i].className=i==n?"main_tag_in":"main_tag_out";
mli[i].style.display=i==n?"block":"none";
}
}
function setRate(m,n){
var tli=document.getElementById("rateclass").getElementsByTagName("span");
for(i=0; i<tli.length; i++){
document.getElementById("rateclass"+i).className=i==n?"in_item":"out_item";
document.getElementById("rate_content"+i).style.display=i==n?"block":"none";
}
}

function setshowTab(m,n){

  var _s = document.getElementById("tag_set");
  _s.setAttribute("class", "show_tag_nochoose");
  _s.setAttribute("className", "show_tag_nochoose");
 
var tli=document.getElementById("tag").getElementsByTagName("li");
var mli=document.getElementById("tag_content").getElementsByTagName("div");
for(i=0;i<tli.length;i++){
tli[i].className=i==n?"show_tag_choose":"show_tag_nochoose";
document.getElementById("tag_content"+[i]).style.display=i==n?"block":"none";

 // alert("2");
 // document.getElementById("tag_set").className="show_tag_nochoose support";


//tli[i].className=i==n?"show_tag_choose":"show_tag_nochoose";
//mli[i].style.display=i==n?"block":"none";
}
 
}

function sethelpTab(n){
var tli=document.getElementById("tag").getElementsByTagName("span");
for(i=0;i<tli.length-1;i++){
document.getElementById("tag"+i).className=i==n?"help_list_close":"help_list_open";
document.getElementById("tag_content"+i).style.display=i==n?"block":"none";
}
}

function show_comment(){$$$("#seller_rec"+" li").each(function(c){$$$(this).mouseover(function(){$$$("#r"+"_"+c).toggle()}).mouseout(function(){$$$("#r"+"_"+c).toggle()})})
}

function show_seller(){$$$(".main_seller_content"+" a img").each(function(c){$$$(this).mouseover(function(){$$$("#seller"+"_"+c).slideDown('fast')}).mouseout(function(){$$$("#seller"+"_"+c).slideUp('fast')})})
}

function show_photo(){$$$(".acc_upphoto img:even").each(function(c){$$$(this).mouseover(function(){$$$("#pimg"+"_"+c).show('fast')}).mouseout(function(){$$$("#pimg"+"_"+c).hide('fast')})})
$$$(".acc_upphoto div a").each(function(){$$$(this).click(function(){$$$("#upload_pic").show();})})
}

function setRating(ratingBar,rate)
    {
        document.getElementById(ratingBar).style.width = rate * 15+"px";
        //document.frmProductReview.txtNumOfStar.value=rate;
    }