function createLightBoxRev(id,url,divElem,bodyId,tableType,DivWidth)
{
	divIdLight =  $('#'+id+'').attr("myId");
	//alert(divIdLight);
	if(document.getElementById(divElem) != null)
	{
		document.getElementById(divElem).style.display = 'block';
		
	}
	
	if(url != '')
	{	
		//document.getElementById(divElem).style.display = 'block';
		document.getElementById(divElem).innerHTML="<div align='center' style='margin-top:50px;'><img src='/iphonegames/images/working.gif' ></div>";
		$("#"+divElem+"").load(""+url+"",{ 'id': [""+divIdLight+""],'case1':[tableType] });
	}
	
	//alert(document.getElementById(divElem).innerHTML);
	
	lightBoxRev(''+bodyId+'',''+divElem+'',DivWidth);
}
function lightBoxRev(bodyId,showId,customWidth)
{	
	//alert($("#"+showId+"").attr("parentDiv"));
	divHeight = $("#"+showId+"").offset().top;	
	model_img = document.createElement('img');
	model_img.setAttribute('src','/iphonegames/images/topbg.gif');
	myWidth = document.getElementById('theDoc').offsetWidth;
	myHeight = document.getElementById('theDoc').scrollHeight;
	model_img.setAttribute('width',myWidth);
	model_img.setAttribute('height',myHeight);
	
	//model_img.setAttribute('z-index',1100);
	model_img.style.top = 0;
	model_img.style.position = "absolute";
	
	model_img.style.opacity=0.6;
	model_img.style.zIndex=10;
	model_img.style.MozOpacity = '0.7';
	model_img.style.filter="alpha(opacity=60)";	
	tempHeight = screen.height/2;		

	//if(navigator.appVersion.match('MSIE 6.0'))
	//{
		$( "#"+showId+"" ).scrollFollow({
				//offset: divHeight
		});		
	//}

	document.body.appendChild(model_img);	
	myWidth = document.getElementById(bodyId).scrollWidth;	
	//alert(document.getElementById(showId).innerHTML);
	document.getElementById(showId).style.display = "block";
	tempWidth = screen.width-((myWidth*customWidth)/100);
	leftPos = tempWidth/2;	
	document.getElementById(showId).style.left = leftPos+"px";	
	//document.getElementById(showId).style.zIndex = 1000;
}

function closeLightBoxRev(id)
{
	document.body.removeChild(model_img);
	var divClose = $("#"+id+"").attr("parentDiv");	
	document.getElementById(divClose).innerHTML = "";
	document.getElementById(divClose).style.display = "none";
}
// JavaScript Document
