

<!-- Begin popUp for catalogo link on general link page
function popUpPrivacy(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=450,height=575,left = 140,top = 124.5');");
}
// End -->

<!-- Begin popUp for products shopping cart 
function popUpProduct(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=545,height=555,left = 140,top = 124.5');");
}
// End -->


// zoom Close window image -->
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		zoom_osmanthus_over = newImage("images/zoom_osmanthus-over.gif");
		zoom_rosemary_over = newImage("images/zoom_rosemary-over.gif");
		zoom_hawthorne_over = newImage("images/zoom_hawthorne-over.gif");
		zoom_lavender_over = newImage("images/zoom_lavender-over.gif");
		preloadFlag = true;
	}
}

// -->









<!--
function Dollar (val) {  // force to valid dollar amount
var str,pos,rnd=0;
  if (val < .995) rnd = 1;  // for old Netscape browsers
  str = escape (val*1.0 + 0.005001 + rnd);  // float, round, escape
  pos = str.indexOf (".");
  if (pos > 0) str = str.substring (rnd, pos + 3);
  return str;
}

function ReadForm (obj1) { // process un-named selects
var i,amt,des,obj,pos,val,num="";
  amt = obj1.baseamt.value*1.0;       // base amount
  des = obj1.basedes.value;           // base description
  for (i=0; i<obj1.length; i++) {     // run entire form
    obj = obj1.elements[i];           // a form element
    if (obj.type == "select-one" &&   // just get selects
        obj.name == "") {             // must be un-named
      pos = obj.selectedIndex;        // which option selected
      val = obj.options[pos].value;   // selected value
      pos  = val.indexOf ("@");       // price set?
      if (pos >= 0) amt = val.substring (pos + 1)*1.0;
      pos  = val.indexOf ("+");       // price increment?
      if (pos >= 0) amt = amt + val.substring (pos + 1)*1.0;
      pos  = val.indexOf ("%");       // percent change?
      if (pos >= 0) amt = amt + (amt * val.substring (pos + 1)/100.0);
      pos  = val.indexOf ("#");       // item number?
      if (pos > 0) {                  //  yes
        num = val.substring (pos + 1);// get number, and rest of line
        val = val.substring (0, pos); // lop off some stuff
        pos = num.indexOf (" ");      // end it with space
        if (pos > 0) num = num.substring (0, pos);
      }
      if (des.length == 0) des = val;
      else des = des + ", " + val;    // accumulate value
    }
  }
  if (obj1.item_number && num.length > 0) obj1.item_number.value = num;
  obj1.item_name.value = des;
  obj1.amount.value = Dollar (amt);
  if (obj1.tot) obj1.tot.value = "$" + Dollar (amt);
}
//-->

<!-- Begin print zoom Image

function varitext(text){
text=document
print(text)
}
//  End -->













var JS_PATH = "/js/";

/********************************************************************************

	Misc. User Agent setup and debug functions

********************************************************************************/
//	use( string )includes ancilliary thing class files that aren't loaded by default:

function use( what ){
	what = what.toLowerCase();
	if( ! usedFiles[what] )
		document.write( '<script language="javascript" src="' + JS_PATH + what + '.js"></script>\n' );
	usedFiles[ what ] = true;
}
var usedFiles = new Array();

window.origInit = window.init;
if( window.origInit == null ) window.origInit = function(){}
init = function( fcn ){
	if( ! window.initFunctions )
		window.initFunctions = new Array();
	if( typeof(fcn) == "string")
		window.initFunctions[ window.initFunctions.length ] = fcn;
	else{
		origInit();
		for( var i=0; i<window.initFunctions.length; i++ ){
			eval(window.initFunctions[i]);
		}
	}
}
onload=init

function puke( it, showValues, showEmpty ){
	var s = '';
	for( var i in it ){
		if( typeof(it[i]) != 'function' )
			if( showEmpty || it[i] ){
				s += '\n' + i + ' ';
				if( showValues ) s += it[i];
			}
	}
	alert(s);
}

