// JavaScript Document
function setPic(pic,width,height,alt){
	
	pic =  decode64(pic);
	
	writestr = "<img src='"+pic+"' ";
	if(width!=0){
		writestr+=" width="+width;
	}
	if(height!=0){
		writestr+=" height="+height;
	}
	writestr = writestr+" alt='"+alt+"' align=\"absmiddle\" />";
	
	document.write(writestr);
}

function getpic(thispic,pic){
	
	pic =  decode64(pic);
	thispic.src = pic;
}
function tihuan()
{
	str = decode64(str);
	
	document.getElementById("goods_desc").innerHTML = str;
}
function qingchu(){
	
	var goods_desc = document.getElementById("goods_desc");
	
	var embed = goods_desc.getElementsByTagName("embed");
		
	for(var i=0;i<embed.length;i++){
		
		goods_desc.removeChild(embed[i]);
		
	}
	
			
}
function clickurl(urlid){
	if(urlid==''){	
		window.open("http://s.click.taobao.com/t_9?p=mm_10138119_0_0&l=http%3A%2F%2Fmall.taobao.com%2F&eventid=111");		 
	}
	else{
		urlid =  decode64(urlid);
		var a = document.createElement('a'),   
			b = '_blank',   
			bd = document.body,   
			target = arguments[1]== b ?b:'_self';   
		
		if(!a.click) {   
			return window.open(urlid,b);   
		}   
		a.setAttribute("target",b);   
		a.setAttribute('href', urlid);  
		a.style.display = 'none';   
		if(!bd) return ;   
		bd.appendChild(a);   
		a.click();   
		if (target == b) {   
		  bd.removeChild(a);           
		}   
	}
}
