// JavaScript Document
var http_check 	= (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
var CONTENTDIV	= "content";
var SCREENHEIGHT= screen.availHeight;//screen.availHeight;
var SCREENWIDTH = screen.width;
var x = 0;
var y = 0;


var nVer = navigator.appVersion;
var nAgt = navigator.userAgent;
var browserName  = '';
var fullVersion  = 0; 
var majorVersion = 0;

// In Internet Explorer, the true version is after "MSIE" in userAgent
if ((verOffset=nAgt.indexOf("MSIE"))!=-1) {
	browserName  = "IE";
	fullVersion  = parseFloat(nAgt.substring(verOffset+5));
	majorVersion = parseInt(''+fullVersion);
}

// In Opera, the true version is after "Opera" 
else if ((verOffset=nAgt.indexOf("Opera"))!=-1) {
	browserName  = "Opera";
	fullVersion  = parseFloat(nAgt.substring(verOffset+6));
	majorVersion = parseInt(''+fullVersion);
}

// In Firefox, the true version is after "Firefox" 
else if ((verOffset=nAgt.indexOf("Firefox"))!=-1) {
	browserName  = "Firefox";
	fullVersion  = parseFloat(nAgt.substring(verOffset+8));
	majorVersion = parseInt(''+fullVersion);
}

// In most other browsers, "name/version" is at the end of userAgent 
else if ( (nameOffset=nAgt.lastIndexOf(' ')+1) < (verOffset=nAgt.lastIndexOf('/')) ) 
{
	browserName  = nAgt.substring(nameOffset,verOffset);
	fullVersion  = parseFloat(nAgt.substring(verOffset+1));
	if (!isNaN(fullVersion)) majorVersion = parseInt(''+fullVersion);
	else {fullVersion  = 0; majorVersion = 0;}
}

// Finally, if no name and/or no version detected from userAgent...
if (browserName.toLowerCase() == browserName.toUpperCase()
 || fullVersion==0 || majorVersion == 0 )
{
	browserName  = navigator.appName;
	fullVersion  = parseFloat(nVer);
	majorVersion = parseInt(nVer);
}
	
function coordinates(event){
	x = 0;
	y = 0;
	x = event.screenX;
	y = event.screenY;
	//alert('X: '+x+' || Y: '+y);
}

///////////////////////////////////////////////////////////////
// calculate the current window width //
function pageWidth() {
	return window.innerWidth != null ? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;
}

// calculate the current window height //
function pageHeight() {
	return window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null;
}

// calculate the current window vertical offset //
function topPosition() {
	return typeof window.pageYOffset != 'undefined' ? window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0;
}

// calculate the position starting at the left of the window //
function leftPosition() {
	return typeof window.pageXOffset != 'undefined' ? window.pageXOffset : document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0;
}


function closeMsgBox(divId){
	document.getElementById(divId).style.display = 'none';
	document.getElementById("div_loading").style.display = 'none';
}


function closeAudioBox(divId){
	document.getElementById(divId).style.display = 'none';
	document.getElementById("div_loading").style.display = 'none';
	document.getElementById("auidOfDayDiv").innerHTML='';
}

function closeVideoBox(divId){
	document.getElementById(divId).style.display = 'none';
	document.getElementById("div_loading").style.display = 'none';
	document.getElementById("vidOfDayDiv").innerHTML='';
}

function popup_pic(id){

	var obj 		  	= document.getElementById(id);
//	alert(obj);	
	obj.style.display 	= 'block';

	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	
	obj.style.top 		= topposition + "px";
	obj.style.left 		= leftposition + "px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
		
	if(SCREENHEIGHT == '994'){		
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;	
		}else{
			cntHeight = cntHeight;
		}
	}else if(SCREENHEIGHT == '738'){
		
		if(cntHeight > 700  && cntHeight < 750){			
			cntHeight = SCREENHEIGHT;
		}else if(cntHeight > 750 ){			
			cntHeight = cntHeight;
		}else if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}else{			
			cntHeight = SCREENHEIGHT;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	document.getElementById("div_loading").style.display = 'block';
	var float_left = (SCREENWIDTH / 2) - 120;
	var float_top  = (SCREENHEIGHT / 3) - 120;
	JSFX_FloatDiv(id, float_left,float_top).floatIt();
	return false;
}


function popup_video(vidName, vidImg, divId){
	
	var obj 		  	= document.getElementById(divId);
	obj.style.display 	= 'block';
	
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	
	obj.style.top 		= topposition + "px";
	obj.style.left 		= leftposition + "px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
		
	if(SCREENHEIGHT == '994'){		
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;	
		}else{
			cntHeight = cntHeight;
		}
	}else if(SCREENHEIGHT == '738'){
		
		if(cntHeight > 700  && cntHeight < 750){			
			cntHeight = SCREENHEIGHT;
		}else if(cntHeight > 750 ){			
			cntHeight = cntHeight;
		}else if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}else{			
			cntHeight = SCREENHEIGHT;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	document.getElementById("div_loading").style.display = 'block';		
	
	var songPath 	= 'upload/video/song/'+vidName;
	var songImgPath = 'upload/video/song/'+vidImg;
		
	var so = new SWFObject('mediaplayer.swf','mpl','300','230','8');
	so.addParam('allowscriptaccess','always');
	so.addParam('allowfullscreen','true');
	so.addVariable('autostart','true');
	so.addVariable('height','230');
	so.addVariable('width','300');
	so.addVariable('file',songPath);
	so.addVariable('image',songImgPath);
	so.write('vidOfDayDiv');	
}


function popup_audio(audioName, audioImg, divId){
	
	var obj 		  	= document.getElementById(divId);
	obj.style.display 	= 'block';
	
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	
	obj.style.top 		= topposition + "px";
	obj.style.left 		= leftposition + "px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
		
	if(SCREENHEIGHT == '994'){		
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;	
		}else{
			cntHeight = cntHeight;
		}
	}else if(SCREENHEIGHT == '738'){
		
		if(cntHeight > 700  && cntHeight < 750){			
			cntHeight = SCREENHEIGHT;
		}else if(cntHeight > 750 ){			
			cntHeight = cntHeight;
		}else if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}else{			
			cntHeight = SCREENHEIGHT;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	document.getElementById("div_loading").style.display = 'block';		
	
	var songPath 	= 'upload/audio/song/'+audioName;
	var songImgPath = 'upload/audio/song/'+audioImg;
		
	var so = new SWFObject('mediaplayer.swf','mpl','200','20','8');
	so.addParam('allowscriptaccess','always');
	so.addParam('allowfullscreen','false');
	so.addVariable('autostart','true');
	so.addVariable('height','20');
	so.addVariable('width','200');
	so.addVariable('file',songPath);
	so.addVariable('image',songImgPath);
	so.write('auidOfDayDiv');	
}

function popup_Picks(id){
	
	var obj 		  	= document.getElementById(id);
	obj.style.display 	= 'block';
	
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	
	obj.style.top 		= topposition + "px";
	obj.style.left 		= leftposition + "px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
		
	if(SCREENHEIGHT == '994'){		
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;	
		}else{
			cntHeight = cntHeight;
		}
	}else if(SCREENHEIGHT == '738'){
		
		if(cntHeight > 700  && cntHeight < 750){			
			cntHeight = SCREENHEIGHT;
		}else if(cntHeight > 750 ){			
			cntHeight = cntHeight;
		}else if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}else{			
			cntHeight = SCREENHEIGHT;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	document.getElementById("div_loading").style.display = 'block';
	return false;
}




function outbook_popup(id){
	
	var obj 		  	= document.getElementById(id);
	obj.style.display 	= 'block';
	
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= topposition + "px";
	obj.style.left 		= leftposition + "px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(cntHeight < SCREENHEIGHT){
		cntHeight = SCREENHEIGHT + 20;
		
	}else{
		cntHeight = SCREENHEIGHT + 168;
		
	}
	if(cntWidth < SCREENWIDTH){		
		cntWidth = SCREENWIDTH - 26;		
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	document.getElementById("div_loading").style.display = 'block';		
}


function send_invitation(usName, seUserId){
	
	var selObj = document.getElementsByTagName('select');	
	for(i=0; i<selObj.length-1; i++){
		var selId = selObj[i].id;	
		document.getElementById(selId).style.visibility = 'hidden';
	}
	
	document.getElementById("UsNaId").innerHTML = "<b>"+usName+"</b>";
	document.getElementById("txtMes").value ='';
	document.getElementById("seUsId").value = seUserId;
	
	var obj 		  	= document.getElementById('inviteDivId');
	obj.style.display 	= 'block';
	
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= topposition + "px";
	obj.style.left 		= leftposition + "px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	//alert(SCREENHEIGHT +'::'+ cntHeight);
	if(cntHeight < SCREENHEIGHT){		
		cntHeight = SCREENHEIGHT + 20;
	}else{
		//cntHeight = SCREENHEIGHT + 168;
		cntHeight = cntHeight;
	}
	if(cntWidth < SCREENWIDTH){
		cntWidth = SCREENWIDTH - 26;
	}
	
	document.getElementById("errMsgId").innerHTML = '';
	document.getElementById("mainInvTbl").style.display = 'block';
	document.getElementById("msgInvTbl").style.display  = 'none';
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	document.getElementById("div_loading").style.display = 'block';
	
	var float_left = (SCREENWIDTH / 2) - 120;
	var float_top  = (SCREENHEIGHT / 2) - 120;
	JSFX_FloatDiv('inviteDivId', float_left,float_top).floatIt();
	return false;
}

function closeInvitePopUp(divId){
	
	var selObj = document.getElementsByTagName('select');	
	for(i=0; i<selObj.length-1; i++){
		var selId = selObj[i].id;
		document.getElementById(selId).style.visibility = 'visible';
	}
	document.getElementById(divId).style.display = 'none';
	document.getElementById("div_loading").style.display = 'none';
}

function sendInvite(){
	
	var se_usr_id 	= document.getElementById("seUsId").value;
	var msg 		= document.getElementById("txtMes").value;
	msg				= rm_trim(msg);
	
	if(msg == ''){
		messg = "You can't send invite unless you write anything";
		document.getElementById("errMsgId").innerHTML = "<font color='#FFA537' face='Arial' size='1'>"+messg+"</font>";
		return false;
	}else{
		if(msg.length > 100){
			messg = "Length of the message must be less than 100 characters";
			document.getElementById("errMsgId").innerHTML = "<font color='#FFA537' face='Arial' size='1'>"+messg+"</font>";
			return false;
		}else		
			document.getElementById("errMsgId").innerHTML = '';		
	}
	
	var url = "send-invite.php?mess="+msg+"&seId="+se_usr_id;
	//alert(url);return false;
	document.getElementById("errMsgId").innerHTML = "<img src='images/loading.gif' alt='Invitation Sending....'>";
	http_check.open("GET", url, true);				
	http_check.onreadystatechange = function test(){
		if(http_check.readyState == 4) {
			var response = http_check.responseText;
			//alert(response);
			if (response == 'yes'){
				
				document.getElementById("txtMes").value = '';
				
				document.getElementById("mainInvTbl").style.display = 'none';				
				document.getElementById("msgInvTbl").style.display  = 'block';
				var sendInviteDiv = "seInvDiv"+se_usr_id;
				//alert(sendInviteDiv);
				document.getElementById(sendInviteDiv).innerHTML = "<font color='#0099FF' face='Arial' size='1'>invitation pending</font>";			
			}else{
				//messg = 'Some error has occured, Please try again after some time.';
				document.getElementById("mainInvTbl").style.display = 'none';				
				document.getElementById("msgInvTbl").style.display  = 'block';				
			}
		}
	}				
	http_check.send(null);		
}



function send_mail(usName, seUserId){
	
	var selObj = document.getElementsByTagName('select');	
	for(i=0; i<selObj.length-1; i++){
		var selId = selObj[i].id;	
		document.getElementById(selId).style.visibility = 'hidden';
	}
	
	document.getElementById("UsNaId").innerHTML = "<b>"+usName+"</b>";
	document.getElementById("txtMes").value ='';
	document.getElementById("seUsId").value = seUserId;
	
	var obj 		  	= document.getElementById('MailDivId');
	obj.style.display 	= 'block';
	
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= topposition + "px";
	obj.style.left 		= leftposition + "px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	//alert(SCREENHEIGHT +'::'+ cntHeight);
	if(cntHeight < SCREENHEIGHT){		
		cntHeight = SCREENHEIGHT + 20;
	}else{
		//cntHeight = SCREENHEIGHT + 168;
		cntHeight = cntHeight;
	}
	if(cntWidth < SCREENWIDTH){
		cntWidth = SCREENWIDTH - 26;
	}
	
	document.getElementById("errMsgId").innerHTML = '';
	document.getElementById("mainInvTbl").style.display = 'block';
	document.getElementById("msgInvTbl").style.display  = 'none';
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	document.getElementById("div_loading").style.display = 'block';
	
	var float_left = (SCREENWIDTH / 2) - 120;
	var float_top  = (SCREENHEIGHT / 2) - 120;
	JSFX_FloatDiv('MailDivId', float_left,float_top).floatIt();
	return false;
}
function sendMail(){
	
	var se_usr_id 	= document.getElementById("seUsId").value;
	var msg 		= document.getElementById("txtMes").value;
	msg				= rm_trim(msg);
	
	if(msg == ''){
		messg = "You can't send mail unless you write anything";
		document.getElementById("errMsgId").innerHTML = "<font color='#FFA537' face='Arial' size='1'>"+messg+"</font>";
		return false;
	}else{
		if(msg.length > 1000){
			messg = "Length of the message must be less than 1000 characters";
			document.getElementById("errMsgId").innerHTML = "<font color='#FFA537' face='Arial' size='1'>"+messg+"</font>";
			return false;
		}else		
			document.getElementById("errMsgId").innerHTML = '';		
	}
	
	var url = "send-mail.php?mess="+msg+"&seId="+se_usr_id;
	//alert(url);return false;
	document.getElementById("errMsgId").innerHTML = "<img src='images/loading.gif' alt='Sending mail....'>";
	http_check.open("GET", url, true);				
	http_check.onreadystatechange = function test(){
		if(http_check.readyState == 4) {
			var response = http_check.responseText;
			//alert(response); return false;
			if (response == 'yes'){
				
				document.getElementById("txtMes").value = '';
				
				document.getElementById("mainInvTbl").style.display = 'none';				
				document.getElementById("msgInvTbl").style.display  = 'block';
				//var sendInviteDiv = "seInvDiv"+se_usr_id;
				//alert(sendInviteDiv);
				//document.getElementById(sendInviteDiv).innerHTML = "<font color='#0099FF' face='Arial' size='1'>invitation pending</font>";			
			}else{
				//messg = 'Some error has occured, Please try again after some time.';
				document.getElementById("mainInvTbl").style.display = 'none';				
				document.getElementById("msgInvTbl").style.display  = 'block';				
			}
		}
	}				
	http_check.send(null);		
}



function closeInviteBox(divId){
	
	if(document.getElementById("mainInvTbl").style.display == 'none'){
		
		document.getElementById("txtMes").value 	 = '';
		document.getElementById("errMsgId").innerHTML= '';		
		document.getElementById(divId).style.display = 'none';
		
		//document.location.href = "search.php";
		
	}else{
		document.getElementById(divId).style.display = 'none';	
	}
}

function hidePopUpDiv(divId){
	document.getElementById(divId).style.display = 'none';
	document.getElementById("div_loading").style.display = 'none';	
}


function showTapPopUp(seUsrId){
	
	document.getElementById("hiUsId").value =seUsrId;// "<b>"+seUsrId+"</b>";
	document.getElementById("txtMes").value ='';
	//document.getElementById("seUsId").value = seUserId;
	var obj 		  	= document.getElementById('tapMeDivId');
	obj.style.display 	= 'block';
	
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= topposition + "px";
	obj.style.left 		= leftposition + "px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){		
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;	
		}else{
			cntHeight = cntHeight;
		}
	}else if(SCREENHEIGHT == '738'){
		
		if(cntHeight > 700  && cntHeight < 750){			
			cntHeight = SCREENHEIGHT;
		}else if(cntHeight > 750 ){			
			cntHeight = cntHeight;
		}else if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}else{			
			cntHeight = SCREENHEIGHT;
		}
	}
	
	document.getElementById("errMsgId").innerHTML = '';
	document.getElementById("mainTblDiv").style.display = 'block';				
	document.getElementById("msgDivId").style.display  = 'none';
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	document.getElementById("div_loading").style.display = 'block';	
	
	var float_left = (SCREENWIDTH / 2) - 120;
	var float_top  = (SCREENHEIGHT / 3) - 120;
	JSFX_FloatDiv('tapMeDivId', float_left,float_top).floatIt();
	return false;
}


