function GroupDigits(strValue){strValue=strValue.toString().replace(/\$|\,/g,'');dblValue=parseFloat(strValue);blnSign=(dblValue==(dblValue=Math.abs(dblValue)));dblValue=Math.floor(dblValue*100+0.50000000001);intCents=dblValue%100;strCents=intCents.toString();dblValue=Math.floor(dblValue/100).toString();if(intCents<10)strCents="0"+strCents;for(var i=0;i<Math.floor((dblValue.length-(1+i))/3);i++)dblValue=dblValue.substring(0,dblValue.length-(4*i+3))+','+dblValue.substring(dblValue.length-(4*i+3));return dblValue;}function FormatLCD(strValue){strValue=strValue.toString().replace(/\$|\,/g,'');dblValue=parseFloat(strValue);dblValue=lcf*((dblValue-0.2)/1.2);blnSign=(dblValue==(dblValue=Math.abs(dblValue)));dblValue=Math.floor(dblValue*100+0.50000000001);intCents=dblValue%100;strCents=intCents.toString();dblValue=Math.floor(dblValue/100).toString();if(intCents<10)strCents="0"+strCents;for(var i=0;i<Math.floor((dblValue.length-(1+i))/3);i++)dblValue=dblValue.substring(0,dblValue.length-(4*i+3))+','+dblValue.substring(dblValue.length-(4*i+3));return(((blnSign)?'':'-')+lcp+dblValue+".00 "+lcs);}function FormatLCDShort(strValue){strValue=strValue.toString().replace(/\$|\,/g,'');dblValue=parseFloat(strValue);dblValue=lcf*((dblValue-0.2)/1.2);blnSign=(dblValue==(dblValue=Math.abs(dblValue)));dblValue=Math.floor(dblValue*100+0.50000000001);intCents=dblValue%100;strCents=intCents.toString();dblValue=Math.floor(dblValue/100).toString();if(intCents<10)strCents="0"+strCents;for(var i=0;i<Math.floor((dblValue.length-(1+i))/3);i++)dblValue=dblValue.substring(0,dblValue.length-(4*i+3))+','+dblValue.substring(dblValue.length-(4*i+3));return(((blnSign)?'':'-')+lcp+dblValue);}function formatCurrencyShort(strValue){strValue=strValue.toString().replace(/\$|\,/g,'');dblValue=parseFloat(strValue);dblValue=lcf*dblValue;blnSign=(dblValue==(dblValue=Math.abs(dblValue)));dblValue=Math.floor(dblValue*100+0.50000000001);intCents=dblValue%100;strCents=intCents.toString();dblValue=Math.floor(dblValue/100).toString();if(intCents<10)strCents="0"+strCents;for(var i=0;i<Math.floor((dblValue.length-(1+i))/3);i++)dblValue=dblValue.substring(0,dblValue.length-(4*i+3))+','+dblValue.substring(dblValue.length-(4*i+3));return dblValue;}function getFieldValue(name){var match=(new RegExp('[?&;]'+name+'=([^&;#]*)')).exec(location.search);return match?unescape(match[1]):"";}
var ss={fixAllLinks:function(){var allLinks=document.getElementsByTagName('a');for(var i=0;i<allLinks.length;i++){var lnk=allLinks[i];if((lnk.href&&lnk.href.indexOf('#')!=-1)&&((lnk.pathname==location.pathname)||('/'+lnk.pathname==location.pathname))&&(lnk.search==location.search)&&(lnk.pathname!='tab')&&(lnk.pathname!='#tab')){ss.addEvent(lnk,'click',ss.smoothScroll);}}},smoothScroll:function(e){if(window.event){target=window.event.srcElement;}else if(e){target=e.target;}else return;if(target.nodeName.toLowerCase()!='a'){target=target.parentNode;}if(target.nodeName.toLowerCase()!='a')return;anchor=target.hash.substr(1);var allLinks=document.getElementsByTagName('a');var destinationLink=null;for(var i=0;i<allLinks.length;i++){var lnk=allLinks[i];if(lnk.name&&(lnk.name==anchor)){destinationLink=lnk;break;}}if(!destinationLink)return true;var destx=destinationLink.offsetLeft;var desty=destinationLink.offsetTop;var thisNode=destinationLink;while(thisNode.offsetParent&&(thisNode.offsetParent!=document.body)){thisNode=thisNode.offsetParent;destx+=thisNode.offsetLeft;desty+=thisNode.offsetTop;}clearInterval(ss.INTERVAL);cypos=ss.getCurrentYPos();ss_stepsize=parseInt((desty-cypos)/ss.STEPS);ss.INTERVAL=setInterval('ss.scrollWindow('+ss_stepsize+','+desty+',"'+anchor+'")',10);if(window.event){window.event.cancelBubble=true;window.event.returnValue=false;}if(e&&e.preventDefault&&e.stopPropagation){e.preventDefault();e.stopPropagation();}},scrollWindow:function(scramount,dest,anchor){wascypos=ss.getCurrentYPos();isAbove=(wascypos<dest);window.scrollTo(0,wascypos+scramount);iscypos=ss.getCurrentYPos();isAboveNow=(iscypos<dest);if((isAbove!=isAboveNow)||(wascypos==iscypos)){window.scrollTo(0,dest);clearInterval(ss.INTERVAL);location.hash=anchor;}},getCurrentYPos:function(){if(document.body&&document.body.scrollTop)return document.body.scrollTop;if(document.documentElement&&document.documentElement.scrollTop)return document.documentElement.scrollTop;if(window.pageYOffset)return window.pageYOffset;return 0;},addEvent:function(elm,evType,fn,useCapture){if(elm.addEventListener){elm.addEventListener(evType,fn,useCapture);return true;}else if(elm.attachEvent){var r=elm.attachEvent("on"+evType,fn);return r;}else{alert("Handler could not be removed");}}};ss.STEPS=25;ss.addEvent(window,"load",ss.fixAllLinks);//sil, http://www.kryogenix.org/v1.1 2005-06-16 wrap it up in an object/revised GRA/DT
///////////////////////////////////////////////////////
var maxWidth = (window.screen.availWidth - 10);
var maxHeight = (window.screen.availHeight - 44);
var sW = (window.screen.width);
var sH = (window.screen.height);

