/* Copyright Never die. EveryThing On MyCOOLs ! ! !  http : // www.mycools.in.th / */  
var arrayLength2 = 0; var currentIndex2 = 0; var pageArray2 = new Array(); var x2 = 0; var t2 ; var timeout2 = 5000; 
var theImage2 = new Array(); 
function slidebars2(ImageList2, LinkList2, width2, height2) { 
document.write('<div style="width:'+width2+'px; height:'+height2+'px;">'); 
theImage2 = ImageList2; arrayLength2 = theImage2.length; currentIndex2 = Math.floor(Math.random() * arrayLength2); x2 = 0; 
for(j = 0; j < arrayLength2; j ++ ) { 
pageArray2.push("page2" + j); 
document.write('<div style="display: block;" id="page2'+j+'">'); 
var ext2 = ImageList2[j].split('.'); 
if(ext2[ext2.length - 1] == "swf"){ 
document.write('<embed src="'+ImageList2[j]+'" width="'+width2+'" height="'+height2+'" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" />'); 
} else{ 
	if(LinkList2[j]) { 
	document.write('<a target="_blank" href="'+LinkList2[j]+'" align="center">'); 
	document.write('<img src="'+ImageList2[j]+'" border="0" width="'+width2+'" height="'+height2+'"  />'); 
	document.write('</a>'); 
	} else{ 
	document.write('<img src="'+ImageList2[j]+'" border="0" width="'+width2+'" height="'+height2+'"  />'); 
} 
} 
document.write('</div>'); 
} 
document.write('<div align="right" class="featureNavButtPosition2" style="height: 40px;">'); 
document.write('<table cellspacing="0" cellpadding="0" border="0"><tbody><tr>'); 
document.write('<td width="16"><img width="16" height="26" border="0" id="prev2" alt="Previous Feature" '); 
document.write('onClick="displayImage2((currentIndex2 + arrayLength2 - 1) % arrayLength2);" src="'+ fullurl +'images/slide_asset/back.gif" /></td>'); 
for(j = 0; j < arrayLength2; j ++ ) { 
	var seq2 = parseInt(j + 1); 
	document.write('<td width="19"><img width="19" height="26" border="0" id="myImage2'+j+'" alt="1" '); 
	document.write('onClick="displayImage2('+j+');" src="images/slide_asset/'+seq2+'.gif" /></td>'); 
}
document.write('<td width="17"><img width="17" height="26" border="0" id="next2" alt="Next Feature" '); 
document.write('onClick="displayImage2((currentIndex2+1) % arrayLength2);" src="'+ fullurl +'images/slide_asset/next.gif" /></td>'); 
document.write('</tr></tbody></table></div>'); 
document.write('</div>'); displayImage2(currentIndex2); 
} 

function displayImage2(i) { 
	clearTimeout(t2); orimage2(); var blockName2; var node2 ; 
	for(j = 0; j < arrayLength2; j ++ ) { 
		blockName2 = pageArray2[j]; 
		node2 = document.getElementById(blockName2); 
		node2.style.display = "none"; 
	} 
	blockName2 = pageArray2[i]; 
	node2 = document.getElementById(blockName2); 
	var seq2 = parseInt(i + 1); 
	document.getElementById("myImage2" + (i)).src = fullurl+"images/slide_asset/f_" + seq2 + ".gif"; 
	node2.style.display = "block"; 
	currentIndex2 = i; var next2 = (parseInt(i + 1) < arrayLength2) ? parseInt(i + 1) : 0; t2 = setTimeout("displayImage2(" + next2 + ")", timeout2); 
}

function orimage2() { 
for(j = 0; j < arrayLength2; j ++ ) {
	var seq2 = parseInt(j + 1); 
		document.getElementById("myImage2" + j).src = fullurl+"images/slide_asset/" + seq2 + ".gif"; 
	} 
} 
