/*********************************************************
NAME	:	SOUMEN GHOSH
COMPANY	:	SG INFOSYSTEM

++ COPYRIGHTS RESERVED. DON'T REUSE THIS SCRIPTS ++
**********************************************************/

/*function tableFrameInitial()
{
	document.getElementById("memberlogin1").style.left=300+'px';
}*/

<!--

function calllogindiv(curobj,i)
	{
		prep_pop();
		obj=curobj.parentNode;
		var curleft = curtop = 0;
		if (obj.offsetParent) {
			curleft = obj.offsetLeft
			curtop = obj.offsetTop
			while (obj = obj.offsetParent) {
				curleft += obj.offsetLeft
				curtop += obj.offsetTop
			}
		}
	
		curleft-=550;
		curtop+=180;
		document.getElementById("memberlogin"+i).style.left=curleft+'px';
		document.getElementById("memberlogin"+i).style.top=curtop+'px';
		document.getElementById("memberlogin"+i).style.display='block';
/*		
		document.getElementById("memberlogin1").style.left=300+'px';
		document.getElementById("memberlogin1").style.position=absolute; 
		document.getElementById("memberlogin1").style.top=200+'px';  
		document.getElementById("memberlogin1").style.width=400+'px';
*/
	}
	function closeMemberdiv(i)
	{
		document.getElementById("memberlogin"+i).style.display='none';
		fade_out("fadeDiv",0.7,0);
	}



	function fade_in(fadeid,next,limit)
	{
		if(next < limit)
		{
			document.getElementById(fadeid).style.opacity = next;
			iestart=next*100;
			document.getElementById(fadeid).style.filter = 'alpha(opacity='+iestart+')';
			next=next+0.1;
			setTimeout((function(){fade_in(fadeid,next,limit);}), 100);
		}
	}
	function fade_out(fadeid,next,limit)
	{
	
		if(next > limit)
		{
			document.getElementById(fadeid).style.opacity = next;
			iestart=next*100;
			document.getElementById(fadeid).style.filter = 'alpha(opacity='+iestart+')';
			next=next-0.1;
			setTimeout((function(){fade_out(fadeid,next,limit);}), 100);
		}
		else
		{
			document.getElementById(fadeid).style.height='0px';	
			document.getElementById(fadeid).style.width='0px';
			document.getElementById(fadeid).style.display='none';	
		}
	}
	function prep_pop()
	{
		obj=document.getElementById("mainBody");
		var curwidth = curheight = 0;
		curwidth = obj.offsetWidth;
		curheight = obj.offsetHeight;

/* -----------------------------------------------------------------------------------

//
// getPageSize()
// Returns array with page width, height and window width, height
// Core code from - quirksmode.org
// Edit for Firefox by pHaez
	
	var xScroll, yScroll;
	
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = obj.offsetWidth; //document.body.scrollWidth;
		yScroll = obj.offsetHeight; //window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}

//	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 

		curwidth = pageWidth;
		curheight = pageHeight;

// -----------------------------------------------------------------------------------
*/

		document.getElementById("fadeDiv").style.height=curheight+20+'px';  
		document.getElementById("fadeDiv").style.width=(curwidth)+'px'; 
		document.getElementById("fadeDiv").style.display='block';

		obj=obj.getElementsByTagName("div").item(0);
		var curtop = curleft  = 0;
		if (obj.offsetParent) {
			curleft = obj.offsetLeft
			curtop = obj.offsetTop
			while (obj = obj.offsetParent) {
				curleft += obj.offsetLeft
				curtop += obj.offsetTop
			}
		}
		
		document.getElementById("fadeDiv").style.left=curleft+'px';
		document.getElementById("fadeDiv").style.top=(curtop-15)+'px';
		
		fade_in("fadeDiv",0,0.7);
	}
//-->	