function limitChar(tapMsgId, liDivId, totChars){
	
	var msg 	 = document.getElementById(tapMsgId).value;
	var msgLen	 = msg.length;
	
	if(msgLen > totChars){
		document.getElementById(tapMsgId).value = msg.substring(0, totChars);
	}else{
		document.getElementById(liDivId).innerHTML = totChars - msgLen;
	}	
}


function dashCount(tapMsgId, liDivId, totChars){
	var msg 	 = document.subfrm.description.value;
	if(msg!=''){
	var msgLen	 = msg.length;
	if(msgLen > totChars){
		document.getElementById(tapMsgId).value = msg.substring(0, totChars);
	}else{
		document.getElementById(liDivId).innerHTML = totChars - msgLen;
	}	
	}else
	{
	document.getElementById(liDivId).innerHTML = 1000;	
	}
}



function submitTap(){
	
	var se_usr_id 	= document.getElementById("hiUsId").value;
	var msg 		= document.getElementById("tapMsg").value;
	msg				= rm_trim(msg);
	
	if(msg == ''){
		messg = "Please write text to tap.";
		document.getElementById("tapErrMsg").innerHTML = "<font color='#FFA537' face='verdana' size='1'>"+messg+"</font>";
		return false;
	}else{
		document.getElementById("tapErrMsg").innerHTML = '';		
	}
	
	var url = "send-tap.php?mess="+msg+"&seId="+se_usr_id;
	//alert(url);return false;
	document.getElementById("proImgId").innerHTML = "<img src='images/loading.gif' alt='Tap Sending....'>";
	http_check.open("GET", url, true);				
	http_check.onreadystatechange = function test(){					
		if(http_check.readyState == 4) {
			var response = http_check.responseText;
			//alert(response);return false;
			if (response == 'yes'){
				document.getElementById("proImgId").innerHTML	= '';
				document.getElementById("tapErrMsg").innerHTML 	= '';
				document.getElementById("tapMsg").value 		= '';
				document.getElementById("leChDiv").innerHTML	= 300;
				
				document.getElementById("mainTblDiv").style.display = 'none';
				document.getElementById("msgDivId").style.display = 'block';
				
			}
		}
	}				
	http_check.send(null);	
}


