/*
	Transition GradientWipe:
* gradientSize : the percentage of the object that is covered by the gradient band
* motion : sets the direction of motion for the transition. Possible values: up, down, right, left
		   forward: Default. New content is revealed in the direction set by the WipeStyle property. 
		   reverse: New content is revealed in the opposite direction than that set by the WipeStyle property.
* duration : the length of time a transistion takes to complete, format seconds.milliseconds (0.0000), a value of 0.5 is half a second
*/
var currImg=0;

function doTrans() 
{
 if (currImg==imgArray.length) currImg=0;
 if(navigator.appName=="Microsoft Internet Explorer")
 {
  imgSlideshow.filters[0].apply();
  document.images['imgSlideshow'].src=imgArray[currImg];
  imgSlideshow.filters[0].play();
 } else {
  document.images['imgSlideshow'].src=imgArray[currImg];
 }
 currImg++;
}

setInterval('doTrans()',3000);

//Open Image
var fBrw=(navigator.userAgent.indexOf('MSIE')!= -1 && navigator.userAgent.indexOf('Windows')!= -1);
function onimg(file)
{	
 picfile = new Image();
 picfile.src = file;
 width=picfile.width;
 height=picfile.height;
 winDef = 'status=no, resizable=no, scrollbars=no, toolbar=no, location=no, fullscreen=no, titlebar=yes, height='.concat(height).concat(',').concat('width=').concat(width).concat(',');
 winDef = winDef.concat('top=').concat((screen.height - height)/2).concat(',');
 winDef = winDef.concat('left=').concat((screen.width - width)/2);
 newwin = open('', '_blank', winDef);
 newwin.document.writeln('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">');
 newwin.document.writeln('<a href="" onClick="window.close(); return false;"><img src="', file, '" alt="', (fBrw) ? 'Đóng cửa sổ' : 'Close', '" border=0></a>');
 newwin.document.writeln('</body>');
}