function nwmax(theURL) { //v2.0
	var maxWidth = (window.screen.availWidth - 10);
	var maxHeight = (window.screen.availHeight - 44);
	newWinX = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,left=0,top=0,screenX=0,screenY=0,width=maxWidth,height=maxHeight');
	newWinX.focus()
}

<!-- // PDF brochures and manuals, minimal browser features, optimized window size -->
function nwbro(theURL) { //v2.0
	var maxHeight = (window.screen.availHeight - 60);
	if ( maxHeight > '600' ) {
		if (maxHeight > '768') {
			if (maxHeight > '1024') {
				newWinBro = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=950,height=1100');
				newWinBro.focus() // 1100 height and partial width for 1600x1200 and above
				}
			else {
				newWinBro = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=800,height=920');
				newWinBro.focus()	// full height and partial width for 1280x1024		
			}	
		}		
		else {
			newWinBro = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=600,height=690');
			newWinBro.focus()	// full height and partial width for 1024x768
		}
	}	
	else {
	 	nwmax(theURL) // max window for 800x600 and unknown resolutions
	}
}

<!-- // PDF LANDSCAPE (wide) brochures and manuals, minimal browser features, optimized window size -->
function nwbrow(theURL) { //v2.0
	var maxHeight = (window.screen.availHeight - 60);
	if ( maxHeight > '600' ) {
		if (maxHeight > '768') {
			if (maxHeight > '1024') {
				newWinBro = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=1200,height=800');
				newWinBro.focus() // for 1600x1200 and above
				}
			else {
				newWinBro = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=1000,height=700');
				newWinBro.focus()	// for 1280x1024		
			}	
		}		
		else {
			newWinBro = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=900,height=650');
			newWinBro.focus()	// for 1024x768
		}
	}	
	else {
	 	nwmax(theURL) // max window for 800x600 and unknown resolutions
	}
}

