/* determine page protocol */var myTemp = window.location.href;var tempSplit = myTemp.split(":");var pageProt = tempSplit[0];//scene7 url prependvar imgURLpre = "";var companyName = "GolfGalaxy";/* determine correct image path to use based on protocol (http vs https)*/switch (pageProt) {  case "http":		imgURLpre = i_jscript_uu_ext_image_URL_2;		break;  case "https":		imgURLpre = i_jscript_uu_ext_image_SURL_2;  	break;}/* USEFUL SCENE7 FUNCTIONS *//* function to popup the image zoomer ** Pass the product's pf_id (or pf_id plus prefix or suffix for image or render sets) as image_name** the passed in image will appear in the popup zoomer*/function simple_pop_args(image_name){		var imgheight = 680;	var imgwidth = 600;		var popUpImageSRC = "http://s7d2.scene7.com/s7ondemand/zoom/flasht_zoom.jsp?company="+companyName+"&sku="+image_name+"&config=08config&zoomwidth="+imgwidth+"&zoomheight="+imgheight+"&viewer=/is-viewers-3.7/flash/genericzoom.swf";		//var popUpImageSRC = "http://s7ondemand7.scene7.com/s7ondemand/zoom/flasht_zoom.jsp?company="+companyName+"&sku="+image_name+"&zoomwidth=600&zoomheight=600";		//var popUpImageSRC = "http://s7d2.scene7.com/s7ondemand/zoom/flashb_zoom.jsp?company="+companyName+"&sku="+image_name+"&zoomwidth=420&zoomheight=470&vc=skin%3d/is-viewers/flash/genericzoom.swf%26modifier%3dop_sharpen=1";		var extraWindow = open(popUpImageSRC, 'Zoomer', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=yes,copyhistory=yes,width='+imgwidth+',height='+imgheight+',top=0,left=0');	extraWindow.window.focus();	extraWindow = null;	return false; //so that page does not change}/* function to return a string containing the image html** Pass in the product's pf_id as image_name** Pass in the image format as image_format** Pass in the alt text as alt_text** Optionally, pass in an id you wish to set for the image as image_id ** image_id also becomes the image's name** set to null if you do not want to use an id** Optionally, pass in a class name (for css) you wish to set for the image as class_name** set to null if you do not want to use a class** returns a string containing image html*/function get_S7_image(image_name, image_format, alt_text, image_id, class_name){	var swatchFormat = "s7swatch";	var image_output = "";				image_output += "<img border=\"0\" src=\""+imgURLpre+ image_name + "?$" + image_format + "$\" alt=\"" + alt_text + "\" title=\"" + alt_text + "\"";	//if there is an image_id to set...	if (typeof image_id != 'undefined' && image_id != null) { image_output += " id=\"" + image_id + "\" name=\"" + image_id + "\"";}	if (typeof class_name != 'undefined' && class_name != null) { image_output += " class=\"" + class_name + "\"";}		//if a swatch...	if(image_format == swatchFormat) {		image_output +=" onClick=\"imgSwap('" + image_name + "','"+escape(alt_text)+"');\"";	}		image_output +=" onerror=\"this.src = '"+imgURLpre+"image_coming_soon?$" + image_format + "$';\">";			return(image_output);}/* function to draw the image file with a particular image format** Calls the get_S7_image function to create a string of the image, then prints it out** see get_S7_image function for details on remaining parameters*/function draw_S7_image(image_name, image_format, alt_text, image_id, class_name){	var image_output = get_S7_image(image_name, image_format, alt_text, image_id, class_name);	document.write(image_output);}/* function to draw image with a link to the popup zoomer** Calls the draw_S7_image function print out image** Pass in the name of the image to zoom ** followed by all the inputs for the draw_S7_image function** see draw_S7_image function for details on remaining parameters*/function draw_s7_image_wZoomLink (zoom_image_name,image_name, image_format, alt_text, image_id, class_name){		draw_S7_image(image_name, image_format, alt_text, image_id, class_name);	document.write('<div id="selectedColor"> </div>');	//only show zoom image/link unless enable_quote is checked	if (enable_quote!=1){ document.write('<div style="display:block; text-align:left; vertical-align:bottom;"><a href=../"#" onclick="return(simple_pop_args(\''+zoom_image_name+'\'));"><img src="assets/images/0000_universal/btns/btnViewLargerimage.gif" border="0" align="absmiddle"></a></div>');}	}/* image swatch changer */function imgSwap(pfid, name){	var element,element2;	if (document.all){		element=document.all.mainimage;		element2=document.all.selectedColor;	}else{		if (document.getElementById){			element=document.getElementById('mainimage');			element2=document.getElementById("selectedColor");		}	}			//change main image	if (element){element.src = imgURLpre + pfid + "?$s7product$";}		name = unescape(name);		//change display color name	if (element2){element2.innerHTML = (name!="" ? "Shown: "+name : " ");}}//imgSwapfunction get_logo_image(image_name, image_format, alt_text, image_id, class_name){	var swatchFormat = "s7swatch";	var image_output = "";				image_output += "<img border=\"0\" src=\""+imgURLpre+ image_name + "?$" + image_format + "$\" alt=\"" + alt_text + "\"";	//if there is an image_id to set...	if (typeof image_id != 'undefined' && image_id != null) { image_output += " id=\"" + image_id + "\" name=\"" + image_id + "\"";}	if (typeof class_name != 'undefined' && class_name != null) { image_output += " class=\"" + class_name + "\"";}		//if a swatch...	if(image_format == swatchFormat) image_output +=" onClick=\"imgSwap('" + image_name + "','"+escape(alt_text)+"');\"";		image_output +=" onerror=\"this.src = '"+imgURLpre+"blank_logo?$" + image_format + "$';\">";			return(image_output);}function draw_logo_image(image_name, image_format, alt_text, image_id, class_name){	var image_output = get_logo_image(image_name, image_format, alt_text, image_id, class_name);	document.write(image_output);}function WriteLinks(){	for (atn=0;atn< sa_array.length ;atn++)	{		if (sa_array[atn].name.toLowerCase()=="brand")		{			document.write("<table width=150 cellpadding=0 cellspacing=0><tr><td width=150>");			//document.write("<img src='../"+ imgURLpre + vendorcode + "_logo' onerror=\"this.src='assets/images/clear.gif';\">");			//document.write("<img src='../assets/images/logos/" + sa_array[atn].value + "_logo.gif' onerror=\"this.src='assets/images/clear.gif';\">");			draw_logo_image(sa_array[atn].value.toLowerCase() + "_logo", "s7_swatch", sa_array[atn].value, sa_array[atn].value, "logo");			document.write("</td></tr></table>");				}					}} //writelinks