
isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
DoIt=false;
function ddInit(e){
TWD=isIE ? "BODY" : "HTML";
TWD1=isIE ? document.all.theLayer : document.getElementById("theLayer");
TWD2=isIE ? event.srcElement : e.target;

//added by sumant on 23/10/08 to remove javascript error on scrolling

/*---------check if rootelement--- for Scrolling-----------*/

	if(TWD2.tagName!="HTML")
	{
		while (TWD2.id!="titleBar"&&TWD2.tagName!=TWD){
		TWD2=isIE ? TWD2.parentElement : TWD2.parentNode;
		}
		if (TWD2.id=="titleBar"){
		offsetx=isIE ? event.clientX : e.clientX;
		offsety=isIE ? event.clientY : e.clientY;
		nowX=parseInt(TWD1.style.left);
		nowY=parseInt(TWD1.style.top);
		ddEnabled=true;
		document.onmousemove=dd;
		}
	}
}

/*--------- for Scrolling end-----------*/
function dd(e){
if (!ddEnabled) return;
TWD1.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx;
TWD1.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
return false;
}
function ddN4(TWD3){
if (!isN4) return;
N4=eval(TWD3);
N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
N4.onmousedown=function(e){
N4.captureEvents(Event.MOUSEMOVE);
N4x=e.x;
N4y=e.y;
}
N4.onmousemove=function(e){
if (DoIt){
N4.moveBy(e.x-N4x,e.y-N4y);
return false;
}
}
N4.onmouseup=function(){
N4.releaseEvents(Event.MOUSEMOVE);
}
}
function hideMe(){
if (isIE||isNN) TWD1.style.visibility="hidden";
else if (isN4) document.theLayer.visibility="hide";
}
/*--------------change by sumant prontoinfotech.com 18-10-2008 for registration form validation error-------*/
function validationRegFormHide(){
	document.getElementById("showSector").style.visibility="visible";
	document.getElementById("showBirthDate").style.visibility="visible";
	document.getElementById("showGender").style.visibility="visible";
	document.getElementById("showCountry").style.visibility="visible";
}
/*--------------End-------*/
function showMe()
{
	var message= '';
	document.getElementById('popupContent').innerHTML= message;
		if (isIE||isNN) TWD1.style.visibility="visible";
	else if (isN4) document.theLayer.visibility="show";
}

function hideMeSearch(){
if (isIE||isNN) TWD1.style.display="none";
else if (isN4) document.theLayer.display="none";
}
function showMeSearch()
{
	var message= '';


	document.getElementById('popupContent').innerHTML= message;
	/*
		if (isIE||isNN) TWD1.style.visibility="visible";
	else if (isN4) document.theLayer.visibility="show";
	*/
	if (isIE||isNN) TWD1.style.display="block";
	else if (isN4) document.theLayer.display="block";
}
document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");
