//<a href="index.asp" onClick="NewWindow(this.href,'centerpopup1','520','350','yes');return false;">
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

// Swap Images (details page) - <a href="#" onClick="SwapImage('upload/gallery/<%=(rsGallery.Fields.Item("LGimage").Value)%>'); return false;">
function SwapImage(imgNum){
document.myImage.src = imgNum;
}

//HTML - Forms and links : <%= Html_Preserve(PNotes) %>
function Html_Preserve(str) {
Html_Preserve = Replace(str, "<", "&lt;")
Html_Preserve = Replace(str, ">", "&gt;") 
Html_Preserve = Replace(str, vbcrlf, "<br>")
Html_Preserve = Replace(str, "&", "&amp;")
Html_Preserve = trim(str)
}

//Add Basket Button - onClick="window.document.form<%=ifo%>.Name.value = window.document.form<%=ifo%>.Iname.value + ', &nbsp;' + window.document.form<%=ifo%>.color.value"
//<img src="upload/images_lg/<%=(rsProduct.Fields.Item("LargeImages").Value)%>" alt="Large Image" name="embroidery_hoops_r1_c1" hspace="10" border="0" id="myImage">
function Combine() 
{ 
var pro1 = document.form1.Iname.value; 
var pro2 = document.form1.Color.value; 
document.form1.Name.value = pro1 + ", &nbsp; &nbsp;" + pro2; 
} 

function changeColor(theObj,theColor) 
{ 
theObj.bgColor = theColor; 
}