/*===============================================================*/
//=== 		This code for float the div		======================

var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function JSFX_FloatDiv(id, sx, sy)
{
	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
	var px = document.layers ? "" : "px";
	window[id + "_obj"] = el;
	if(d.layers)el.style=el;
	el.cx = el.sx = sx;el.cy = el.sy = sy;
	el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};

	el.floatIt=function()
	{
		var pX, pY;
		pX = (this.sx >= 0) ? 0 : ns ? innerWidth : 
		document.documentElement && document.documentElement.clientWidth ? 
		document.documentElement.clientWidth : document.body.clientWidth;
		pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
		document.documentElement.scrollTop : document.body.scrollTop;
		if(this.sy<0) 
		pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? 
		document.documentElement.clientHeight : document.body.clientHeight;
		this.cx += (pX + this.sx - this.cx)/8;this.cy += (pY + this.sy - this.cy)/8;
		this.sP(this.cx, this.cy);
		setTimeout(this.id + "_obj.floatIt()", 40);
	}
	return el;
}
/*===============================================================*/


function claBigImg(imgPath, imgW, imgH){
	var imgObj 	= document.getElementById('bigImgSrc');	
		
	var scrObj	= document.getElementById('scrollDiv');
	//alert(imgW+'::'+imgH);
	if(imgH > 600){
		scrObj.style.height = '600';		
	}else{		
		imgH = parseInt(imgH)+4;
		scrObj.style.height = parseInt(imgH);
	}
	if(imgW > 900){
		scrObj.style.width  = '900';
	}else{		
		scrObj.style.width  = parseInt(imgW);
	}
	imgObj.src  = '';
	imgObj.src  = imgPath;
	//alert(imgObj.src);
	var obj 	= document.getElementById('claBigImgDiv');
	obj.style.display = 'block';
			
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= "180px";
	obj.style.left 		= "200px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){
		//alert(cntHeight+'::'+SCREENHEIGHT);
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	
	document.getElementById("div_loading").style.display = 'block';	
	return false;
}


