
<!-- Begin popUp for catalogo link on general link page
function miniAplication(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,width=1150,height=650,left = 140,top = 124.5');");
}
// End -->

<!-- Begin popUp for products shopping cart 
function proposal(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1, scrollbars=1,location=0,statusbar=0, menubar=1, resizable=1, width=700, height=685, left=140, top=124.5');");
}
// End -->


<!-- Begin popUp for products shopping cart 
function invoice(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,width=1150,height=685,left = 140,top = 124.5');");
}
// End -->

<!-- Begin popUp for products shopping cart
function creditAplication(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,width=1150,height=420,left = 140,top = 124.5');");
}
// End -->

<!-- Begin popUp for products shopping cart 
function catalog(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,width=1150,height=420,left = 140,top = 124.5');");
}
// End -->


// -->

function openForceClick() {
b = window.open("http://www.teaology.com/SearchResult.aspx?CategoryID=2","new1",'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
b.focus();
}


<!-- Begin print zoom Image

function varitext(text){
text=document
print(text)
}
//  End -->




// header large banner images swap
<!--
function random_BannerImglink1(){
var bannerimages1=new Array()
//specify random images below. You can have as many as you wish
//header baner

bannerimages1[1]="http://www.jimenezbros.com/images/banners/doors1.jpg"
bannerimages1[2]="http://www.jimenezbros.com/images/banners/doors2.jpg"
bannerimages1[3]="http://www.jimenezbros.com/images/banners/doors3.jpg"

var bannerimages1links=new Array()

bannerimages1links[1]="http://www.jimenezbros.com/"
bannerimages1links[2]="http://www.jimenezbros.com/"
bannerimages1links[3]="http://www.jimenezbros.com/"


var ry=Math.floor(Math.random()*bannerimages1.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+bannerimages1links[ry]+'"><img src="'+bannerimages1[ry]+'" border=0></a>')
}

//-->
// End Header banner images swap -->




//open big images in new url -->
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//on mouse over change  buttons image
function change (picurl) {
document.picture.src = picurl;
}


// 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) {
		preloadFlag = true;
	}
}

// --> Enter numbers and dot
 function numbersonly(myfield, e, dec) {
  var key;
  var keychar;

  if (window.event)
    key = window.event.keyCode;
  else if (e)
    key = e.which;
  else
    return true;
  keychar = String.fromCharCode(key);

  // control keys
  if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) )
    return true;

  // numbers
  else if ((("0123456789.").indexOf(keychar) > -1))
    return true;

  // decimal point jump
  else if (dec && (keychar == ".")) {
    myfield.form.elements[dec].focus();
    return false;
  } else
    return false;
}

// --> Enter numbers
 function numbersonlyNoDot(myfield, e, dec) {
  var key;
  var keychar;

  if (window.event)
    key = window.event.keyCode;
  else if (e)
    key = e.which;
  else
    return true;
  keychar = String.fromCharCode(key);

  // control keys
  if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) )
    return true;

  // numbers
  else if ((("0123456789").indexOf(keychar) > -1))
    return true;

  // decimal point jump
  else if (dec && (keychar == ".")) {
    myfield.form.elements[dec].focus();
    return false;
  } else
    return false;
}



function stopRKey(evt) {
  var evt = (evt) ? evt : ((event) ? event : null);
  var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
  if ((evt.keyCode == 13) && (node.type=="text"))  {return false;}
}

document.onkeypress = stopRKey; 





//Images  change//////////////////////////////////////////////////////////////////////////////////////////////////////////////
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
}

//end Images change////////////////////////////////////////////////////////////////////////////////////////////////////////
