//REPLACE L, G, K, Y, P, W, R, //change all function names function loadxy78() { //next line, omit var and it becomes a global array (use xy=[ not var xy=[ ) xy = [ ["",0,0] ,["7801G3553/E 10KT YELL",296,184] ,["7801G3553/P 10KT YELL",388,308] ,["7801JVJ4119 10KT YELL",340,407] ,["7802G3013E/WH 10KT YELL",99,76] ,["7802G3526/P 10KT YELL",226,83] ,["7802G3019/E 10KT YELL",351,91] ,["7802JVJ2194 10KT YELL",175,163] ,["7802JVJ3782 10KT YELL",291,183] ,["7802JVJ3656PTZ10KT YELL",158,523] ,["7802G3362P/PTZ10KT YELL",232,459] ,["7802G3383P/PTZ10KT YELL",339,462] ,["7802G3383E/PTZ10KT YELL",307,534] ,["7802ICJ3961/0210KT YELL",561,344] ,["7802ICJ3962/0210KT YELL",561,409] ,["7802ICJ3963/0210KT YELL",560,469] ,["7802ICJ3964/0210KT YELL",562,540] ,["7802ICJ3965/0210KT YELL",556,606] ,["7803ICG3034P0510KT W&P",72,512] ,["7803ICG3401P1410KT YELL",140,544] ,["7803ICG2897P1410KT WG",224,523] ,["7803ICG2891P0510KT YELL",302,544] ,["7803ICG3525P0910KT W&P",374,517] ,["7803G2538/P 10KT W&P",539,94] ,["7803G3360/P 10KT YELL",636,107] ,["7803G3353/P 10KT YELL",709,108] ,["7803G3209/P 10KT YELL",793,97] ,["7803JVJ3760 10KT YELL",553,226] ,["7803G2860/E 10KT YELL",661,185] ,["7803JVJ3917 10KT YELL",744,230] ,["7803G3232P/WH 10KT PINK",545,394] ,["7803ICG3287P0210KT WG",545,468] ,["7803G33284E/WH 10KT PINK",710,601] ,["7803G33284P/WH 10KT PINK",788,588] ,["7803JVJ3781 10KT PINK",653,517] ,["7803JVJ3756 10KT W&PK",718,593] ,["7803ICJ3627/0210KT PINK",788,466] ,["7804G3358/P 10KT YELL",109,94] ,["7804G3535/P 10KT W&P",197,104] ,["7804ICG3496P0310KT YELL",286,89] ,["7804ICG3517P1410KT YELL",372,97] ,["7804ICJ4100/0910KT YELL",121,253] ,["7804ICJ4036/0910KT YELL",234,302] ,["7804ICJ3913/0910KT WG",357,262] ,["7804G3492P/OP 10KT YELL",89,535] ,["7804G3492E/OP 10KT YELL",171,505] ,["7804JVJ4098/OP10KT YELL",159,589] ,["7804G3530P/WH 10KT YELL",275,509] ,["7804G3530E/WH 10KT YELL",374,505] ,["7804JVJ4099/WH10KT YELL",324,589] ,["7804ICJ3785/2010KT YELL",543,420] ,["7804ICG3426P0910KT YELL",668,452] ,["7804ICJ3994/7010KT Y&W",785,420] ,["7804ICJ3732/7014KT Y&W",547,505] ,["7804FIJ3644/7010KT Y&W",771,517] ,["7804ICJ3956/3014KT W&P",577,595] ,["7804ICJ4083/5014KT YELL",740,596] ,["7805ICG3554P0210KT WG",67,235] ,["7805ICG3554P0210KT YELL",130,258] ,["7805ICG3554P0210KT PINK",196,230] ]; } //for mouseover on flyer for price function xyp78(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 xy78(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 xy78old(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) } }