//REPLACE L, G, K, Y, P, W, R, //change all function names function loadxy81() { //next line, omit var and it becomes a global array (use xy=[ not var xy=[ ) xy = [ ["",0,0] ,["8101LGJ206/20014KT Y&W",360,418] ,["8102LPJ265/30014KT WG",713,221] ,["8103LGJ3729 14KT WG",86,72] ,["8103LGJ3729 14KT WG",174,144] ,["8103LGJ3729 14KT WG",371,114] ,["8103LGJ3729 14KT WG",683,160] ,["8103LGJ3729 14KT WG",740,251] ,["8103LGJ3729/W 14KT YELL",774,179] ,["8103LGJ3729/W 14KT YELL",645,258] ,["8104LGJ113/30014KT WG",381,274] ,["8104LGJ113/30014KT WG",827,103] ,["8105LGJ081/20014KT WG",177,251] ,["8105LGJ085/20014KT WG",241,257] ,["8105LGJ084/30014KT WG",310,277] ,["8105LGJ081/20014KT WG",598,108] ,["8105LGJ085/20014KT WG",600,225] ,["8105LGJ084/30014KT WG",608,349] ,["8105LGJ245/20014KT YELL",812,93] ,["8105LGJ246/25014KT Y&W",820,344] ,["8106LGJ187/30014KT YELL",117,103] ,["8106LGG283P20010KT YELL",249,101] ,["8106LGJ267/20014KT YELL",380,138] ,["8106LGJ179/30014KT YELL",142,364] ,["8106LGJ273/30014KT YELL",367,294] ,["8106LGJ326/30014KT YELL",685,239] ,["8107LGG049N3 14KT WG",212,277] ,["8107LGG049N3 14KT YELL",712,309] ,["8107LGG049N3 14KT YELL",838,398] ,["8107LGG138E10010KT YELL",715,111] ,["8108LGG124E/5010KT WG",135,113] ,["8108LGJ006/00 14KT WG",336,110] ,["8108LGJ098/10014KT WG",126,271] ,["8108LGJ098/15014KT YELL",190,334] ,["8108LGJ098/20014KT WG",340,376] ,["8109LGG219N32514KT YELL",269,254] ,["8109LGG219E30014KT YELL",604,109] ,["8109LGJ274/20014KT YELL",786,113] ,["8109LGJ206/30014KT WG",604,339] ,["8109LGJ174/20014KT YELL",837,274] ,["8110LGG123E/5010KT YELL",114,129] ,["8110LGG123P/5010KT YELL",228,112] ,["8110LGJ227/20014KT YELL",370,118] ,["8110LGJ140/10014KT YELL",368,238] ,["8110LGJ243/30014KT YELL",158,352] ,["8110LGJ211/30014KT WG",354,339] ,["8110LGJ140/10014KT YELL",698,265] ,["8110LGG123P/5010KT YELL",808,254] ,["8111LGG146P10014KT YELL",185,141] ,["8111LGG145P10014KT YELL",175,235] ,["8111LGJ143/15014KT YELL",358,245] ,["8111LGJ129/20014KT YELL",387,189] ,["8111LGG183P10014KT YELL",541,90] ,["8111LGG146P10014KT YELL",645,99] ,["8111LGG145P10014KT YELL",760,115] ,["8111LGG150P10014KT YELL",883,127] ,["8111LGJ269/15014KT WG",607,206] ,["8111LGJ178/20014KT YELL",573,365] ,["8111LGJ143/15014KT YELL",718,328] ,["8111LGJ129/20014KT YELL",849,369] ,["8112LGJ018/20014KT WG",141,54] ,["8112LGJ005/00 14KT YELL",152,158] ,["8112LGJ003/75 14KT WG",152,362] ,["8112LGJ010/12014KT YELL",354,63] ,["8112LGJ077/20014KT WG",358,183] ,["8112LGJ022/15014KT WG",359,319] ,["8112LGJ018/20014KT WG",753,234] ,["8113LGG127P20010KT YELL",250,237] ,["8113LGG240/P 10KT YELL",611,109] ,["8113LGJ244/20014KT YELL",615,325] ,["8113LGJ256/20014KT YELL",821,123] ,["8113LGJ139/80 10KT YELL",829,226] ,["8113LGJ128 14KT YELL",825,327] ,["8114LGG048B2.014KT YELL",134,67] ,["8114LGG048B3.514KT WG",305,137] ,["8114LGG048B6.514KT YELL",274,264] ,["8114LGG048B11 14KT WG",202,376] ,["8114LGG048B6.514KT WG",746,209] ,["8114LGG048B3.514KT WG",774,199] ,["8114LGG048B11 14KT YELL",795,202] ,["8114LGG048B2.014KT WG",819,199] ,["8114LGG048B6.514KT WG",752,385] ,["8114LGG048B3.514KT WG",782,335] ,["8114LGG048B11 14KT YELL",805,385] ,["8114LGG048B2.014KT WG",833,314] ,["08115 ",89,350] ,["8115LGG083N/8 10KT YELL",276,282] ,["8115LGJ286/25 14KT YELL",605,113] ,["8115LGJ286/33 14KT WG",612,218] ,["8115LGJ286/50 14KT YELL",614,320] ,["8115LGG083N/8 10KT YELL",811,199] ,["8116LGG268P15010KT YELL",107,130] ,["8116LGG268E14010KT YELL",238,110] ,["8116LGG263P15010KT YELL",388,107] ,["8116LGJ279/15014KT YELL",149,321] ,["8116LGJ294/30014KT YELL",353,335] ,["8116LGJ290/20014KT YELL",731,235] ,["08117 ",152,257] ,["08117 ",278,199] ,["08117 ",326,314] ,["08117 ",333,271] ,["08117 ",465,211] ,["8117LGJ110/20014KT YELL",615,71] ,["8117LGJ142/20014KT Y&W",811,104] ,["8117LGJ058/30014KT WG",594,262] ,["8117LGJ282/25014KT YELL",717,361] ,["8117LGJ193/20014KT WG",837,265] ,["8118LGG079E10014KT YELL",102,108] ,["8118LGG079P10014KT YELL",224,133] ,["8118LGJ078/15014KT WG",370,73] ,["8118LGJ009/15014KT YELL",376,178] ,["8118LGG101E10014KT WG",106,304] ,["8118LGJ060/15014KT WG",245,344] ,["8118LGJ045/22514KT YELL",395,296] ,["8118LGJ060/15014KT YELL",579,333] ,["8118LGG079P10014KT YELL",753,357] ,["8118LGJ045/22514KT YELL",885,380] ,["8119LGJ159/15010KT YELL",234,208] ,["8119LGJ161/20014KT Y&W",619,98] ,["8119LGJ166/30014KT WG",619,315] ,["8119LGJ130/75 10KT YELL",836,96] ,["8119LGJ158/11010KT WG",834,209] ,["8119LGJ159/15010KT YELL",838,315] ,["8120LGG272P25010KT WG",166,130] ,["8120LGG046P15014KT WG",339,107] ,["8120LGJ112/30014KT WG",393,217] ,["8120LGJ116/30014KT WG",141,335] ,["8120LGJ264/30014KT WG",343,356] ,["8120LGG046P15014KT WG",694,144] ,["8120LGJ112/30014KT WG",823,299] ,["8120LGJ112/W 14KT WG",859,293] ,["8120LGJ112/W 14KT WG",830,338] ,["8121LGG172P/0010KT YELL",260,234] ,["8121LGJ086/30014KT YELL",227,292] ,["8121LGJ086/W 14KT YELL",282,297] ,["8121LGJ086/W 14KT YELL",263,325] ,["8121LGG172E/5010KT YELL",600,102] ,["8121LGG172P/0010KT YELL",719,110] ,["8121LGG162P50 10KT YELL",848,113] ,["8121LGJ086/30014KT YELL",604,246] ,["8121LGJ086/W 14KT YELL",621,354] ,["8121LGJ311/20014KT Y&W",823,319] ,["8122LGG248/P 10KT WG",113,126] ,["8122LGG050P10014KT WG",227,117] ,["8122LGG097P00 10KT WG",355,134] ,["8122LGG102E20014KT YELL",120,309] ,["8122LGJ099/75 14KT YELL",311,309] ,["8122LGJ099/W 14KT YELL",313,377] ,["8122LGG097P00 10KT WG",702,192] ,["8123LGG083N/E 10KT YELL",164,310] ,["8123LGG083N/E 10KT YELL",353,216] ,["8123LGG083N/E 10KT YELL",114,162] ,["8123LGG082E/E 10KT YELL",630,94] ,["8123LGG082N/E 10KT YELL",,["810,168] ,["8123LGJ069/E 10KT YELL",606,212] ,["8123LGG065B/E 10KT YELL",729,357] ,["8124LGJ072/S 10KT WG",130,61] ,["8124LGJ071/S 14KT WG",139,163] ,["8124LGJ277/S 10KT WG",144,253] ,["8124LGJ137/S 10KT WG",141,358] ,["8124LGG132E/S 10KT WG",352,101] ,["8124LGG118E/S 10KT WG",361,340] ,["08124 ",737,63] ,["08124 ",768,177] ,["08124 ",667,284] ,["08124 ",805,256] ,["08125 ",107,182] ,["08125 ",209,312] ,["08125 ",418,388] ,["8125LGJ070/R 10KT YELL",606,72] ,["8125LGJ067/R 10KT WG",606,163] ,["8125LGJ066/R 10KT YELL",607,261] ,["8125LGJ068/R 10KT WG",613,366] ,["8125LGJ293/R 10KT YELL",827,112] ,["8125LGJ287/R 10KT YELL",835,329] ,["8126LGG121E15010KT YELL",91,133] ,["8126LGG121P/7510KT YELL",201,85] ,["8126LGJ153/10014KT YELL",366,66] ,["8126LGJ075/20014KT YELL",370,154] ,["8126LGJ260/20014KT YELL",144,288] ,["8126LGJ160/15014KT WG",377,336] ,["8126LGG121P/7510KT YELL",709,150] ,["8126LGJ160/15010KT YELL",786,319] ,["8126LGJ075/20014KT YELL",843,249] ,["8127LGJ281/10010KT WG",229,192] ,["8127LGJ249/10010KT WG",613,119] ,["8127LGJ148/G 10KT WG",607,321] ,["8127LGJ039/00 10KT WG",844,62] ,["8127LGJ241/10010KT WG",835,162] ,["8127LGJ122/10010KT WG",836,261] ,["8127LGJ074/10010KT WG",832,373] ,["8128LGJ012 14KT WG",115,136] ,["8128LGJ002/10014KT WG",251,53] ,["8128LGJ011/10014KT Y&W",376,147] ,["8128LGJ019/20014KT WG",108,296] ,["8128LGJ134/20014KT YELL",253,361] ,["8128LGJ144/23014KT WG",385,292] ,["08128 ",697,169] ,["08128 ",748,156] ,["08128 ",748,217] ,["08128 ",757,284] ,["08128 ",790,256] ,["8129LGJ040/6 14KT WG",192,227] ,["8129LGJ042/6 14KT YELL",209,231] ,["8129LGJ043/6 14KT WG",220,249] ,["8129LGJ044/6 14KT YELL",234,251] ,["8129LGJ026/6 14KT WG",620,114] ,["8129LGJ004/20014KT YELL",617,330] ,["8129LGJ040/6 14KT WG",825,65] ,["8129LGJ042/6 14KT YELL",829,147] ,["8129LGJ043/6 14KT WG",829,251] ,["8129LGJ044/6 14KT YELL",831,366] ,["8130LGJ266 10KT YELL",142,72] ,["8130LGJ197/17514KT WG",141,244] ,["8130LGJ126/17510KT YELL",154,345] ,["8130LGJ071/D 14KT WG",361,70] ,["8130LGJ034 14KT YELL",368,161] ,["8130LGJ024/15014KT WG",367,263] ,["8130LGJ033/15014KT WG",368,364] ,["8130LGJ024/15014KT WG",799,155] ,["8130LGJ033/15014KT YELL",805,265] ,["08131 ",195,99] ,["08131 ",211,155] ,["08131 ",254,198] ,["08131 ",202,313] ,["8131LGG048B3.510KT WG",386,104] ,["8131LGG025P10014KT WG",616,103] ,["8131LGG025E10014KT WG",622,180] ,["8131LGG048B3.510KT WG",715,360] ,["8131LGJ020/10014KT WG",831,78] ,["8131LGJ020/20014KT WG",834,227] ,["8132LYJ278 10KT YELL",135,102] ,["8132LYG306P35010KT YELL",336,127] ,["8132LYG284P30014KT YELL",86,282] ,["8132LYG284E60014KT YELL",220,331] ,["8132LYJ291/40014KT YELL",366,367] ,["8132LYJ291/40014KT YELL",691,234] ,["8133LPG048B10 14KT WG",191,226] ,["8133LPJ276/30014KT WG",631,71] ,["8133LPJ265/30014KT WG",628,187] ,["8133LPG305P50010KT WG",829,124] ,["8133LPG048B10 14KT WG",671,296] ,["8133LPG280/B 14KT WG",791,377] ,["8134LVG386/20014KT YELL",137,124] ,["8134LVJ358/20014KT YELL",139,349] ,["8134LVJ184/20014KT YELL",355,101] ,["8134LVJ244/25014KT WG",358,226] ,["8134LVJ277/FGN14KT YELL",357,366] ,["8134LVJ358/20014KT YELL",715,221] ,["8135LBG048B10 14KT WG",247,231] ,["8135LBG275E50014KT WG",812,127] ,["8135LBG048B10 14KT WG",714,253] ,["8135LBJ270/30014KT WG",607,354] ,["8135LBJ271/30014KT WG",832,348] ,["8136LGG272P25010KT WG",228,265] ]; } //for mouseover on flyer for price function xyp81(book) { var x,y; var zoom = document.documentElement.clientWidth / window.innerWidth; x=(mouse_x/zoom)-(document.getElementById("div621").offsetLeft/zoom); //mobile version shifts first page of flyer when showing spreads //if (isMobileDevice) { alert("aaaa"); } if (flyershown.substr(2,2)=="01") { if (isMobileDevice) { x=x; }else{ x=x-parseInt(document.getElementById("div621").style.width)/2; } }else{ if (isMobileDevice) { if (isOdd(Number(flyershown.substr(2,2)))) { x=x+parseInt(document.getElementById("div621").style.width); } } } //if (flyershown.substr(2,2)=="01") { x=x-parseInt(document.getElementById("div621").style.width)/2; } x=x/0.95; x=x/(document.getElementById("flyer_ndx").width/zoom)*230; //ok to use flyer_ndx becuase that was how it was scaled y=mouse_y-document.getElementById("div620").offsetTop; y=y/(parseInt(document.getElementById("div621").style.height))*675; y=y/zoom; var minx=0; var fs=flyershown; if (isMobileDevice) { fs=Number(flyershown.substr(2,2)); fs=Math.floor(fs/2)+1; fs="0"+fs; fs=flyershown.substr(0,2)+fs.substr(fs.length-2,2); //need to convert pages to spreads } for (i=0; i0) { update_price(xy[minx][0].substr(4,10),xy[minx][0].substr(14,10)); var xypr=document.getElementById("i8").innerHTML.split(';')[1]; //everything after the first ; xypr=xypr+"<"; xypr=xypr.substring(0, xypr.indexOf("<")); //everything before the first < document.getElementById("flyer_overlay_txt").innerHTML = "
$"+xypr+"
"+"click for details
" y=xy[minx][2]*zoom; //y=y*(document.getElementById("flyer_spread").height)/675; y=y*(parseInt(document.getElementById("div621").style.height))/675; y=y+document.getElementById("div620").offsetTop; x=xy[minx][1]*(document.getElementById("flyer_ndx").width/zoom)/230; x=x+(document.getElementById("div621").offsetLeft/zoom); if (flyershown.substr(2,2)=="01") { x=x+parseInt(document.getElementById("div621").style.width)/2; } x=x*0.95; //entire spread reduced to 95% to show flip effect x=x+30; //move over beside image //if too close to right side, show at left //else show on right //x=x-25-50; if (x<0) { x=0; } //y=y-25; if (y<0) { y=0; } document.getElementById("flyer_overlay").style.left=x+"px"; document.getElementById("flyer_overlay").style.top=y+"px"; document.getElementById("flyer_overlay").style.display = "block"; }else{ document.getElementById("flyer_overlay").style.display = "none"; } //alert("done overlay"); } //calls ItemDetail from touch position on flyer function xy81(book) { var x,y; var zoom = document.documentElement.clientWidth / window.innerWidth; //alert(zoom); x=(mouse_x/zoom)-(document.getElementById("div621").offsetLeft/zoom); //alert(mouse_x+" | "+zoom+" | "+document.getElementById("div621").offsetLeft); //mobile version shifts first page of flyer when showing spreads if (flyershown.substr(2,2)=="01") { if (isMobileDevice) { x=x; }else{ x=x-parseInt(document.getElementById("div621").style.width)/2; } } //alert(x); //alert(document.getElementById("div621").style.width); //874 844 //alert(x); //if (flyershown.substr(2,2)=="01") { x=x-parseInt(document.getElementById("div621").style.width)/2; } //alert(document.getElementById("flyer_ndx").width); //1 for mobile if (isMobileDevice) { x=x-parseInt(document.getElementById("div621").offsetLeft/zoom); //85 x=x/parseInt(document.getElementById("div621").style.width)*470; if (flyershown.substr(2,2)=="01") { x=x; }else{ if (isOdd(Number(flyershown.substr(2,2)))) { x=x+470; } } }else{ x=x/0.95; x=x/(document.getElementById("flyer_ndx").width/zoom)*230; //ok to use flyer_ndx becuase that was how it was scaled } y=mouse_y-document.getElementById("div620").offsetTop; y=y/(parseInt(document.getElementById("div621").style.height))*675; y=y/zoom; var minx=0; var fs=flyershown; if (isMobileDevice) { fs=Number(flyershown.substr(2,2)); fs=Math.floor(fs/2)+1; fs="0"+fs; fs=flyershown.substr(0,2)+fs.substr(fs.length-2,2); //need to convert pages to spreads } //alert(flyershown+" | "+fs); //alert(xy.length); for (i=0; i0) { ItemDetail(xy[minx][0].substr(4,10),xy[minx][0].substr(14,10),"","1","","","","FLYER",""); // item, karat", colour,qty,sz,desc,price,tab,row) } } function xy81old(book) { //xy75(7502) book is actually the spread winsize(); var x,y; x=mouse_x-document.getElementById("div620t1").offsetLeft-document.getElementById("flyer_sprd").offsetLeft; x=x/document.getElementById("flyer_ndx").width*230; //ok to use flyer_ndx becuase that was how it was scaled y=((mouse_y-document.getElementById("div620").offsetTop)/winW*1280); //use winW*1280 instead of winH*752 because scaled by width var zoom = document.documentElement.clientWidth / window.innerWidth; y=y/zoom; loadxy75(); var minx; minx=0; for (i=0; i0) { ItemDetail(xy[minx][0].substr(4,10),xy[minx][0].substr(14,10),"1","","",""); //item,karat,canedit("Y" for yes) } }