//2012-01-23

ImgMin=551;
ImgMax=580;
smallsize=100;//size when image is shrinken
////////////////////////////////////////////////////

ImgMin=new Number(ImgMin);
ImgMax=new Number(ImgMax);
tourokuImg=ImgMax-ImgMin+1;;
BBheight=new Number(380);
BBwidth=new Number(590);
BBheightReal=new Number(480);
BBwidthReal=new Number(690);

function drwBB(){
////////////////////////////////////////////////////
var imgs=new Array(tourokuImg)
imgs[551]="http://www.nissen.co.jp/all/event/PL12SP001_001_springcoat/images/coorde03.jpg";
imgs[552]="http://img.7netshopping.jp/bks/images/i8/4946841017691.jpg";
imgs[553]="http://www.bellemaison.jp/product/pic_m/2002011D/366085pm01_20011D.jpg";
imgs[554]="http://www.bellemaison.jp/product/pic_m/490201203/376945pm01_4901203.jpg";
imgs[555]="http://www.bellemaison.jp/product/pic_m/420201201/395793pm01_4201201.jpg";
imgs[556]="http://www.nissen.co.jp/sho_item/regular/sho_images/1810_62025b.jpg";
imgs[557]="http://www.bellemaison.jp/product/pic_m/4402011B1/394194pm01_44011B1.jpg";
imgs[558]="http://www.caina.jp/data/commodity_color/photo/15559_img.jpg";
imgs[559]="http://www.dhc.co.jp/category/detail/32203/32203_1.jpg";
imgs[560]="http://www.bellemaison.jp/product/pic_m/4852012A/926964pm01_48512A.jpg";
imgs[561]="http://www.dinos.co.jp/kp/defaultMall/images/goods/C15/0125/etc/760202c1.jpg";
imgs[562]="http://www.nissen.co.jp/sho_item/regular/sho_images/8509_01304b.jpg";
imgs[563]="http://a248.e.akamai.net/f/248/14050/1d/www.dinos.co.jp/kp/defaultMall/images/goods/C15/0125/etc/762102c1.jpg";
imgs[564]="http://a248.e.akamai.net/f/248/14050/1d/www.dinos.co.jp/kp/defaultMall/images/goods/C15/0125/etc/761601c1.jpg";
imgs[565]="http://img.7netshopping.jp/bks/images/i4/4560314700967.jpg";
imgs[566]="http://www.caina.jp/img/mainbanner/left/aeron10.jpg";
imgs[567]="http://a248.e.akamai.net/f/248/14050/1d/www.dinos.co.jp/kp/defaultMall/images/goods/D17/0124/enl/284706f3.jpg";
imgs[568]="http://a248.e.akamai.net/f/248/14050/1d/www.dinos.co.jp/kp/defaultMall/images/goods/C15/0125/enl/764704f2.jpg";
imgs[569]="http://img5.zozo.jp/goodsimages/510/2112510/2112510_8_D_500.jpg";
imgs[570]="http://www.nissen.co.jp/sho_item/regular/sho_images/8509_62102b.jpg";
imgs[571]="http://www.caina.jp/data/commodity_images/photo/4660_img.jpg";
imgs[572]="http://img5.zozo.jp/goodsimages/451/2306451/2306451_18_D_500.jpg";
imgs[573]="http://www.shop.jal.co.jp/sp/netsubou_bag/img/01/img_photo2.jpg";
imgs[574]="http://www.nissen.co.jp/sho_item/regular/sho_images/8509_03403b.jpg";
imgs[575]="http://www.bellemaison.jp/product/pic_m/490201203/376944pm01_4901203.jpg";
imgs[576]="http://www.bellemaison.jp/product/pic_m/420201201/395789pm01_4201201.jpg";
imgs[577]="http://img.bellemaison.jp/product_2/pic_x/4402011B1/387249px01_44011B1.jpg?sr.zmx=500&sr.zmy=500&sr.fbw=1";
imgs[578]="http://www.shop.jal.co.jp/images/goods/35890/35890_3589001_m.jpg";
imgs[579]="http://www.shop.jal.co.jp/images/goods/36455/36455_36455_m.jpg";
imgs[580]="http://img.7netshopping.jp/bks/images/i6/4547853511193.jpg";

////////////////////////////////////////////////////
var urls=new Array(tourokuImg)
urls[551]="http://www.nissen.co.jp/all/event/PL12SP001_001_springcoat/index.htm?2nd=ntop_018_009";
urls[552]="http://www.7netshopping.jp/food/detail/-/accd/2100687228/pg_from/rcmd_detail_2100687227";
urls[553]="http://www.bellemaison.jp/100/pr/2002011D/366085/?DM4_KBN=wdi_120118";
urls[554]="http://www.bellemaison.jp/100/pr/490201203/376945/";
urls[555]="http://www.bellemaison.jp/100/pr/420201201/395793/";
urls[556]="http://www.nissen.co.jp/sho_item/regular/1810/1810_62025.asp?book=1810&cat=cate017&bu=5339&thum=cate017_003_006_000-01";
urls[557]="http://www.bellemaison.jp/100/pr/4402011B1/394194/";
urls[558]="http://www.caina.jp/commodity_detail/57347618";
urls[559]="http://www.dhc.co.jp/goods/goodsdetail.jsp?gCode=32203&sc_iid=catop_health_01_bn2";
urls[560]="http://www.bellemaison.jp/100/pr/4852012A/926964/";
urls[561]="http://www.dinos.co.jp/p/1336700090/";
urls[562]="http://www.nissen.co.jp/all/event/PL11WI001_008_good_seller/index.htm?2nd=ntop_018_008";
urls[563]="http://www.dinos.co.jp/c3/005062263/1a2/";
urls[564]="http://www.dinos.co.jp/p/1336700093/";
urls[565]="http://www.7netshopping.jp/beauty/detail/-/accd/2104953504/subno/1";
urls[566]="http://www.caina.jp/pages/information/20120117";
urls[567]="http://www.dinos.co.jp/p/1129300240/";
urls[568]="http://www.dinos.co.jp/p/1125202370/";
urls[569]="http://zozo.jp/shop/unitedarrows/goodssale.html?gid=1112510&rid=1003";
urls[570]="http://www.nissen.co.jp/sho_item/regular/8509/8509_62102.asp?book=8509&cat=cate017&bu=2&thum=cate017_003_000_000-01";
urls[571]="http://www.caina.jp/commodity_detail/81237438";
urls[572]="http://zozo.jp/shop/nanouniverse/goodssale.html?gid=1306451&rid=1003";
urls[573]="http://www.shop.jal.co.jp/info/CSfInfo.jsp?sm&df=netsubou_bag&ic=index&sp";
urls[574]="http://www.nissen.co.jp/sho_item/regular/8509/8509_03403.asp?cat=cate001&bu=123456&book=8444&anken=SL12SP101";
urls[575]="http://www.bellemaison.jp/100/pr/490201203/376944/";
urls[576]="http://www.bellemaison.jp/100/pr/420201201/395789/";
urls[577]="http://www.bellemaison.jp/ep/srvlt/EPFB00/EPFB0005/dProdDtlShow?KAT_BTGO=387249_440_2011_B1&BELN_SHOP_KBN=100&viewname=bm_j101&SHNCRTTKKRO_KBN=R6&xprod=392810&xprod=387432&xprod=387247&xprod=387434&xprod=387423&xprod=335099&xprod=361038&xprod=392810&xprod=828190&xprod=340763&cat=100_100405&num=5&rqid=1327298815571&view=bm_j101";
urls[578]="http://www.shop.jal.co.jp/disp/CSfGoodsPage_001.jsp?GOODS_NO=37880";
urls[579]="http://www.shop.jal.co.jp/disp/CSfGoodsPage_001.jsp?GOODS_NO=38980&dispNo=006003012";
urls[580]="http://www.7netshopping.jp/stationery/detail/-/accd/2104942936/subno/1";

////////////////////////////////////////////////////



for(i=ImgMin;i<=ImgMax;i++){
Rtop=Math.floor(Math.random()*BBheight)-15;
Rlft=Math.floor(Math.random()*BBwidth)-15;
Rxix=Math.ceil(Math.random()*100);


a1="<a href=\"imgBB/footprint.html?url="+urls[i]+"\" target=\"_blank\">";
a2="<img src=\""+imgs[i]+"\" style=\"position:absolute;top:"+Rtop+"px;left:"+Rlft+"px;z-index:"+Rxix+";width:"+smallsize+"px;border:1px dashed #dc143c;\" alt=\"img"+i+"\" id=\"BBimgId"+i+"\" onMouseover=\"bringTop("+i+")\" onMouseout=\"shrinkIt("+i+")\" onmousedown=\"picMove1(event)\">";
a3="</a>";
a4="<input type=\"hidden\" value=\""+Rtop+"\" size=\"4\" name=\"imgTop"+i+"\"><input type=\"hidden\" value=\""+Rlft+"\" size=\"4\" name=\"imgLft"+i+"\">"
document.write(a1+a2+a3+a4);

	}
}

