
function noImageCopy() {
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;}
else if (document.all&&!document.getElementById){document.onmousedown=clickIE4;}
document.oncontextmenu=new Function("alert('All photos on this website are copyright.');return false")
function clickIE4(){
if (event.button==2){
alert("All photos on this website are copyright.");
return false;}}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert("All photos on this website are copyright.");
return false;
}}}
}
function fixImage(img){img.src="/GLOBAL/Bronze/images/noimage.gif";}
function showImage(img,bigimg,idcount){document.getElementById('mainpichref').href = "Javascript:myLightbox.start(img" + idcount + ");";document.getElementById('mainpic').src=img;}
function xReplace(checkMe,toberep,repwith)
{
var temp = checkMe;
var i = temp.indexOf(toberep);
temp = temp.replace(toberep, repwith);
return temp;
}
function FavxReplace(checkMe,toberep,repwith)
{
var temp = checkMe;
var i = temp.indexOf(toberep);
while(i > -1){
	temp = temp.replace(toberep, repwith);
	i = temp.indexOf(toberep);}
return temp;
}
function popupWindow(url,inheight,inwidth)
{
	optionsStr = "height=" + inheight + ",width=" + inwidth + ",location=0,menubar=1,scrollbars=1,status=0,toolbar=0"
	newwindow=window.open(url,'newWindow',optionsStr);
	if (window.focus) {newwindow.focus()}
	return false;
}

function bulletFeatures(txt)
{
	txt = FavxReplace(txt,",","<br>- ");
	document.write("- "  + txt);
}

function cleanPrice(txt)
{
	document.write(txt);
}

function drawPaging(pageCount, pageNumber, prevURL, nextURL)
{
	if ((prevURL=='') && (nextURL=='')){return;}
	var outURL;
	var j=1;
	var i=1;
	maxPages = 10;
	padPages = 2;

	if (prevURL!=""){myURL = prevURL; curPage = ((pageNumber*1)-1)}
	if (nextURL!=""){myURL = nextURL; curPage = ((pageNumber*1)+1)}	
	if (pageNumber>1){document.write("<a class='pagenav' href='" +  "index.asp?page=2&searchagain=" + prevURL + "'><< Previous Page</a>");}		

	for (i=1;((i<=maxPages) && (i<=pageCount));i++){
		if (i==padPages+1){ 
				if (pageNumber>=(maxPages-padPages)){
						document.write(' .. ');
						j=pageNumber-1;
						if ((pageCount-j)<(maxPages-padPages)){j=pageCount-(maxPages-padPages)+1;}
				}}			
		if (i==maxPages-padPages+1) {
					if (j<pageCount-padPages+1){
					document.write(' .. ');
					j=pageCount-padPages+1;
					}}
		if (pageNumber==j){ 
				outURL = xReplace(myURL,"PAGENUMBER%3D" + curPage,"PAGENUMBER%3D" + (j*1));
				document.write("<a class='pagenav-current' href='" +  "index.asp?page=2&searchagain=" + outURL + "'>" + j + "</a>");				
			} else { 
				outURL = xReplace(myURL,"PAGENUMBER%3D" + ((pageNumber*1)+1),"PAGENUMBER%3D" + (j*1));
				document.write("<a class='pagenav' href='" +  "index.asp?page=2&searchagain=" + outURL + "'>" + j + "</a>");	
				}
				j++;}					
	if (pageNumber<pageCount){
		document.write("<a class='pagenav' href='" +  "index.asp?page=2&searchagain=" + nextURL + "'>Next Page >></a>");
	}
}