function Is(){
	var appName = navigator.appName;
	var version = navigator.appVersion;
	
	this.ns = ( appName == "Netscape" );
	this.ns4 = this.ns && version.indexOf("4.")!=-1;
	this.ns5 = this.ns && version.indexOf("5.")==0;
	this.ns6 = ( this.ns5 || (this.ns && version.indexOf("6.")!=-1) );

	this.ie = ( appName == "Microsoft Internet Explorer" );
	this.ie4 = this.ie && version.indexOf("MSIE 4.")!=-1;
	this.ie5 = this.ie && version.indexOf("MSIE 5.")!=-1;
	this.ie6 = this.ie && version.indexOf("MSIE 6.")!=-1;
	
	var userAgent = navigator.userAgent.toLowerCase()
	this.mac = ( userAgent.indexOf( "mac" ) != -1 )
	this.win = ( userAgent.indexOf( "windows" ) != -1 )
	this.linux = ( userAgent.indexOf( "linux" ) != -1 )
}
Is.prototype.toString = function(){
	var s = ''
	for( var i in this ){
		s += i + ': ' + this[i] + '\n'
	}
	return s;
}
var is = new Is();

//resize fix for netscape 4
function resize(){
		if ( scrW != window.innerWidth || scrH != window.innerHeight )
			location.reload()
}
if ( is.ns4 ){
	var scrW = window.innerWidth;
	var scrH = window.innerHeight;
	onresize=resize;
}




/********************************************************************************	
 	Image Flip usage : 
 		Change OFF_SUFFIX and ON_SUFFIX to match image names.
 		
 		For each image which is to be flipped, document.onload should call
 			flip.myFlipName = new Flip( myImageName, myImageSource )
 		To turn image on, call 
 			flip.myFlipName.on()
 		To turn image off, call
 			flip.myFlipName.off()
********************************************************************************/
init( "Flip.init()" )
var IMAGE_OFF_SUFFIX = "_off.gif"
var IMAGE_ON_SUFFIX = "_over.gif"

var flip = new Array();
function Flip( imgName, imgSrc, doc ){
	this.docImg = getDocImg(imgName, doc);
	if( this.docImg ){
		this.imgOff = new Image( this.docImg.width, this.docImg.height )
		this.imgOffsrc = this.imgOff.src = this.docImg.src;
		
		this.imgOn = new Image ( this.docImg.width, this.docImg.height )
		this.imgOnsrc = this.imgOn.src = ( imgSrc != null ) ? imgSrc : this.docImg.src.replace( IMAGE_OFF_SUFFIX, IMAGE_ON_SUFFIX )	}
	else{
		this.imgOff = this.imgOn = new Image();
		this.imgOffSrc = this.imgOnSrc = '';
	}
}

Flip.prototype.on = function(force){
	if( force ){
		this.imgOn.src = "";
		this.docImg.src = this.imgOnsrc;
	}
	else if( this.imgOn.src ){
			this.docImg.src = this.imgOn.src;
	}
	if ( this.status )
		window.status = this.status;
	return true;
}

Flip.prototype.off = function(force){
	if( force ){
		this.imgOff.src = "";
		this.docImg.src = this.imgOffsrc;
	}
	else if( this.imgOff.src ){
		this.docImg.src = this.imgOff.src;
	}
	window.status = "";
	return true;
}
Flip.prototype.killFlip = function( newSrc ){
	var fixedImgSrc
	if ( newSrc == "on" )
		fixedImgSrc = this.imgOn.src
	else if ( newSrc == "off" )
		fixedImgSrc = this.imgOff.src
	else
		fixedImgSrc = newSrc
	this.imgOff.src = this.imgOn.src = this.docImg.src = fixedImgSrc;
}
Flip.prototype.resurect = function(){
	this.imgOff.src = this.imgOffsrc;
	this.imgOn.src = this.imgOnsrc;
	this.docImg.src = this.imgOffsrc;
}
function getDocImg(name, d){
	d = ( d == null ) ? document : d; //set d to be the document if empty
	var img = d.images[name];
	if (img) return img; //found it
	
	if ( ! document.layers ) return null; //in ie, we die here
	
	for ( var i=0; i < d.layers.length; i++ ) 
		if ( d.layers[i].id ){
			img = getDocImg( name, d.layers[i].document )  //recursive call
				if (img) return img; //found it
		}
	return null; //did not find it
}
function mouseover(name){
	if (flip[name])
		flip[name].on()
}
function mouseout(name){
	if (flip[name])
		flip[name].off()
}
Flip.init = function( d ){
	if( d == null ) d = document;
	for ( var i = 0; i < d.images.length; i++ ){
		var src = d.images[i].src
		if ( d.images[i].name ){
			if ( src.indexOf( IMAGE_OFF_SUFFIX ) != -1 ){
				flip[ d.images[i].name ] = new Flip( d.images[i].name, null, d )
			}
		}
	}
	if ( !document.layers ) return;
	for ( var i=0; i < d.layers.length; i++ ) 
		Flip.init( d.layers[i].document )  //recursive call
}

