/****************************
  FOR ROLLOVERS 
****************************/
function hiLite(source, name) {
	if (document.images) {
		document.images[name].src = eval(source + ".src");
	}
}

/****************************
  FOR Login
****************************/
function logPop()
{
	theURL = 'http://ecommerce.douglascomp.com:1800/pnet/eOrderServlet'
	var w = 800;
	var h = 600;
	var winleft = (screen.width - w)/2;
	var winUp = (screen.height - h)/2;
	winProp = 'height='+h+',width='+w+',left='+winleft+',top='+winUp+',scrollbars=yes,resizable=yes,toolbar=yes,location=yes,directories=no,status=no,menubar=no,copyhistory=no';
	Win = window.open(theURL,galpath,winProp)
	if (parseInt(navigator.appVersion) >= 4) { Win.window.focus();}
	
}

/**********************************
   FOR IMAGE ROTATION
**********************************/
var x;
var y;
//var tlink;
var current = 0;
var current2 = 0;
main_rot = 1;

function init()
{

	if (document.getElementById)
		{
	 	x = document.getElementById('cycle').getElementsByTagName('IMG');
		y = document.getElementById('cycle2').getElementsByTagName('IMG');
		}
	else if (document.all)
		{
		x = document.all['cycle'].all.tags('IMG');
		y = document.all['cycle2'].all.tags('IMG');
		}
	else return;

	for(var i = 0; i<x.length; i++)
	{
			x[i].style.visibility = 'hidden';
	}
	
	for(var i = 0; i<y.length; i++)
	{
			y[i].style.visibility = 'hidden';
	}
	
	rotate();
}

function rotate()
{
	main_rot = main_rot + 1
	if(main_rot==2)
	{
		main_rot = 0;
		var last = (current - 1 < 0) ? x.length-1 : (current - 1);
		x[last].style.visibility = 'hidden';
		x[current].style.visibility = 'visible';
		current = (++current < x.length) ? current : 0;
	}
	
	
	var last2 = (current2 - 1 < 0) ? y.length-1 : (current2 - 1);
	y[last2].style.visibility = 'hidden';
	y[current2].style.visibility = 'visible';
	current2 = (++current2 < y.length) ? current2 : 0;
	
	
	setTimeout('rotate()',rotTime * 1000);
}