function LessonclaBigImg(imgPath, imgW, imgH){
		
	var imgObj 	= document.getElementById('LessonbigImgSrc');	
	
	var scrObj	= document.getElementById('LessonscrollDiv');
	
	if(imgH > 600){
		scrObj.style.height = '600';		
	}else{		
		imgH = parseInt(imgH)+4;
		scrObj.style.height = parseInt(imgH);
	}
	if(imgW > 900){
		scrObj.style.width  = '900';
	}else{		
		scrObj.style.width  = parseInt(imgW);
	}
	imgObj.src  = imgPath;
	var obj 	= document.getElementById('LessonclaBigImgDiv');
	obj.style.display = 'block';
			
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= "180px";
	obj.style.left 		= "200px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){
		//alert(cntHeight+'::'+SCREENHEIGHT);
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	
	document.getElementById("div_loading").style.display = 'block';	
	return false;
}

function EventclaBigImg(imgPath, imgW, imgH){
		
	var imgObj 	= document.getElementById('EventbigImgSrc');	
		
	var scrObj	= document.getElementById('EventscrollDiv');
	//alert(imgW+'::'+imgH);
	if(imgH > 600){
		scrObj.style.height = '600';		
	}else{		
		imgH = parseInt(imgH)+4;
		scrObj.style.height = parseInt(imgH);
	}
	if(imgW > 900){
		scrObj.style.width  = '900';
	}else{		
		scrObj.style.width  = parseInt(imgW);
	}
	imgObj.src  = imgPath;
	
	var obj 	= document.getElementById('EventclaBigImgDiv');
	obj.style.display = 'block';
			
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= "180px";
	obj.style.left 		= "200px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){
		//alert(cntHeight+'::'+SCREENHEIGHT);
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	
	document.getElementById("div_loading").style.display = 'block';	
	return false;
}

function claWantBigImg(imgPath, imgW, imgH){
		
	var imgObj 	= document.getElementById('WantbigImgSrc');	
		
	var scrObj	= document.getElementById('WantscrollDiv');
	//alert(imgW+'::'+imgH);
	if(imgH > 600){
		scrObj.style.height = '600';		
	}else{		
		imgH = parseInt(imgH)+4;
		scrObj.style.height = parseInt(imgH);
	}
	if(imgW > 900){
		scrObj.style.width  = '900';
	}else{		
		scrObj.style.width  = parseInt(imgW);
	}
	imgObj.src  = imgPath;
	
	var obj 	= document.getElementById('claWantBigImgDiv');
	obj.style.display = 'block';
			
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= "180px";
	obj.style.left 		= "200px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){
		//alert(cntHeight+'::'+SCREENHEIGHT);
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	
	document.getElementById("div_loading").style.display = 'block';	
	return false;
}

function claMusicalBigImg1(imgPath, imgW, imgH){
		
	var imgObj 	= document.getElementById('MusicalImgSrc1');	
		
	var scrObj	= document.getElementById('MusicalscrollDiv1');
	//alert(imgW+'::'+imgH);
	if(imgH > 600){
		scrObj.style.height = '600';		
	}else{		
		imgH = parseInt(imgH)+4;
		scrObj.style.height = parseInt(imgH);
	}
	if(imgW > 900){
		scrObj.style.width  = '900';
	}else{		
		scrObj.style.width  = parseInt(imgW);
	}
	imgObj.src  = imgPath;
	
	var obj 	= document.getElementById('claMusicalImgDiv1');
	obj.style.display = 'block';
			
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= "180px";
	obj.style.left 		= "200px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){
		//alert(cntHeight+'::'+SCREENHEIGHT);
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	
	document.getElementById("div_loading").style.display = 'block';	
	return false;
}
function claMusicalBigImg2(imgPath, imgW, imgH){
		
	var imgObj 	= document.getElementById('MusicalImgSrc2');	
		
	var scrObj	= document.getElementById('MusicalscrollDiv2');
	//alert(imgW+'::'+imgH);
	if(imgH > 600){
		scrObj.style.height = '600';		
	}else{		
		imgH = parseInt(imgH)+4;
		scrObj.style.height = parseInt(imgH);
	}
	if(imgW > 900){
		scrObj.style.width  = '900';
	}else{		
		scrObj.style.width  = parseInt(imgW);
	}
	imgObj.src  = imgPath;
	
	var obj 	= document.getElementById('claMusicalImgDiv2');
	obj.style.display = 'block';
			
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= "180px";
	obj.style.left 		= "200px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){
		//alert(cntHeight+'::'+SCREENHEIGHT);
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	
	document.getElementById("div_loading").style.display = 'block';	
	return false;
}
function claMusicalBigImg3(imgPath, imgW, imgH){
		
	var imgObj 	= document.getElementById('MusicalImgSrc3');	
		
	var scrObj	= document.getElementById('MusicalscrollDiv3');
	//alert(imgW+'::'+imgH);
	if(imgH > 600){
		scrObj.style.height = '600';		
	}else{		
		imgH = parseInt(imgH)+4;
		scrObj.style.height = parseInt(imgH);
	}
	if(imgW > 900){
		scrObj.style.width  = '900';
	}else{		
		scrObj.style.width  = parseInt(imgW);
	}
	imgObj.src  = imgPath;
	
	var obj 	= document.getElementById('claMusicalImgDiv3');
	obj.style.display = 'block';
			
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= "180px";
	obj.style.left 		= "200px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){
		//alert(cntHeight+'::'+SCREENHEIGHT);
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	
	document.getElementById("div_loading").style.display = 'block';	
	return false;
}
function claMusicalBigImg4(imgPath, imgW, imgH){
		
	var imgObj 	= document.getElementById('MusicalImgSrc4');	
		
	var scrObj	= document.getElementById('MusicalscrollDiv4');
	//alert(imgW+'::'+imgH);
	if(imgH > 600){
		scrObj.style.height = '600';		
	}else{		
		imgH = parseInt(imgH)+4;
		scrObj.style.height = parseInt(imgH);
	}
	if(imgW > 900){
		scrObj.style.width  = '900';
	}else{		
		scrObj.style.width  = parseInt(imgW);
	}
	imgObj.src  = imgPath;
	
	var obj 	= document.getElementById('claMusicalImgDiv4');
	obj.style.display = 'block';
			
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= "180px";
	obj.style.left 		= "200px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){
		//alert(cntHeight+'::'+SCREENHEIGHT);
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	
	document.getElementById("div_loading").style.display = 'block';	
	return false;
}
function claClthingBigImg1(imgPath, imgW, imgH){
		
	var imgObj 	= document.getElementById('clothingImgSrc1');	
		
	var scrObj	= document.getElementById('clothingscrollDiv1');
	//alert(imgW+'::'+imgH);
	if(imgH > 600){
		scrObj.style.height = '600';		
	}else{		
		imgH = parseInt(imgH)+4;
		scrObj.style.height = parseInt(imgH);
	}
	if(imgW > 900){
		scrObj.style.width  = '900';
	}else{		
		scrObj.style.width  = parseInt(imgW);
	}
	imgObj.src  = imgPath;
	
	var obj 	= document.getElementById('claClothingImgDiv1');
	obj.style.display = 'block';
			
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= "180px";
	obj.style.left 		= "200px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){
		//alert(cntHeight+'::'+SCREENHEIGHT);
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	
	document.getElementById("div_loading").style.display = 'block';	
	return false;
}
function claClthingBigImg2(imgPath, imgW, imgH){
		
	var imgObj 	= document.getElementById('clothingImgSrc2');	
		
	var scrObj	= document.getElementById('clothingscrollDiv2');
	//alert(imgW+'::'+imgH);
	if(imgH > 600){
		scrObj.style.height = '600';		
	}else{		
		imgH = parseInt(imgH)+4;
		scrObj.style.height = parseInt(imgH);
	}
	if(imgW > 900){
		scrObj.style.width  = '900';
	}else{		
		scrObj.style.width  = parseInt(imgW);
	}
	imgObj.src  = imgPath;
	
	var obj 	= document.getElementById('claClothingImgDiv2');
	obj.style.display = 'block';
			
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= "180px";
	obj.style.left 		= "200px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){
		//alert(cntHeight+'::'+SCREENHEIGHT);
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	
	document.getElementById("div_loading").style.display = 'block';	
	return false;
}
function claClthingBigImg3(imgPath, imgW, imgH){
		
	var imgObj 	= document.getElementById('clothingImgSrc3');	
		
	var scrObj	= document.getElementById('clothingscrollDiv3');
	//alert(imgW+'::'+imgH);
	if(imgH > 600){
		scrObj.style.height = '600';		
	}else{		
		imgH = parseInt(imgH)+4;
		scrObj.style.height = parseInt(imgH);
	}
	if(imgW > 900){
		scrObj.style.width  = '900';
	}else{		
		scrObj.style.width  = parseInt(imgW);
	}
	imgObj.src  = imgPath;
	
	var obj 	= document.getElementById('claClothingImgDiv3');
	obj.style.display = 'block';
			
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= "180px";
	obj.style.left 		= "200px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){
		//alert(cntHeight+'::'+SCREENHEIGHT);
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	
	document.getElementById("div_loading").style.display = 'block';	
	return false;
}
function claClthingBigImg4(imgPath, imgW, imgH){
		
	var imgObj 	= document.getElementById('clothingImgSrc4');	
		
	var scrObj	= document.getElementById('clothingscrollDiv4');
	//alert(imgW+'::'+imgH);
	if(imgH > 600){
		scrObj.style.height = '600';		
	}else{		
		imgH = parseInt(imgH)+4;
		scrObj.style.height = parseInt(imgH);
	}
	if(imgW > 900){
		scrObj.style.width  = '900';
	}else{		
		scrObj.style.width  = parseInt(imgW);
	}
	imgObj.src  = imgPath;
	
	var obj 	= document.getElementById('claClothingImgDiv4');
	obj.style.display = 'block';
			
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= "180px";
	obj.style.left 		= "200px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){
		//alert(cntHeight+'::'+SCREENHEIGHT);
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	
	document.getElementById("div_loading").style.display = 'block';	
	return false;
}


