function replace(string) { var pattern = /_600x800/g; var newString = string.replace(pattern, ""); return newString; } function swaplink(imageid, imageobject) { //alert("imageid: " + imageid + " imageobject: " + imageobject.name); document.getElementById(imageid).src = imageobject.src; } function swaplink_print(imageid, imageobject, textid, stylename) { //alert("imageid: " + imageid + " imageobject: " + imageobject.name); document.getElementById(imageid).src = imageobject.src; if((textid != "") || (textid != undefined)) document.getElementById(textid).className = stylename; } function popupImage(){ var windowName = 'BigImageWindow'; var features = 'width=' + popWidth + ',height=' + popHeight + ', status=yes, resizable=yes'; popEnlargeImg = window.open (ImageGallery_image599[intLastpressed], windowName, features); popEnlargeImg.focus(); } function swaplink_print_over() { swaplink_print("printimageid", PrintLinkSelected,"printanchorid","LinksGroupText"); } function swaplink_print_out() { swaplink_print("printimageid", PrintLinkUnselected,"printanchorid","LinksGroupText"); } function print_window_open() { var strUrl = "/fr/fr/Vehicles/Discovery/Gallery/Discovery_photos.htm" + "?printPage=" + intLastpressed; window.open(strUrl,'Print','height=580,width=640,menubar=yes,resizable=yes,scrollbars=yes,titlebar=0,toolbar=no'); } function popupPrint(){ } function doNextPrev(intNumber) { if((intLastpressed + intNumber) > (ImageGallery_textArray.length-1)){ intLastpressed = 0; switchPicture(intLastpressed); switchText(intLastpressed); doHighlight(intLastpressed); } else if((intLastpressed + intNumber) < 0) { intLastpressed = ImageGallery_textArray.length - 1; switchPicture(intLastpressed); switchText(intLastpressed); doHighlight(intLastpressed); } else { intLastpressed = intLastpressed + intNumber; switchPicture(intLastpressed); switchText(intLastpressed); doHighlight(intLastpressed); } switchCounter(intLastpressed); } function switchCounter(intNumber) { if (document.getElementById){ document.getElementById("counter").innerHTML = "Image " + (intLastpressed + 1) + " sur " + ImageGallery_textArray.length; } } function generateGallery() { var introws = Math.floor(ImageGallery_textArray.length / 4) + 1; var intStart = 0; var intEnd = 3; document.write('