﻿//var slideSpeed = 2;	// Higher value = faster
//var mph_timer = 4;	// Lower value = faster
//var objectIdToSlideDown = false;
//var mph_activeId = false;
//var mph_slideInProgress = false;
//var btnstat;

//function showHideContent(e,inputId)
//{
// var LoginBtnStat = document.getElementById(btnstat);
// if(document.getElementById(btnstat).style.backgroundPosition=="0px 0px")
// LoginBtnStat.style.backgroundPosition = "0px -27px";
// else
// LoginBtnStat.style.backgroundPosition = "0px 0px";

//   
//	if(mph_slideInProgress)return;
//	mph_slideInProgress = true;
//	if(!inputId)inputId = this.id;
//	inputId = inputId + '';
//	var numericId = inputId.replace(/[^0-9]/g,'');
//	var HdrLoginDiv = document.getElementById('reference_a' + numericId);

//	objectIdToSlideDown = false;
//	
//	if(!HdrLoginDiv.style.display || HdrLoginDiv.style.display=='none'){		
//		if(mph_activeId &&  mph_activeId!=numericId){			
//			objectIdToSlideDown = numericId;
//			slideContent(mph_activeId,(slideSpeed*-1));
//		}else{
//			HdrLoginDiv.style.display='block';
//			HdrLoginDiv.style.visibility = 'visible';
//			slideContent(numericId,slideSpeed);
//		}
//	}else{
//		slideContent(numericId,(slideSpeed*-1));
//		mph_activeId = false;
//	}	
//}

//function slideContent(inputId,direction)
//{
//	
//	var obj =document.getElementById('reference_a' + inputId);
//	var contentObj = document.getElementById('reference_ac' + inputId);
//	height = obj.clientHeight;
//	if(height==0)height = obj.offsetHeight;
//	height = height + direction;
//	rerunFunction = true;
//	if(height>contentObj.offsetHeight){
//		height = contentObj.offsetHeight;
//		rerunFunction = false;
//	}
//	if(height<=1){
//		height = 1;
//		rerunFunction = false;
//	}

//	obj.style.height = height + 'px';
//	var topPos = height - contentObj.offsetHeight;
//	if(topPos>0)topPos=0;
//	contentObj.style.top = topPos + 'px';
//	if(rerunFunction){
//		setTimeout('slideContent(' + inputId + ',' + direction + ')',mph_timer);
//	}else{
//		if(height<=1){
//			obj.style.display='none'; 
//			if(objectIdToSlideDown && objectIdToSlideDown!=inputId){
//				document.getElementById('reference_a' + objectIdToSlideDown).style.display='block';
//				document.getElementById('reference_a' + objectIdToSlideDown).style.visibility='visible';
//				slideContent(objectIdToSlideDown,slideSpeed);				
//			}else{
//				mph_slideInProgress = false;
//			}
//		}else{
//			mph_activeId = inputId;
//			mph_slideInProgress = false;
//		}
//	}
//}


//function initShowHideDivs(a)
//{
// btnstat = a;
//	var divs = document.getElementsByTagName('DIV');
//	var divCounter = 1;
//	for(var no=0;no<divs.length;no++){
//		if(divs[no].className=='LoginTabImg'){
//			//divs[no].onmouseover = showHideContent;
//			//divs[no].onmouseout = showHideContent;
//			//alert(a);
//			divs[no].onclick = showHideContent;
//			divs[no].id = 'reference_q'+divCounter;
//			var HdrLogin = divs[no].parentNode.previousSibling;
//			//alert(HdrLogin);
//			while(HdrLogin && HdrLogin.tagName!='DIV')
//			{
//				HdrLogin = HdrLogin.previousSibling;
//			}
//			HdrLogin.id = 'reference_a'+divCounter;	
//			contentDiv = HdrLogin.getElementsByTagName('DIV')[0];
//			contentDiv.style.top = 0 - contentDiv.offsetHeight + 'px'; 	
//			contentDiv.className='HdrLogin_content';
//			contentDiv.id = 'reference_ac' + divCounter;
//			HdrLogin.style.display='none';
//			HdrLogin.style.height='1px';
//			divCounter++;
//			
//			if(document.getElementById(btnstat))
//			document.getElementById(btnstat).style.backgroundPosition="0px 0px";
//			
//		}		
//	}	
//}

// Country Popup Start
function countryPopup(e)
{
 var dvPopupSml = document.getElementById("dvPopupSml1");
 var countryLocate = document.getElementById("countryLocate");
 var tempX = 0;
 var tempY = 0;
 tempX = e.clientX;
 tempY = e.clientY;
 dvPopupSml.style.display = "";
 //dvPopupSml.style.left = parseInt(tempX-10)+"px";
 //dvPopupSml.style.top = parseInt(tempY+10)+"px";

 countryLocate.style.display="";
 //countryLocate.style.left = parseInt(tempX-10)+"px";
 //countryLocate.style.top = parseInt(tempY+10)+"px";
 
 countryLocate.style.left=50+"%";
 countryLocate.style.marginLeft = "-"+483+"px";
 countryLocate.style.marginTop = "-"+12+"px";
 countryLocate.style.width = parseInt(dvPopupSml.clientWidth) +"px"
 countryLocate.style.height = parseInt(dvPopupSml.clientHeight) +"px"
 }
function hideDvPopupSml1()
{
var dvPopupSml = document.getElementById("dvPopupSml1");
var countryLocate = document.getElementById("countryLocate");
dvPopupSml.style.display="none";
countryLocate.style.display="none";
}
// Country Popup End

function ChangeCheckedValue(chkRemeberMe) {
    //var remeberMe = document.getElementById(chkRemeberMe);
    chkRemeberMe.value = (chkRemeberMe.checked) ? "on" : "off";
}