function showQue(){
		
	//alert(browserName);
	if(browserName == 'IE'){
		y = y + 85;
		x = x - 20;
	}else if(browserName == 'Firefox'){
		y = y + 120;
		x = x - 20;
	}else if(browserName == 'Opera'){
		y = y + 80;
		x = x - 20;
	}else{
		y = y + 80;
		x = x - 20;
	}
	var obj 		= document.getElementById("dashBrdQueId");

	//alert(x+' :: '+y);
	obj.style.top 	= '166px';
	obj.style.left 	= '383px';
	obj.style.display = 'block';	
}

////////////
function showPoint(){
		
	//alert(browserName);
	var obj 	= document.getElementById('dashshowpoint');
	obj.style.display = 'block';
			
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= "180px";
	obj.style.left 		= "200px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){
		//alert(cntHeight+'::'+SCREENHEIGHT);
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	
	document.getElementById("div_loading").style.display = 'block';	
	
	var float_left = (SCREENWIDTH / 2) - 120;
	var float_top  = (SCREENHEIGHT / 2) - 120;
	JSFX_FloatDiv('dashshowpoint', float_left,float_top).floatIt();
	
}

////////////

function closeMsgBoxWH(divId){
	document.getElementById(divId).style.display = 'none';
	document.getElementById("panel2").style.display = 'block';
	document.getElementById("panel3").style.display = 'none';
	document.getElementById("divIdDet").style.display = 'none';
	  
}





function send_privatemsg(usName, seUserId){
	document.getElementById("mainSendPri").style.display = 'block';				
	document.getElementById("msgSendPri").style.display  = 'none';
	document.getElementById("errPriMsgId").innerHTML ='';
	document.getElementById("subjectPri").value = '';
	document.getElementById("txtPriMes").value = '';
	var selObj = document.getElementsByTagName('select');	
	for(i=0; i<selObj.length-1; i++){
		var selId = selObj[i].id;	
		document.getElementById(selId).style.visibility = 'hidden';
	}
	
	document.getElementById("UsPriNaId").innerHTML = "<b>"+usName+"</b>";
	document.getElementById("txtPriMes").value ='';
	document.getElementById("sePriUsId").value = seUserId;
	
	var obj 		  	= document.getElementById('SendPriMsg');
	obj.style.display 	= 'block';
	
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= topposition + "px";
	obj.style.left 		= leftposition + "px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	//alert(SCREENHEIGHT +'::'+ cntHeight);
	if(cntHeight < SCREENHEIGHT){		
		cntHeight = SCREENHEIGHT + 20;
	}else{
		//cntHeight = SCREENHEIGHT + 168;
		cntHeight = cntHeight;
	}
	if(cntWidth < SCREENWIDTH){
		cntWidth = SCREENWIDTH - 26;
	}
	
	document.getElementById("mainInvTbl").style.display = 'block';
	document.getElementById("msgInvTbl").style.display  = 'none';
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	document.getElementById("div_loading").style.display = 'block';
	
	var float_left = (SCREENWIDTH / 2) - 120;
	var float_top  = (SCREENHEIGHT / 2) - 120;
	JSFX_FloatDiv('SendPriMsg', float_left,float_top).floatIt();
	//return false;
}