<!-- // 800-wide HTML windows with full browser features -->
function nw800full(theURL) { //v2.0
	var maxHeight = (window.screen.availHeight - 60);
	var maxWidth = (window.screen.availWidth - 10);	
	if ( maxHeight > '600' ) {
		if (maxHeight > '768') {
			if (maxHeight > '1024') {
				newWin800full = window.open(theURL,'','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,resizable=yes,width=800,height=950');
				newWin800full.focus() // 1100 height and partial-width for 1600x1200 and above
				}
			else {
				newWin800full = window.open(theURL,'','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,resizable=yes,width=800,height=775');
				newWin800full.focus()	// full-height and partial-width for 1280x1024		
			}	
		}		
		else {
			newWin800full = window.open(theURL,'','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,resizable=yes,width=800,height=540');
			newWin800full.focus()	// full-height and partial-width for 1024x768
		}
	}	
	else {
		newWin800full = window.open(theURL,'','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,left=0,top=0,screenX=0,screenY=0,width=maxWidth,height=maxHeight');
		newWin800full.focus() // max window for 800x600 and unknown resolutions
	}
}

<!-- // 1000-wide HTML windows with full browser features -->
function nw1k(theURL) { //v2.0
			newWin800full = window.open(theURL,'','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,resizable=yes,width=990,height=750');
			newWin800full.focus()	// full-height and partial-width for 1024x768
}

<!-- // 1000-wide HTML windows with minimal browser features -->
function nw1kpop(theURL) { //v2.0
	var maxHeight = (window.screen.availHeight - 60);
	var maxWidth = (window.screen.availWidth - 10);	
	if ( maxHeight > '600' ) {
		if (maxHeight > '768') {
			if (maxHeight > '1024') {
				newWin800pop = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,resizable=yes,width=990,height=1100');
				newWin800pop.focus() // 1100 height and partial-width for 1600x1200 and above
				}
			else {
				newWin800pop = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,resizable=yes,width=990,height=935');
				newWin800pop.focus()	// full-height and partial-width for 1280x1024		
			}	
		}		
		else {
			newWin800pop = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,resizable=yes,width=990,height=680');
			newWin800pop.focus()	// full-height and partial-width for 1024x768
		}
	}	
	else {
		newWin800pop = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,resizable=yes,left=0,top=0,screenX=0,screenY=0,width=maxWidth,height=maxHeight');
		newWin800pop.focus() // max window for 800x600 and unknown resolutions
	}
}

<!-- // 800-wide HTML windows with minimal browser features -->
function nw800pop(theURL) { //v2.0
	var maxHeight = (window.screen.availHeight - 60);
	var maxWidth = (window.screen.availWidth - 10);	
	if ( maxHeight > '600' ) {
		if (maxHeight > '768') {
			if (maxHeight > '1024') {
				newWin800pop = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,resizable=yes,width=800,height=1100');
				newWin800pop.focus() // 1100 height and partial-width for 1600x1200 and above
				}
			else {
				newWin800pop = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,resizable=yes,width=800,height=935');
				newWin800pop.focus()	// full-height and partial-width for 1280x1024		
			}	
		}		
		else {
			newWin800pop = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,resizable=yes,width=800,height=680');
			newWin800pop.focus()	// full-height and partial-width for 1024x768
		}
	}	
	else {
		newWin800pop = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,resizable=yes,left=0,top=0,screenX=0,screenY=0,width=maxWidth,height=maxHeight');
		newWin800pop.focus() // max window for 800x600 and unknown resolutions
	}
}

<!-- // 800-wide HTML windows with minimal browser features -->
function popprint(theURL) { //v2.0
	var maxHeight = (window.screen.availHeight - 60);
	var maxWidth = (window.screen.availWidth - 10);	
	if ( maxHeight > '600' ) {
		if (maxHeight > '768') {
			if (maxHeight > '1024') {
				newWin800pop = window.open(theURL,'','toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,resizable=yes,width=800,height=1100');
				newWin800pop.focus() // 1100 height and partial-width for 1600x1200 and above
				}
			else {
				newWin800pop = window.open(theURL,'','toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,resizable=yes,width=800,height=935');
				newWin800pop.focus()	// full-height and partial-width for 1280x1024		
			}	
		}		
		else {
			newWin800pop = window.open(theURL,'','toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,resizable=yes,width=800,height=680');
			newWin800pop.focus()	// full-height and partial-width for 1024x768
		}
	}	
	else {
		newWin800pop = window.open(theURL,'','toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,resizable=yes,left=0,top=0,screenX=0,screenY=0,width=maxWidth,height=maxHeight');
		newWin800pop.focus() // max window for 800x600 and unknown resolutions
	}
}

