// JavaScript Document
//
//    Slide functions:    CreateSlide();  CreateImagen(); CloseSlide(); 
//
//    Indications:  - Images MUST be located in a directory
//                  - Images MUST be : 

var Timer;

function CreateSlide(SWidth,ImgInit){
	var StHtm = "";
	StHtm = StHtm + "<div style='width:370px; height:330px; float:right; clear:right;'>&nbsp;";
    StHtm = StHtm + " <img id='PicGal' src='"+ImgInit+"' />";
   	StHtm = StHtm + " <div id='PicTxt' style='font-size:10px;font-family:arial; color:#999933;'>&nbsp;</div>";
	StHtm = StHtm + "</div>";
	StHtm = StHtm + "<div id='QuoteGallery' class='QuotationGallery'>&nbsp;</div>";
	StHtm = StHtm + "<div style='width:"+SWidth+"px; height:90px; border:1px dotted #666666; text-align:center; float:left; margin-top:0px;'>";
	StHtm = StHtm + "<img src='images/naveg/hsny_gallery_arrow_button_back.gif' align='left' onmousedown='GoLeft()' onmouseup='clearInterval(Timer)' style='margin:5px;'  onmouseout='clearInterval(Timer)' />";
	StHtm = StHtm + "<Div id='Slide' style='width:"+eval(SWidth+'-60')+"px; height:90px; overflow:hidden; margin:0px; text-align:left; float:left;' >";  
	StHtm = StHtm + "<Div style='width:1700px; height:90px; overflow:hidden; float:left;' >";  
	document.write ( StHtm );
//	alert ( StHtm );
}

function CreateImagen( ImgFile, ImgLink, ImgTxt ){
	document.write ("<img src='"+ImgFile+"' style='margin:5px;height:80px;' onmouseover=\"ChgPic('"+ImgLink+"','"+ImgTxt+"')\" />");
}

function CloseSlide(){
    document.write ("</Div></Div>");
	document.write ("<img src='images/naveg/hsny_gallery_arrow_button_forward.gif' onmousedown='GoRight()'; onmouseup='clearInterval(Timer)' onmouseout='clearInterval(Timer)' style='margin:5px;'  />");
	document.write ("</Div>" );
}
function GoRight() {  Timer = setInterval("document.getElementById('Slide').scrollLeft += 4;", 15);  }
function GoLeft(){  Timer = setInterval("document.getElementById('Slide').scrollLeft -= 4;", 15); }

function ChgPic(PicName,TextPic){
	jPty ('PicGal','src',PicName );
	if (TextPic=='') {  jCss ('PicTxt','visibility','hidden' );
	} else {
		jCss ('PicTxt','visibility','visible' );
		jPty ('PicTxt','innerHTML',TextPic );
	}
}


function CreateQuote(TextQuote){
	jPty ('QuoteGallery','innerHTML',TextQuote );
}


