//
// k i l a k  (c) 2007
// http://www.kilak.com/
//

<!--
        if (document.images) {            // Active Images
// ENCENDIDO
			img01on = new Image();
            img01on.src = "/images/ml/about_us-on.gif";
			img02on = new Image();
            img02on.src = "/images/ml/patchwork-on.gif";
			img03on = new Image();
            img03on.src = "/images/ml/cushions-on.gif";
			img04on = new Image();
            img04on.src = "/images/ml/cow_hides-on.gif";
			img05on = new Image();
            img05on.src = "/images/ml/tanning_process-on.gif";
			img06on = new Image();
            img06on.src = "/images/ml/stencil_prints-on.gif";
			img07on = new Image();
            img07on.src = "/images/ml/contact-on.gif";
			img08on = new Image();
            img08on.src = "/images/ml/home_page-on.gif";


// APAGADO
			img01off = new Image();
            img01off.src = "/images/ml/about_us-off.gif";
			img02off = new Image();
            img02off.src = "/images/ml/patchwork-off.gif";
			img03off = new Image();
            img03off.src = "/images/ml/cushions-off.gif";
			img04off = new Image();
            img04off.src = "/images/ml/cow_hides-off.gif";
			img05off = new Image();
            img05off.src = "/images/ml/tanning_process-off.gif";
			img06off = new Image();
            img06off.src = "/images/ml/stencil_prints-off.gif";
			img07off = new Image();
            img07off.src = "/images/ml/contact-off.gif";
			img08off = new Image();
            img08off.src = "/images/ml/home_page-off.gif";
}

// Function to 'activate' images.
function imgOn(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "on.src");

        }
}
// Function to 'deactivate' images.
function imgOff(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "off.src");
        }
}

// -->

//
// FOTOS AMPLIADAS
//
<!--
function Galeria(desktopURL)
{
	popupwin=window.open( "", '_blank', 'toolbar=no,location=no,status=no,menubar=no,resizable=no,scrollbars=no,width=460,height=365');
	popupwin.document.write("<html>");
	popupwin.document.write("<head>");
	popupwin.document.write("<title>DONA</title>");
	popupwin.document.write("<link href='/library/h4u.css' rel='stylesheet' type='text/css'>");
	popupwin.document.write("</head>");
	popupwin.document.write("<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>");
	popupwin.document.write("<table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>");
	popupwin.document.write("  <tr>");
	popupwin.document.write("    <td><a href='#' onClick='self.close()'><img src='" + desktopURL +"' alt='Copyright © DONA' width='450' height='325' border='0'></a></td>");
	popupwin.document.write("  </tr>");
	popupwin.document.write("  <tr>");
	popupwin.document.write("    <td align='center'><a href='#' onClick='self.close()' class='TextoColor2'>Close window</a></td>");
	popupwin.document.write("  </tr>");
	popupwin.document.write("</table>");
	popupwin.document.write("</body>");
	popupwin.document.write("</html>");
}


//
// ROTADOR HOME
//

// PATCHWORKS > INICIO
//*---------------------------------------------
//* Rutinas para el manejo de imágenes dinámicas
//*---------------------------------------------
Posters = new Array();
var iPosterCount = 0;

//*
//* Lista de Posters
//*
AddPoster( "patchworks-01.gif", "Patchworks" );
AddPoster( "patchworks-02.gif", "Patchworks" );
AddPoster( "patchworks-03.gif", "Patchworks" );

//*
//* Rutinas de proceso
//*
var sum_of_all_chances = 0;
for (i = 0; i < Posters.length; i++) {
	sum_of_all_chances += Posters[i].chance;
}

function AddPoster( imgSource, alt ) {
	Posters[iPosterCount++] = new Poster( imgSource, alt, 10 )
}

function Poster( imgSource, alt, chance ) {
	this.imgSource = imgSource;
	this.alt = alt;
	this.chance = chance;
}

function randomPatchworks() {
	var chance_limit = 0;
	var randomly_selected_chance = 0;
	
	randomly_selected_chance = Math.round((sum_of_all_chances - 1) * Math.random()) + 1;
	
	for (i = 0; i < Posters.length; i++) {
		chance_limit += Posters[i].chance;
		if (randomly_selected_chance <= chance_limit) {
			document.write("<img src='images/mt/" + Posters[i].imgSource + "' width=190 height=108 border=0 alt='" + Posters[i].alt + "'>");
			//return Posters[i];
			break;
      }
   }
}
// PATCHWORKS > FIN



// COWHIDES > INICIO
//*---------------------------------------------
//* Rutinas para el manejo de imágenes dinámicas
//*---------------------------------------------
PosterCowhidess = new Array();
var iPosterCowhidesCount = 0;