function NW8(theURL) { //v2.0
	newWin740x480 = window.open(theURL,'','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=740,height=480');
newWin740x480.focus()
}


function nwx(theURL,winWidth,winHeight) { //v2.0
	newWinX = window.open(theURL,'','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=' + winWidth + ',height=' + winHeight);
newWinX.focus()
}


function nwprint(theURL,winWidth,winHeight) { //v2.0
	newWinX = window.open(theURL,'','toolbar=yes,location=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=' + winWidth + ',height=' + winHeight);
newWinX.focus()
}


function nwxbuy(theURL,winWidth,winHeight) { //v2.0
	newWinX = window.open(theURL,'tigerstore','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=' + winWidth + ',height=' + winHeight);
newWinX.focus()
}


function nwxmenu(theURL,winWidth,winHeight) { //v2.0
	newWinX = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=' + winWidth + ',height=' + winHeight);
newWinX.focus()
}


function nwxpop(theURL,winWidth,winHeight) { //v2.0
	newWinX = window.open(theURL,'','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=' + winWidth + ',height=' + winHeight);
newWinX.focus()
}


function nwxbox(theURL,winWidth,winHeight) { //v2.0
	newWinX = window.open(theURL,'','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=' + winWidth + ',height=' + winHeight);
newWinX.focus()
}


function nwxpopname(theURL,winWidth,winHeight,winName) { //v2.0
	newWinX = window.open(theURL,winName,'toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=' + winWidth + ',height=' + winHeight);
newWinX.focus()
}


function PhotoPopup(img){
  photo1= new Image();
  photo1.src=(img);
  checkImage(img);
}
function checkImage(img){
  if((photo1.width!=0)&&(photo1.height!=0)){
    viewPhoto(img);
  }
  else{
    checkImageQuotes="checkImage('"+img+"')";
    intervallo=setTimeout(checkImageQuotes,20);
  }
}
function viewPhoto(img){
  canvaswidth=photo1.width+10;
  canvasheight=photo1.height+10;
  dimensions="width="+canvaswidth+",height="+canvasheight;
  popup=window.open(img,"",dimensions);
}
function ClearForm()
{
	var FieldType;
	for (var i = 0; i < document.EditForm.length; i++) {
		FieldType = document.EditForm.elements[i].type
		if (FieldType == "text" || FieldType == "textarea") {
			document.EditForm.elements[i].value = ""
		}
		if (FieldType == "select-one") {
			document.EditForm.elements[i].options.selectedIndex = 0
		}
	}
}

function OpenNewWindow(url, width, height)
{
	var randomnumber=Math.floor(Math.random()*5001)
	window.open(url, randomnumber,
	  "top=10,left=10,menubar=0,resizable=1,scrollbars=1,width=" + width + ",height=" + height)
}

function OpenWindowNoScroll(url, width, height) { 
	window.open(url, 'popup_noscroll',
	  "top=10,left=10,menubar=0,resizable=0,scrollbars=0,width=" + width + ",height=" + height)
} 

function protect_images2(e) {
var msg = "Sorry, our images are copyrighted.";
if (navigator.appName == 'Netscape' && e.which == 3) {
	alert(msg);
	return false;
}
if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
	alert(msg);
	return false;
}
else return true;
}

function protect_images1() {
	if(document.images) {
	    for(i=0;i<document.images.length;i++) {
			document.images[i].onmousedown = protect_images2;
			document.images[i].onmouseup = protect_images2;
		}
	}
}

function OpenSideWindow(url){
	rightwidth=300;
	if (document.all) {
		windowheight = screen.availHeight;		
		leftwidth=screen.availWidth-rightwidth-11;
		SideWindow=window.open(url,'SideWindow','width='+rightwidth+',height='+(windowheight-60)+',screenX='+leftwidth+',screenY=0,top=0,left=' +leftwidth+',toolbar=0,location=0,status=1,menubar=0,resizable=1');
		SideWindow.focus();
	} else {
		SideWindow=window.open(url,'','width=280,height=480,toolbar=0,location=0,status=1,menubar=0,resizable=1');
	}
}
