function showUploadPictures(id){
		//alert(id);
		document.getElementById(id).style.display='block';
		var formId = id.substr(0,11);
		//var formNo = id.substr(11,15);
		//alert(formId);
		selectLoation();
	
		if(formId == 'changeTheme' || formId == 'deleteImage')
			tmpTop = tmpTop-150;
		if(formId == 'newEdu'){
			tmpTop = 0;
			tmpLeft = 250;
		}
		if(id == 'changePassword'){
			tmpTop = tmpTop+160+'px';
			tmpLeft = 250+'px';
		}
		
		if(id == 'changePass'){
			tmpTop = 160+'px';
			tmpLeft = 250+'px';
		}
		
		//document.getElementById(formNo).style.height='auto';
		document.getElementById(id).style.top=tmpTop;
		document.getElementById(id).style.left=tmpLeft;
	
		
		return true;
}

function closeUploadPictures(id){
		//alert(id);
		document.getElementById(id).style.display='none';
	
		return true;
}

function actionDelay(id){
	
		setTimeout(closeUploadPictures(id),10000);
	
}

function selectLoation(){

	tmpLeft = Math.max(document.body.scrollLeft,document.documentElement.scrollLeft)+300;
	tmpTop = Math.max(document.body.scrollTop,document.documentElement.scrollTop)+10;	
	
	
}

function checkBlankImg(){
		//alert("This");
	if(document.getElementById('uploadPic').value == ""){
		alert("Please browse the file !!!");
		document.getElementById('uploadPic').focus();
		return false;
	}
	return true;
}


function ShowHideStates(cnt){
		//alert(val);
		if(cnt == 'US')
			document.getElementById('statess').style.display = 'block';
		else
			document.getElementById('statess').style.display = 'none';
	}


function selectArray(id){
	alert(id.length);
}



function showFormLoad(name,id,albName){
		//alert(albName);
		document.getElementById(name).style.display='block';
		
		ajaxUpdater('loadForm','galleryPages/viewGallery/editForm.php?id='+id+'&albumName='+albName);
		
		selectLoation();
		//document.getElementById(formNo).style.height='auto';
		document.getElementById(name).style.top=tmpTop;
		document.getElementById(name).style.left=tmpLeft;
		
		return true;
}

function deleteArticleComment(id,url,saved){
		//alert(id);
		//alert(url);
		
		//document.getElementById(name).style.display='block';
		
			setid=new setId();
		    setid.id=id;
		
			
			 new Ajax.Updater(id,url,{asynchronous:true,
					onComplete:function(request){ 					
							// document.getElementById(saved).innerHTML="<img src='images/tick.jpg' alt='Loading' align='absmiddle'>";
							
					
							 document.getElementById(id).style.display='none';
							
					}
							  
							  });  
}

function coolComment(id,url,saved){
		//alert(albName);
		//document.getElementById(name).style.display='block';
		
			setid=new setId();
		    setid.id=id;
		
			
			 new Ajax.Updater(id,url,{asynchronous:true,
					onComplete:function(request){ 
					
							// document.getElementById(saved).innerHTML="<img src='images/tick.jpg' alt='Loading' align='absmiddle'>";
							
					
							document.getElementById(id).style.display='block';
							
					}
							  
							  });  
}
function uncoolComment(id,url,saved){
		//alert(albName);
		//document.getElementById(name).style.display='block';
		
			setid=new setId();
		    setid.id=id;
		
			
			 new Ajax.Updater(id,url,{asynchronous:true,
					onComplete:function(request){ 
					
							// document.getElementById(saved).innerHTML="<img src='images/tick.jpg' alt='Loading' align='absmiddle'>";
							
					
							 document.getElementById(id).style.display='block';
							
					}
							  
							  });  
}

function showPictureForm(name,id,albName,picPath){
		//alert(name+'  '+id+'  '+albName);
		document.getElementById(name).style.display='block';
		
		ajaxUpdater('loadForm','galleryPages/uploadPicturesForm.php?id='+id+'&albumName='+albName+'&picPath='+picPath);
		
		selectLoation();
		//document.getElementById(formNo).style.height='auto';
		document.getElementById(name).style.top=tmpTop;
		document.getElementById(name).style.left=tmpLeft;
		
		return true;
}

function showInvForm(name){
		//alert(name);
		document.getElementById(name).style.display='block';
		
		ajaxUpdater('multInvt','loggedCommonPages/multipleInviteForm.php');
		
		selectLoation();
		//document.getElementById(formNo).style.height='auto';
		document.getElementById(name).style.top=tmpTop+100+'px';
		document.getElementById(name).style.left=tmpLeft+20+'px';
		
		return true;
}

function showChangePass(name){
	 //alert(name);
		document.getElementById(name).style.display='block';
		
		ajaxUpdater('changePassLoad','common/changePassForm.php');
		
		selectLoation();
		//document.getElementById(formNo).style.height='auto';
		document.getElementById(name).style.top=tmpTop+150+'px';
		document.getElementById(name).style.left=tmpLeft-80+'px';
		
		return true;
}

