//REPLACE L, G, K, Y, P, W, R, //change all function names function loadxy48() { //next line, omit var and it becomes a global array (use xy=[ not var xy=[ ) xy = [ ["",0,0] ,["4801SBG3000/P 10KT WG",393,350] ,["4802SBJ3703 10KT YELL",92,103] ,["4802SBJ3761 10KT WG",235,105] ,["4802SBJ3724 10KT YELL",391,105] ,["4802SBJ3723/0014KT YELL",94,305] ,["4802SBJ3723/0014KT WG",218,350] ,["4802SBJ3700 10KT WG",144,568] ,["4802SBG3000/P 10KT WG",257,512] ,["4802SBJ3355 14KT WG",349,580] ,["4802SBJ3692/1010KT WG",577,100] ,["4802SBJ3692/1010KT YELL",683,141] ,["4802SBJ3704 14KT WG",828,332] ,["4802SBJ3775 10KT PINK",595,511] ,["4802SBJ3751 10KT WG",859,481] ,["4802SBJ3751 10KT YELL",763,524] ,["4802SBJ3751 10KT PINK",763,588] ,["4803SBJ3684/0014KT YELL",142,62] ,["4803SBJ3684/W 14KT YELL",168,107] ,["4803SBJ3684/0014KT WG",332,89] ,["4803SBJ2349/0014KT WG",261,311] ,["4803SBJ3577/3014KT Y&W",134,480] ,["4803SBJ3686/3014KT WG",352,483] ,["4803SBJ3722/0014KT Y&W",235,562] ,["4803SBG3032/P 10KT WG",605,82] ,["4803SBG3032/E 10KT WG",805,76] ,["4803SBJ3711/0010KT WG",708,148] ,["4803SBJ3698 14KT YELL",612,334] ,["4803SBJ3698 14KT PINK",675,334] ,["4803SBJ3698 14KT WG",722,334] ,["4803SBJ3705 14KT WG",602,492] ,["4803SBG2997/E 10KT WG",800,498] ,["4803SBJ3707 14KT WG",729,573] ,["4804SBJ3770 10KT WG",161,60] ,["4804SBJ3710 10KT WG",339,65] ,["4804SBJ3573 10KT WG",162,189] ,["4804SBJ3638 14KT WG",340,189] ,["4804SBJ3763 10KT WG",163,399] ,["4804SBJ980/00 10KT WG",341,402] ,["4804SBJ3447 10KT WG",154,547] ,["4804SBJ3448 14KT YELL",342,542] ,["4804SBJ3762 14KT WG",666,84] ,["4804SBJ3762/W 14KT WG",680,116] ,["4804SBJ3701 14KT Y&W",766,170] ,["4804SBJ3701/W 14KT YELL",771,238] ,["4804SBJ3721/0014KT WG",657,273] ,["4804SBJ3721/W 14KT WG",666,335] ,["4804SBJ3729 14KT WG",756,427] ,["4804SBJ3729/W 14KT PINK",788,482] ,["4804SBJ2339/5514KT WG",669,522] ,["4804SBJ2339/W 14KT WG",703,568] ,["4805SBJ3767 10KT WG",113,104] ,["4805SBJ3768 10KT PINK",361,354] ]; } function xy48(book) { //xy77(7702) book is actually the spread //alert(book); var x,y; var zoom = document.documentElement.clientWidth / window.innerWidth; x=(mouse_x/zoom)-(document.getElementById("div620t1").offsetLeft/zoom)-(document.getElementById("flyer_sprd").offsetLeft/zoom); y=mouse_y-document.getElementById("div620").offsetTop; x=x/(document.getElementById("flyer_ndx").width/zoom)*230; //ok to use flyer_ndx becuase that was how it was scaled y=y/(document.getElementById("flyer_spread").height)*675; y=y/zoom; loadxy48(); var minx; minx=0; 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) } }