///*************************

function bringTop(qem){
vZ=new Number(document.fimgBB.iimgBB.value);

var zour=document.getElementById("BBimgId"+qem);
      zour.style.zIndex=vZ;
      zour.style.width="";
      zour.style.height="";
document.fimgBB.iimgBB.value=vZ+1;

	pp="BBimgId"+qem;
	pH=document.fimgBB[pp].height;
	//document.fimgBB.thisPicY1.value=pH;
	pW=document.fimgBB[pp].width;
	//document.fimgBB.thisPicX1.value=pW;

	var imgTop="imgTop"+qem;
	var imgLft="imgLft"+qem;
	getYy=new Number(document.fimgBB[imgTop].value);
	getXx=new Number(document.fimgBB[imgLft].value);
	
	if(getYy<0){;
	imgY=0;
	}else if(getYy+pH>BBheightReal){;
	imgY=BBheightReal-pH;
	}else{;
	imgY=getYy;
	};

	if(getXx<0){;
	imgX=0;
	}else if(getXx+pW>BBwidthReal){;
	imgX=BBwidthReal-pW;
	}else{;
	imgX=getXx;
	};

      zour.style.top=imgY+"px";
      zour.style.left=imgX+"px";

document.fimgBB.thisPicX1.value=BBwidthReal;
document.fimgBB.thisPicY1.value=getYy+pH;

}

function shrinkIt(oue){

      var imgTop="imgTop"+oue;
      var imgLft="imgLft"+oue;
      getYy=document.fimgBB[imgTop].value;
      getXx=document.fimgBB[imgLft].value;
      var zoure=document.getElementById("BBimgId"+oue);
      zoure.style.width=smallsize+"px";
      zoure.style.top=getYy+"px";      
      zoure.style.left=getXx+"px";
      zoure.style.border="1px dashed #444444";
//document.fimgBB.thisPicX1.value=imgTop;
}

function picMove1(event){
if(event.pageX){
	var dx=event.pageX;
	var dy=event.pageY;
}else{
	var dx=event.x;
	var dy=event.y;
}
//document.fimgBB.thisPicY1.value=dy;
//document.fimgBB.thisPicX1.value=dx;
}