function changeThemeForm(name,id,albName,picPath){
		//alert(name+'  '+id+'  '+albName);
		document.getElementById(name).style.display='block';
		
		ajaxUpdater('loadFormT','galleryPages/changeThemeForm.php?id='+id+'&albumName='+albName+'&picPath='+picPath);
		
		selectLoation();
		//document.getElementById(formNo).style.height='auto';
		document.getElementById(name).style.top=tmpTop-150;
		document.getElementById(name).style.left=tmpLeft;
		
		return true;
}

function viewMessage(name,id,from){
		//alert(name+'  '+id);
		document.getElementById(name).style.display='block';
		
		ajaxUpdater('viewMessage','myMessages/viewMessageForm.php?id='+id+'&from='+from);
		
		selectLoation();
		//document.getElementById(formNo).style.height='auto';
		document.getElementById(name).style.top=tmpTop;
		document.getElementById(name).style.left=tmpLeft;
		
		return true;
}

function logoutOnChange(){
	//alert("kill");
	window.location='lib/sesskill.php';	
}
function refreshIt(){
	//alert("refresh");
	closeUploadPictures('changePassword');
	window.location='home.php?p=7';
	
}
function refreshFormField(form){
	//alert("refresh");
	document.getElementById(form).nameInv.value="";
	document.getElementById(form).emailInv.value="";
}

function requestFriend(name,sid,rid){
		//alert(name+'  '+sid+'  '+rid);
		
		document.getElementById(name).style.display='block';
		//return;
		ajaxUpdater('friendsReqLoad','myProfile/requestconfirm.php?sid='+sid+'&rid='+rid);
		
		selectLoation();
		//document.getElementById(formNo).style.height='auto';
		document.getElementById(name).style.top=tmpTop;
		document.getElementById(name).style.left=tmpLeft;
		
		return true;
}

function delFriendConfirm(name,uid,key){
		//alert(name+'  '+uid);
		
		document.getElementById(name).style.display='block';
		//return;
		ajaxUpdater('friendsReqLoad1','myProfile/deletefrenconfirm.php?uid='+uid+'&key='+key);
		
		selectLoation();
		//document.getElementById(formNo).style.height='auto';
		document.getElementById(name).style.top=tmpTop;
		document.getElementById(name).style.left=tmpLeft;
		
		return true;
}

function replyscrap(name,uid,key,mykey){
		//alert(name+'  '+uid);
		
		document.getElementById(name).style.display='block';
		//return;
		ajaxUpdater('reply_a'+uid,'scrapBook/replyeditor.php?uid='+uid+'&key='+key+'&mykey='+mykey);
		
		//selectLoation();
		//document.getElementById(formNo).style.height='auto';
		//document.getElementById(name).style.top=tmpTop;
		//document.getElementById(name).style.left=tmpLeft;
		
		return true;
}


/* status sharing comment start*/
function hidesharingcomment(ID){
//alert(ID);
//alert(document.getElementById(ID));

document.getElementById('comment'+ID).style.display = (document.getElementById('comment'+ID).style.display)?'':'none';
document.getElementById('shrComment'+ID).focus();
return true;

}
function showcomment(ID){
//alert(ID);
//alert(document.getElementById(ID));
document.getElementById('hidden'+ID).style.display = 'block';
document.getElementById('hiddenclick'+ID).style.display = 'none';

}

function deletesharingcom(cid,href)
	{
		deleteArticleComment('cid'+cid,'href');
	}
/* end status sharing comment */


/*function replyscrapmsg(uid){
		//alert(name+'  '+uid);
		
		//document.getElementById('reply_a'+uid).style.display='block';
		//return;
		ajaxUpdater('reply_a'+uid,'msg.php');
		
		//selectLoation();
		//document.getElementById(formNo).style.height='auto';
		//document.getElementById(name).style.top=tmpTop;
		//document.getElementById(name).style.left=tmpLeft;
		
		return true;
}*/

/*article coment js */
function hidecomment(ID){
//alert(ID);
//alert(document.getElementById(ID));
document.getElementById('comment'+ID).style.display = (document.getElementById('comment'+ID).style.display)?'':'none';
document.getElementById('artComment'+ID).focus();
return true;
}
function showcomment(ID){
//alert(ID);
//alert(document.getElementById(ID));
document.getElementById('hidden'+ID).style.display = 'block';
document.getElementById('hiddenclick'+ID).style.display = 'none';

}
/*article coment js end */
/*** unicode****/
function hideunicodebox(ID){
//alert(ID);
//alert(document.getElementById(ID));
document.getElementById(ID).style.display = (document.getElementById(ID).style.display)?'':'none';
return true;
}
function showunicodebox(ID){
//alert(ID);
//alert(document.getElementById(ID));
document.getElementById('hidden'+ID).style.display = 'block';
document.getElementById('hiddenclick'+ID).style.display = 'none';

}
/** ***/