function sendPrivate(){
	var se_usr_id 	= document.getElementById("sePriUsId").value;
	var subj 		= document.getElementById("subjectPri").value;
	var msg 		= document.getElementById("txtPriMes").value;
	subj			= rm_trim(subj);
	msg				= rm_trim(msg);
	if(msg == ''){
		messg = "You can't send message unless you write anything";
		document.getElementById("errPriMsgId").innerHTML = "<font color='#FFA537' face='Arial' size='1'>"+messg+"</font>";
		return false;
	}else{
		if(msg.length > 2000){
			messg = "Length of the message must be less than 2000 characters";
			document.getElementById("errPriMsgId").innerHTML = "<font color='#FFA537' face='Arial' size='1'>"+messg+"</font>";
			return false;
		}else		
			document.getElementById("errPriMsgId").innerHTML = '';		
	}
	
	var url = "send-message.php?subj="+subj+"&mess="+msg+"&seId="+se_usr_id;
	//alert(url);//return false;
	document.getElementById("errPriMsgId").innerHTML = "<img src='images/loading.gif' alt='Invitation Sending....'>";
	http_check.open("GET", url, true);				
	http_check.onreadystatechange = function test(){
		if(http_check.readyState == 4) {
			var response = http_check.responseText;
			if (response == 'yes'){
				
				document.getElementById("subjectPri").value = '';
				document.getElementById("txtPriMes").value = '';
				
				document.getElementById("mainSendPri").style.display = 'none';				
				document.getElementById("msgSendPri").style.display  = 'block';
				document.getElementById("errPriMsgId").innerHTML = '';
				
			}else{
				messg = 'Some error has occured, Please try again after some time.';
				document.getElementById("mainSendPri").style.display = 'block';				
				document.getElementById("msgSendPri").style.display  = 'none';
				document.getElementById("errPriMsgId").innerHTML = "<font color='#FFA537' face='Arial' size='1'>"+messg+"</font>";
			}
		}
	}				
	http_check.send(null);		
}

/////////////function for slash user page start here////////////////////////////////////////////

function send_privatemsg_sls(usName, seUserId){
	document.getElementById("mainSendPri").style.display = 'block';				
	document.getElementById("msgSendPri").style.display  = 'none';
	document.getElementById("errPriMsgId").innerHTML ='';
	document.getElementById("subjectPri").value = '';
	document.getElementById("txtPriMes").value = '';
	var selObj = document.getElementsByTagName('select');	
	for(i=0; i<selObj.length-1; i++){
		var selId = selObj[i].id;	
		document.getElementById(selId).style.visibility = 'hidden';
	}
	
	document.getElementById("UsPriNaId").innerHTML = "<b>"+usName+"</b>";
	document.getElementById("txtPriMes").value ='';
	document.getElementById("sePriUsId").value = seUserId;
	
	var obj 		  	= document.getElementById('SendPriMsg');
	obj.style.display 	= 'block';
	
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= topposition + "px";
	obj.style.left 		= leftposition + "px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	//alert(SCREENHEIGHT +'::'+ cntHeight);
	if(cntHeight < SCREENHEIGHT){		
		cntHeight = SCREENHEIGHT + 20;
	}else{
		//cntHeight = SCREENHEIGHT + 168;
		cntHeight = cntHeight;
	}
	if(cntWidth < SCREENWIDTH){
		cntWidth = SCREENWIDTH - 26;
	}
	
	document.getElementById("mainInvTbl").style.display = 'block';
	document.getElementById("msgInvTbl").style.display  = 'none';
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	document.getElementById("div_loading").style.display = 'block';
	
	var float_left = (SCREENWIDTH / 2) - 120;
	var float_top  = (SCREENHEIGHT / 2) - 120;
	JSFX_FloatDiv('SendPriMsg', float_left,float_top).floatIt();
	//return false;
}

function sendPrivate_sls(){
	var se_usr_id 	= document.getElementById("sePriUsId").value;
	var subj 		= document.getElementById("subjectPri").value;
	var msg 		= document.getElementById("txtPriMes").value;
	subj			= subj;
	msg				= msg;
	if(msg == ''){
		messg = "You can't send message unless you write anything";
		document.getElementById("errPriMsgId").innerHTML = "<font color='#FFA537' face='Arial' size='1'>"+messg+"</font>";
		return false;
	}else{
		if(msg.length > 2000){
			messg = "Length of the message must be less than 2000 characters";
			document.getElementById("errPriMsgId").innerHTML = "<font color='#FFA537' face='Arial' size='1'>"+messg+"</font>";
			return false;
		}else		
			document.getElementById("errPriMsgId").innerHTML = '';		
	}
	var docroot	=	document.getElementById("docRoot").value;
	var url = docroot+"user/send-message.php?subj="+subj+"&mess="+msg+"&seId="+se_usr_id;
	//alert(url);//return false;
	document.getElementById("errPriMsgId").innerHTML = "<img src='../images/loading.gif' alt='Invitation Sending....'>";
	http_check.open("GET", url, true);				
	http_check.onreadystatechange = function test(){
		if(http_check.readyState == 4) {
			var response = http_check.responseText;
			//alert(response);
			if (response == 'yes'){
				
				document.getElementById("subjectPri").value = '';
				document.getElementById("txtPriMes").value = '';
				
				document.getElementById("mainSendPri").style.display = 'none';				
				document.getElementById("msgSendPri").style.display  = 'block';
				document.getElementById("errPriMsgId").innerHTML = '';
				
			}else{
				messg = 'Some error has occured, Please try again after some time.';
				document.getElementById("mainSendPri").style.display = 'block';				
				document.getElementById("msgSendPri").style.display  = 'none';
				document.getElementById("errPriMsgId").innerHTML = "<font color='#FFA537' face='Arial' size='1'>"+messg+"</font>";
			}
		}
	}				
	http_check.send(null);		
}
function closeMsgBox_sls(divId){
	document.getElementById(divId).style.display = 'none';
	document.getElementById("div_loading").style.display = 'none';
	  
}

function AskQuestions(){
		
	var obj 		  	= document.getElementById('claAskQuestion');
	obj.style.display 	= 'block';
	
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= topposition + "px";
	obj.style.left 		= leftposition + "px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	//alert(SCREENHEIGHT +'::'+ cntHeight);
	if(cntHeight < SCREENHEIGHT){		
		cntHeight = SCREENHEIGHT + 20;
	}else{
		//cntHeight = SCREENHEIGHT + 168;
		cntHeight = cntHeight;
	}
	if(cntWidth < SCREENWIDTH){
		cntWidth = SCREENWIDTH - 26;
	}
	
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	document.getElementById("div_loading").style.display = 'block';
	
	var float_left = (SCREENWIDTH / 2) - 120;
	var float_top  = (SCREENHEIGHT / 2) - 120;
	//JSFX_FloatDiv('SendPriMsg', float_left,float_top).floatIt();
	//return false;
}

/////////////function for slash user page ends here////////////////////////////////////////////

function PostFlag(){
	//alert();
	var obj = document.getElementById("CommFlag");
	obj.style.display = 'block';
	//document.getElementById("country").disabled = true;
	
	document.getElementById("CommMessge").innerHTML = '';
		
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= topposition + "px";
	obj.style.left 		= leftposition + "px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){
		cntHeight = SCREENHEIGHT - 140;
	}else if(SCREENHEIGHT == '738'){
		cntHeight = SCREENHEIGHT - 70;
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";	
	document.getElementById("div_loading").style.display = 'block';
	var float_left = (SCREENWIDTH / 2) - 120;
	var float_top  = (SCREENHEIGHT / 3) - 120;
	JSFX_FloatDiv('showValId', float_left,float_top).floatIt();
	return false;
}

