// JavaScript Document
function random_imglink()
{
	var myimages=new Array();
	//specify random images below. You can have as many as you wish
	myimages[1]="images/v2/home/whiteevoX.jpg";
	//myimages[2]="images/home/2.png";
//	myimages[3]="images/home/3.png";
//	myimages[4]="images/home/4.png";
//	myimages[5]="images/home/5.png";
//	myimages[6]="images/home/6.png";
//	myimages[7]="images/home/7.png";
//	myimages[8]="images/home/8.png";
//	myimages[9]="images/home/9.png";
//	myimages[10]="images/home/11.png";
//	myimages[11]="images/home/12.png";
//	myimages[12]="images/home/13.png";
//	myimages[13]="images/home/14.png";
//	myimages[14]="images/home/15.png";
//	myimages[15]="images/home/17.png";
//	myimages[16]="images/home/18.png";
//	myimages[17]="images/home/19.png";
//	myimages[18]="images/home/20.png";
//	myimages[19]="images/home/23.png";
//	myimages[20]="images/home/24.png";
//	myimages[21]="images/home/25.png";
	
	var ry=Math.floor(Math.random()*myimages.length);
	
	if (ry==0)
	{
		ry=1;
	}
	
	document.getElementById("imagea1").src=myimages[ry];
	//document.getElementById("imageal").style.backgroundImage="url("+myimages[ry]+")";
	//document.write('<img src="'+myimages[ry]+'" border=0>');
}

function findPos(obj)
{
	var curleft = curtop = 0;

	if (obj.offsetParent)
	{
		curleft = obj.offsetLeft;
		curtop = obj.offsetTop+3;

		while (obj = obj.offsetParent)
		{
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop+3;
		}
	}

	return [curleft,curtop];
}

function dismiss()
{
	if (over == 0)
	{
		document.getElementById('div_id').style.display="none";
	}
}

function placeMenu()
{
	
	var over = 0;
	var prodPos = findPos(document.getElementById("prod"));
	document.getElementById("div_id").style.left = prodPos[0]+"px";
	//findPos(document.getElementById("prod"))[0];
	
	document.getElementById("div_id").style.top = prodPos[1]+30+"px";
	//findPos(document.getElementById("prod"))[1] + 25;
	//alert (findPos(document.getElementById("prod"))[0]);
//	alert (findPos(document.getElementById("prod"))[1] + 25);
//	alert (document.getElementById("prod").style.left);
//	alert (document.getElementById("prod").style.top);
								   
}

function sizeNews()
{
	var newsflashHeight=document.getElementById("newsflash").offsetHeight;
	targetHeight_ie=578;
	targetHeight_ff=568;
	if( navigator.userAgent.indexOf("MSIE") != -1)
	{
		document.getElementById("newswrap").style.height=targetHeight_ie-newsflashHeight;
	}
	else {
		document.getElementById("newswrap").style.height=targetHeight_ff-newsflashHeight;
	}
	
}
