<!-- start

//################################
// funtion: generate()
// decs: creates the source depending out textboxes
function generate(){
f=document.myForm;

if(f[4].value){
myStr='<option value="'+f[5].value+'" selected>'+f[4].value+'\n';}
else{myStr='<option value="http://www.saleads.net/banners/affiliate-links.gif" selected>Affiliate\n';}

if(f[6].value){
myStr+='<option value="'+f[7].value+'">'+f[6].value+'\n';}
else{myStr+='<option value="http://www.saleads.net/banners/saleads.gif">SaleAds.Net\n';}

for(i=8; i<=23; i=i+2){
	if(f[i].value){
	myStr+='<option value="'+f[i+1].value+'">'+f[i].value+'\n';
	}
}

if((f.url1.value!='')&&(f.url1.value!='http://')){url1=f.url1.value;}
else{url1='image/slide1.gif';}

f.output.value='<!-- slideshow from: http://www.ricocheting.com/js/ -->\n<script language="javascript"><!--start\n'+
'var x = 0;\n\n'+
'function rotate(num){\n'+
'x=num%document.slideForm.slide.length;\n'+
'if(x<0){x=document.slideForm.slide.length-1};\n'+
'document.images.show.src=document.slideForm.slide.options[x].value;\n'+
'document.slideForm.slide.selectedIndex=x;\n'+
'}\n'+
'\n'+
'function apRotate() {\n'+
'if(document.slideForm.slidebutton.value == "Stop"){\n'+
'rotate(++x);window.setTimeout("apRotate()", '+(f.timeout.value*1000)+');}\n'+
'}\n'+
'//end --></script>\n\n'+
'<form name="slideForm">\n'+
'<table cellspacing=1 cellpadding=4 style="border:1px black solid; border-collapse:collapse">\n'+
'<tr><td align=center>\n'+
'<b>'+f.titleTxt.value+'</b>\n'+
'</td></tr>\n\n'+
'<tr><td align=center width='+((f.imgWidth.value<200)?'200':f.imgWidth.value)+' height='+f.imgHeight.value+'>\n'+
'<img src="../../Slideshow%20Generator/JS%20Builders%20Slide%20Show_files/%27%2Burl1%2B%27" name="show">\n'+
'</td></tr>\n\n'+
'<tr><td align=center style="border:1px black solid;">\n'+
'<select name="slide" onChange="rotate(this.selectedIndex);">\n'+
''+myStr+'</select>\n</td></tr>\n\n'+
'<tr><td align=center style="border:1px black solid;">\n'+
'<input type=button onclick="rotate(0);" value="|&lt;&lt;" title="Jump to beginning" style="border:1px black solid;">\n'+
'<input type=button onclick="rotate(x-1);" value="&lt;&lt;" title="Last Picture" style="border:1px black solid;">\n'+
'<input type=button name="slidebutton" onClick="this.value=((this.value==\'Stop\')?\'Start\':\'Stop\');apRotate();" value="Start" title="Autoplay" style="width:75px; border:1px black solid;">\n'+
'<input type=button onclick="rotate(x+1);" value="&gt;&gt;" title="Next Picture" style="border:1px black solid;">\n'+
'<input type=button onclick="rotate(this.form.slide.length-1);" value="&gt;&gt;|" title="Jump to end" style="border:1px black solid;">\n'+
'</td></tr></table></form>';
}var worker=''+location.hostname+'';
if((worker.indexOf('ri'+'coche'+'ting.c'+'om') == -1)&&(location.hostname!='')&&(location.hostname!='localhost')){
document.write('or'+'igi'+'nal jav'+'ascr'+'ipt fr'+'om <a href="ht'+'tp://w'+'ww.ri'+
'coche'+'ting.c'+'om/j'+'s/">ri'+'coche'+'ting.c'+'om</a>');}


//################################
// funtion: view()
// decs: displays a preview of the script
function view() {
if(document.myForm.output.value != 'no code available. "Generate" source code first'){
msg=open("","DisplayWindow","menubar=1,resizable=1,width=550,height=500");
msg.document.write(document.myForm.output.value);
}
else{
generate();
view();}
}

//-->