function TopUpTap(){
	var obj = document.getElementById("tapThetopic");
	obj.style.display = 'block';
	//document.getElementById("country").disabled = true;
	
	document.getElementById("tapdescription").innerHTML = '';
		
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= topposition + "px";
	obj.style.left 		= leftposition + "px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){
		cntHeight = SCREENHEIGHT - 140;
	}else if(SCREENHEIGHT == '738'){
		cntHeight = SCREENHEIGHT - 70;
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";	
	document.getElementById("div_loading").style.display = 'block';
	var float_left = (SCREENWIDTH / 2) - 120;
	var float_top  = (SCREENHEIGHT / 3) - 120;
	JSFX_FloatDiv('showValId', float_left,float_top).floatIt();
	return false;
}


function AddCircleFan(id,fan){
	
	var logUser	= id;
	var fanUser	= fan;
	var obj = document.getElementById("AddFanListId");
	obj.style.display = 'block';
	document.getElementById('loginuserfan').value   = logUser;
	document.getElementById('frndid1').value   		= fanUser;
	document.getElementById("fandescription").value = '';
		
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	obj.style.top 		= topposition + "px";
	obj.style.left 		= leftposition + "px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
	
	if(SCREENHEIGHT == '994'){
		cntHeight = SCREENHEIGHT - 140;
	}else if(SCREENHEIGHT == '738'){
		cntHeight = SCREENHEIGHT - 70;
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";	
	document.getElementById("div_loading").style.display = 'block';
	var float_left = (SCREENWIDTH / 2) - 120;
	var float_top  = (SCREENHEIGHT / 3) - 120;
	//JSFX_FloatDiv('showValId', float_left,float_top).floatIt();
	return false;
}


function addasfriend(logid){ 
	var fandescription	= document.getElementById("fandescription").value;
	var loginuser		= document.getElementById("loginuserfan").value;
	var frndid			= document.getElementById("frndid1").value;
	//alert(loginuser);
	if(loginuser==''){
		//alert('hello');
		document.getElementById('AddFanListId').style.display='none';
		//document.getElementById('AddFanListId').style.display="block";
		AddLoginPopUp(fandescription,frndid,'fanloginid');
	}
	else
	{
		Send_invitefanLogin(loginuser,fandescription,frndid);
	}
		
}

function Send_invitefanLogin(fanId,fanDesc,frndId){
					var url = "send-invite.php?fanid="+fanId+"&fandesc="+fanDesc+"&frndId="+frndId;
					//alert(url);
						http_check.open("GET", url, true);	
						http_check.onreadystatechange = function test(){	
						if(http_check.readyState == 4) {							
								var response = http_check.responseText; 
								//alert(response);
								if (response=="yes"){
								//document.getElementById('fanloginid').style.display='none';
								document.getElementById('AddFanListId').style.display="block";
								document.getElementById('mainfanTblDiv').style.display='none';
								document.getElementById('msgfanDivId').style.display='block';
									
								}
								if (response=="11"){
									//alert('Hello');
								//document.getElementById('fanloginid').style.display='none';
								document.getElementById('AddFanListId').style.display="block";
								document.getElementById('mainfanTblDiv').style.display='none';
								document.getElementById('msgfanAllDivId').style.display='block';
									
								}
								if (response=="10"){
									//alert('Hello');
								//document.getElementById('fanloginid').style.display='none';
								document.getElementById('AddFanListId').style.display="block";
								document.getElementById('mainfanTblDiv').style.display='none';
								document.getElementById('msgfanPenDivId').style.display='block';
									
								}
								if (response=="12"){
									//alert('Hello');
								//document.getElementById('msgfanBlock').style.display='block';
								document.getElementById('AddFanListId').style.display="block";
								document.getElementById('mainfanTblDiv').style.display='none';
								document.getElementById('msgfanBlock').style.display='block';
									
								}
								if (response=="111"){
								
								document.getElementById('fanloginid').style.display='none';
								document.getElementById('AddFanListId').style.display="block";
								document.getElementById('mainfanTblDiv').style.display='none';
								document.getElementById('msgfanSelfDivId').style.display='block';
									
								}
									
							}
						}	
						http_check.send(null);					

}


function Send_BlockfanLine(fanId){
	var url = "block-invite.php?fanid="+fanId;
	//alert(url);
		http_check.open("GET", url, true);	
		http_check.onreadystatechange = function test(){	
		if(http_check.readyState == 4) {							
				var response = http_check.responseText; 
			if (response=="yes"){
				document.getElementById('FanBloCkUserMsh').innerHTML="User blocked successfully";
				}
			}
		}	
		http_check.send(null);					

}
//////////////////////////////////////////////////////////////////////////////////////////////
function popup_theme(id){
	
	var obj 		  	= document.getElementById(id);
	obj.style.display 	= 'block';
	
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	
	obj.style.top 		= topposition + "px";
	obj.style.left 		= leftposition + "px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
		
	if(SCREENHEIGHT == '994'){		
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;	
		}else{
			cntHeight = cntHeight;
		}
	}else if(SCREENHEIGHT == '738'){
		
		if(cntHeight > 700  && cntHeight < 750){			
			cntHeight = SCREENHEIGHT;
		}else if(cntHeight > 750 ){			
			cntHeight = cntHeight;
		}else if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}else{			
			cntHeight = SCREENHEIGHT;
		}
	}
	
	document.getElementById("maskDivMedia").style.height = cntHeight+"px";
	document.getElementById("maskDivMedia").style.width  = cntWidth+"px";
	document.getElementById("div_loading").style.display = 'block';
	var float_left = (SCREENWIDTH / 2) - 120;
	var float_top  = (SCREENHEIGHT / 3) - 120;
	JSFX_FloatDiv(id, float_left,float_top).floatIt();
	return false;
}

function keyword_suggest(keyword){
	//alert(keyword);
	if(keyword!="" && keyword!="Username, first or last name"){
	var url = "thebc_suggest.php?keyword="+keyword;
	http_check.open("GET", url, true);	
		http_check.onreadystatechange = function test(){	
		if(http_check.readyState == 4) {							
				var response = http_check.responseText;
				//alert(response);
			if (response!=""){
				document.getElementById('ShowSuGGestId').innerHTML=response;
				}
			}
		}	
		http_check.send(null);
	}else{
	document.getElementById('ShowSuGGestId').innerHTML='';
	}
popup_suggest('AddSuggestId');
}

function popup_suggest(id){
	
	var obj 		  	= document.getElementById(id);
	obj.style.display 	= 'block';
	
	var width 			= pageWidth();	
	var height 			= pageHeight();	
	var left 			= leftPosition(); 
	var top 			= topPosition();
	var dialogwidth 	= obj.offsetWidth;
	var dialogheight 	= obj.offsetHeight;
	var topposition 	= top + (height / 2) - (dialogheight / 2);
	var leftposition 	= left + (width / 2) - (dialogwidth / 2);
	
	obj.style.top 		= 235 + "px";
	obj.style.left 		= 472 + "px";
	
	var cntObj 	  		= document.getElementById(CONTENTDIV);
	var cntHeight 		= cntObj.offsetHeight;
	var cntWidth		= cntObj.offsetWidth;
		
	if(SCREENHEIGHT == '994'){		
		if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;	
		}else{
			cntHeight = cntHeight;
		}
	}else if(SCREENHEIGHT == '738'){
		
		if(cntHeight > 700  && cntHeight < 750){			
			cntHeight = SCREENHEIGHT;
		}else if(cntHeight > 750 ){			
			cntHeight = cntHeight;
		}else if(cntHeight < SCREENHEIGHT){
			cntHeight = SCREENHEIGHT - 140;
		}else{			
			cntHeight = SCREENHEIGHT;
		}
	}
	
	var float_left = 200;
	var float_top  =100;
	
}

