//
function pd_bigprice(style,scale,color,tle,price,marketprice){
var str="<p style='margin-top:-"+(scale*30)+"px;' align=right>";
str+="<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 WIDTH="+60*scale+" HEIGHT="+60*scale+"><param name='FlashVars' value='price="+price+"&marketprice="+marketprice+"&c="+color+"&tle="+tle+"'><PARAM NAME=movie VALUE=http://images.amazon.cn/p/pd_050704_bigprice"+style+".swf> <PARAM NAME=menu VALUE=false>  <PARAM NAME=wmode VALUE=transparent><embed src=http://images.amazon.cn/p/pd_050704_bigprice"+style+".swf width="+60*scale+" height="+60*scale+" type=application/x-shockwave-flash wmode=transparent FlashVars='price="+price+"&marketprice="+marketprice+"&c="+color+"&tle="+tle+"'/></OBJECT>"
str+="</p>";
document.write(str)
}
function fixIE(){
	//fix iE display bugs
	if(navigator.appName.indexOf("Microsoft") != -1)document.write(unescape('%3Cdiv%20style%3D%27backgroud-color%3A%23ffffff%3Boverflow%3Ahidden%3Bheight%3A1px%27%3E%3Cimg%20src%3D%22http%3A//images.amazon.cn/b/blank.gif%22/%3E%3COBJECT%20classid%3Dclsid%3AD27CDB6E-AE6D-11cf-96B8-444553540000%20WIDTH%3D1%20HEIGHT%3D1%3E%3CPARAM%20NAME%3Dmovie%20VALUE%3Dhttp%3A//images.amazon.cn/i/ie_bugs_display_gap.gif%3F%3E%3Cparam%20name%3DFlashVars%20value%3D%22va%3Dida%22%3E%3CPARAM%20NAME%3Dwmode%20VALUE%3Dtransparent%3E%3Cembed%20src%3Dhttp%3A//images.amazon.cn/i/ie_bugs_display_gap.gif%3F%20FlashVars%3D%22va%3Dida%22%20width%3D1%20height%3D1%20type%3Dapplication/x-shockwave-flash%20wmode%3Dtransparent/%3E%3C/OBJECT%3E%3Cimg%20src%3D%22http%3A//images.amazon.cn/b/blank.gif%22/%3E%3C/div%3E'))
}

function PD_rebate(style,scale,color,tle,joyoprice,price){
//return;

var rebate=100*Number(joyoprice)/Number(price);
var style_height=new Array(0,27,60,60,60,60,60)
if(rebate<10)rebate=10
var str="<p style='margin-top:-"+(scale*style_height[style]/2)+"px;' align=right>";
str+="<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 WIDTH="+60*scale+" HEIGHT="+style_height[style]*scale+"><param name='FlashVars' value='price="+rebate+"&c="+color+"&tle="+tle+"'><PARAM NAME=movie VALUE=http://images.amazon.cn/p/pd_050704_rebate"+style+".swf> <PARAM NAME=menu VALUE=false>  <PARAM NAME=wmode VALUE=transparent><embed src=http://images.amazon.cn/p/pd_050704_rebate"+style+".swf width="+60*scale+" height="+style_height[style]*scale+" type=application/x-shockwave-flash wmode=transparent  FlashVars='price="+rebate+"&c="+color+"&tle="+tle+"'/></OBJECT>"
str+="</p>";
document.write(str)
}

function PD_rebate_txt(joyoprice,price){
var rebate=100*Number(joyoprice)/Number(price);
var str="";
if(rebate<10)rebate=10
str=rebate.toString().substring(0,2)
document.write(Number(str)/10)
}

function PD_save(joyoprice,price){
	var lngMoney=Number(price)-Number(joyoprice);
	if(isNaN(lngMoney)){return;}
	lngMoney = lngMoney + 0.001
	lngMoney = lngMoney.toString()
	var lngArray=lngMoney.split(".")
	document.write(lngArray[0]+"."+lngArray[1].substr(0,2))
}

function PD_cube(style,width,height,pic,prodid,shape,uid){
   var fo = new FlashObject("http://images.amazon.cn/p/pd_060722_shape"+style+".swf", "", width, height, "7", "#000000");
   // var fo = new FlashObject("/help/fhb_041018_map.swf", "", width, height, "7", "#000000");
   fo.addParam("wmode", "transparent");
   fo.addParam("menu", "false");
   fo.addParam("SCALE", "exactfit");
   fo.addParam("flashVars", "uid="+uid+"&pic="+pic+"&prodid="+prodid+"&shape="+shape);
   fo.write("cube"+prodid);
  // alert(document.all("cube"+prodid).innerHTML)
}
fixIE();