//*
//* Lista de PosterCowhidess
//*
AddPosterCowhides( "cow_hides-01.gif", "Cow hides" );
AddPosterCowhides( "cow_hides-02.gif", "Cow hides" );
AddPosterCowhides( "cow_hides-03.gif", "Cow hides" );

//*
//* Rutinas de proceso
//*
var sum_of_all_chances = 0;
for (i = 0; i < PosterCowhidess.length; i++) {
	sum_of_all_chances += PosterCowhidess[i].chance;
}

function AddPosterCowhides( imgSource, alt ) {
	PosterCowhidess[iPosterCowhidesCount++] = new PosterCowhides( imgSource, alt, 10 )
}

function PosterCowhides( imgSource, alt, chance ) {
	this.imgSource = imgSource;
	this.alt = alt;
	this.chance = chance;
}

function randomCowHides() {
	var chance_limit = 0;
	var randomly_selected_chance = 0;
	
	randomly_selected_chance = Math.round((sum_of_all_chances - 1) * Math.random()) + 1;
	
	for (i = 0; i < PosterCowhidess.length; i++) {
		chance_limit += PosterCowhidess[i].chance;
		if (randomly_selected_chance <= chance_limit) {
			document.write("<img src='images/mt/" + PosterCowhidess[i].imgSource + "' width=190 height=108 border=0 alt='" + PosterCowhidess[i].alt + "'>");
			//return PosterCowhidess[i];
			break;
      }
   }
}
// COWHIDES > FIN



// CUSHIONS > INICIO
//*---------------------------------------------
//* Rutinas para el manejo de imágenes dinámicas
//*---------------------------------------------
PosterCushionss = new Array();
var iPosterCushionsCount = 0;

//*
//* Lista de PosterCushionss
//*
AddPosterCushions( "cushions-01.gif", "Cushions" );
AddPosterCushions( "cushions-02.gif", "Cushions" );
AddPosterCushions( "cushions-03.gif", "Cushions" );

//*
//* Rutinas de proceso
//*
var sum_of_all_chances = 0;
for (i = 0; i < PosterCushionss.length; i++) {
	sum_of_all_chances += PosterCushionss[i].chance;
}

function AddPosterCushions( imgSource, alt ) {
	PosterCushionss[iPosterCushionsCount++] = new PosterCushions( imgSource, alt, 10 )
}

function PosterCushions( imgSource, alt, chance ) {
	this.imgSource = imgSource;
	this.alt = alt;
	this.chance = chance;
}

function randomCushions() {
	var chance_limit = 0;
	var randomly_selected_chance = 0;
	
	randomly_selected_chance = Math.round((sum_of_all_chances - 1) * Math.random()) + 1;
	
	for (i = 0; i < PosterCushionss.length; i++) {
		chance_limit += PosterCushionss[i].chance;
		if (randomly_selected_chance <= chance_limit) {
			document.write("<img src='images/mt/" + PosterCushionss[i].imgSource + "' width=190 height=108 border=0 hspace=17 alt='" + PosterCushionss[i].alt + "'>");
			//return PosterCushionss[i];
			break;
      }
   }
}
// CUSHIONS > FIN



// STENCIL > INICIO
//*---------------------------------------------
//* Rutinas para el manejo de imágenes dinámicas
//*---------------------------------------------
PosterStencils = new Array();
var iPosterStencilCount = 0;

//*
//* Lista de PosterStencils
//*
AddPosterStencil( "stencil_prints-01.gif", "Stencil prints" );
AddPosterStencil( "stencil_prints-02.gif", "Stencil prints" );

//*
//* Rutinas de proceso
//*
var sum_of_all_chances = 0;
for (i = 0; i < PosterStencils.length; i++) {
	sum_of_all_chances += PosterStencils[i].chance;
}

function AddPosterStencil( imgSource, alt ) {
	PosterStencils[iPosterStencilCount++] = new PosterStencil( imgSource, alt, 10 )
}

function PosterStencil( imgSource, alt, chance ) {
	this.imgSource = imgSource;
	this.alt = alt;
	this.chance = chance;
}

function randomStencil() {
	var chance_limit = 0;
	var randomly_selected_chance = 0;
	
	randomly_selected_chance = Math.round((sum_of_all_chances - 1) * Math.random()) + 1;
	
	for (i = 0; i < PosterStencils.length; i++) {
		chance_limit += PosterStencils[i].chance;
		if (randomly_selected_chance <= chance_limit) {
			document.write("<img src='images/mt/" + PosterStencils[i].imgSource + "' width=605 height=50 border=0 alt='" + PosterStencils[i].alt + "'>");
			//return PosterStencils[i];
			break;
      }
   }
}
// STENCIL > FIN