function fanlist_suggest(keyword){
	//alert(keyword);
	if(keyword!="" && keyword!="Username, first or last name"){
	var url = "fanlist_suggest.php?keyword="+keyword;
	http_check.open("GET", url, true);	
		http_check.onreadystatechange = function test(){	
		if(http_check.readyState == 4) {							
				var response = http_check.responseText;
				//alert(response);
			if (response!=""){
				document.getElementById('fanShowSuGGestId').innerHTML=response;
				}
			}
		}	
		http_check.send(null);
	}else{
	document.getElementById('ShowSuGGestId').innerHTML='';
	}
popup_suggest('fanSuggestId');
}
/////////////functions for send status comments start here//////////////////////////////

function showStatusComnt(status_comments,comntLink,comntText){
	document.getElementById("comntText").value	=	'';
	document.getElementById(status_comments).style.display	=	'block';
	document.getElementById(comntLink).style.display	=	'none';
	
}
function cancelStatusComnt(status_comments,comntText,comntLink){
	
	document.getElementById(status_comments).style.display	=	'none';
	document.getElementById(comntLink).style.display	=	'block';
	document.getElementById("comntText").value	=	'';
	
}
function setbg(color)
{
	document.getElementById("styled").style.background=color
}
function blankTxtBox(id){
	//alert(id);
	var cmntBoxVal	=	rm_trim(document.getElementById(id).value);
	if(cmntBoxVal == 'Write a comment...' ){
		document.getElementById(id).value	=	'';
	}

}





function postStatusComnt(comntText,fanid,showComntDiv,showComntErr,statusId){
	
	var fanid 		= document.getElementById(fanid).value;
	var statusid 	= document.getElementById(statusId).value;
	var comntTextVal 	= document.getElementById(comntText).value;
	comntTextVal				= rm_trim(comntTextVal);
	if(comntTextVal == '' || comntTextVal == 'Write a comment...'){
		var messg = "Write a comment...";
		document.getElementById(comntText).value = messg;
		return false;
	}else{
		document.getElementById(comntText).innerHTML = '';		
	}
	
	var url = "send-status-comnt.php?mess="+comntTextVal+"&fanId="+fanid+"&statusId="+statusid;
	//alert(url);
	http_check.open("GET", url, true);				
	http_check.onreadystatechange = function test(){					
		if(http_check.readyState == 4) {
			var response = http_check.responseText;
			//alert(response);//return false;
			if (response){
				document.getElementById(showComntDiv).innerHTML	= response;
				document.getElementById(comntText).value 		= '';
				
				
			}
		}
	}				
	http_check.send(null);	


}
function delStatusComnt(comntid,statusid,fanid,showComntDiv){	
	var url = "del-status-comnt.php?comntId="+comntid+"&fanId="+fanid+"&statusId="+statusid;
	http_check.open("GET", url, true);				
	http_check.onreadystatechange = function test(){					
		if(http_check.readyState == 4) {
			var response = http_check.responseText;
			//alert(response);//return false;
			if (response){
				document.getElementById(showComntDiv).innerHTML	= response;				
				
			}
		}
	}				
	http_check.send(null);	

}


function delOldStatusComnt(comntid,statusid,fanid,showComntDiv){	
	var url = "del-oldstatus-comnt.php?comntId="+comntid+"&fanId="+fanid+"&statusId="+statusid;
	http_check.open("GET", url, true);				
	http_check.onreadystatechange = function test(){					
		if(http_check.readyState == 4) {
			var response = http_check.responseText;
			//alert(response);//return false;
			if (response){
				document.getElementById(showComntDiv).innerHTML	= response;				
				
			}
		}
	}				
	http_check.send(null);	

}


function delSelfStatusComnt(comntid,statusid,fanid,showComntDiv){	
	var url = "del-selfstatus-comnt.php?comntId="+comntid+"&fanId="+fanid+"&statusId="+statusid;
	http_check.open("GET", url, true);				
	http_check.onreadystatechange = function test(){					
		if(http_check.readyState == 4) {
			var response = http_check.responseText;
			//alert(response);//return false;
			if (response){
				document.getElementById(showComntDiv).innerHTML	= response;				
				
			}
		}
	}				
	http_check.send(null);	

}

function delSelfOldStatusComnt(comntid,statusid,fanid,showComntDiv){	
	var url = "del-selfoldstatus-comnt.php?comntId="+comntid+"&fanId="+fanid+"&statusId="+statusid;
	http_check.open("GET", url, true);				
	http_check.onreadystatechange = function test(){					
		if(http_check.readyState == 4) {
			var response = http_check.responseText;
			//alert(response);//return false;
			if (response){
				document.getElementById(showComntDiv).innerHTML	= response;				
				
			}
		}
	}				
	http_check.send(null);	

}

function replyStatusComnt(comntText,fanid,showComntDiv,showComntErr,statusId){
	
	var fanid 		= document.getElementById(fanid).value;
	var statusid 	= document.getElementById(statusId).value;
	var comntTextVal 	= document.getElementById(comntText).value;
	comntTextVal				= rm_trim(comntTextVal);
	if(comntTextVal == '' || comntTextVal == 'Write a comment...'){
		var messg = "Write a comment...";
		document.getElementById(comntText).value = messg;
		return false;
	}else{
		document.getElementById(comntText).innerHTML = '';		
	}
	
	var url = "reply-status-comnt.php?mess="+comntTextVal+"&fanId="+fanid+"&statusId="+statusid;
	//alert(url);
	http_check.open("GET", url, true);				
	http_check.onreadystatechange = function test(){					
		if(http_check.readyState == 4) {
			var response = http_check.responseText;
			//alert(response);//return false;
			if (response){
				document.getElementById(showComntDiv).innerHTML	= response;
				document.getElementById(comntText).value 		= '';
				
				
			}
		}
	}				
	http_check.send(null);	


}


function delAllStatusComnt(comntid,fanid,showComntDiv){	
	var url = "del_all_status_comnt.php?comntId="+comntid+"&fanId="+fanid;
	http_check.open("GET", url, true);				
	http_check.onreadystatechange = function test(){					
		if(http_check.readyState == 4) {
			var response = http_check.responseText;
			//alert(response);//return false;
			if (response){
				document.getElementById(showComntDiv).innerHTML	= response;				
				
			}
		}
	}				
	http_check.send(null);	

}


/////////////functions for send status comments ends here//////////////////////////////
