var winMy=null;

function Imgshow(Img,ww,hh,title){


if (winMy!=null&&(!winMy.closed))
{
winMy.close();
winMy=null;
}

winMy = window.open("", "Mywin", "width=" + ww + ",height=" + hh +"");
winMy.document.open();
winMy.document.write(
"<html>"+
"<head>"+
"<title>"+title+"</title>"+
"<meta http-equiv='Content-Type' content='text/html;'>"+
"</head>"+
"<body marginwidth='0' marginheight='0' topmargin='0' leftmargin='0' rightmargin='0'>"+
"<table border='0' width='100%' cellspacing='0' cellpadding='0'>"+
"<tr>"+
"<td width='100%' valign='middle'><p align='center'><img src='" + Img + "'></td>"+
"</tr>"+
"</table>"+
"</body>"+
"</html>");
winMy.document.close();
winMy.focus();
}
//-->



function MyBgOver(tdd)
{
tdd.style.cursor='hand';
tdd.style.backgroundColor='#56A7CD'
}



function MyBgOverL(tdd)
{
tdd.style.cursor='hand';
}



function MyBgOut(tdd)
{
tdd.style.backgroundColor='#2480B0'
}

function  openfr(URL)
{
  document.location=URL;
} 





function MyCursorOver(tdd)
{
tdd.style.cursor='default';
}


function MyCursorOut(tdd)
{
tdd.style.cursor='auto';
}










var winMy2=null;

function WinDesc(FileDesc){
if (winMy2==null || winMy2.closed)
{
myHeight=Math.round(((screen.availHeight*70)/100));
myWidth=Math.round(((screen.availWidth*70)/100));
//alert(myWidth+"x"+myHeight);

winMy2 = window.open("","WinMy2","width=100,height=100,resizable=yes,scrollbars=yes,toolbar=yes");
winMy2.resizeTo(myWidth, myHeight);
winMy2.resizeBy(10, 29);
winMy2.resizable = true;
winMy2.scrollbars = true;

}
winMy2.document.location=FileDesc;
winMy2.focus();
}






// --- Start  functions for customers logos rotate on the index page ---
var totalPictures=59; // total number of pictures with logo
var TotalShowedLogos = 0;  // counter for showed logos
var aShow = {};   // array of flags

function randomCustomersLogos()
{
	CleanArray();
	setInterval(rotateCustomersLogos, 3000);
}


function rotateCustomersLogos()
 {
	 
	 if (TotalShowedLogos==totalPictures)
	 {
		CleanArray(); 
		rotateCustomersLogos();
	 }
	 
	 else
	 {	 
		currPictureNumber=rand(); // get new logo number
		if(aShow[currPictureNumber] !== true) {
			aShow[currPictureNumber] = true;
			show(currPictureNumber);			
			TotalShowedLogos++;
		}else{
			rotateCustomersLogos();
		}
	 }
	
 }


function rand() {
	return Math.floor(Math.random()*totalPictures+1);
}



function show(currenPictureNumber) {
	document.getElementById("customerslogos").style.backgroundImage ="url(images/client-list-logo"+currenPictureNumber+".gif)"; 		
}


function CleanArray()
{
	
   for (var abc=0; abc<=totalPictures; abc++)
   {
	  aShow[abc] = false;
   }	
   TotalShowedLogos=0;
}
// --- End   functions for customers logos rotate on the index page ---