function viewprofile(frm)
{
	frm.submit();
	return true;
}
  
  
// This function is used to get the reply box to add the comment reply
function getReplyBox(iCommentId){
	//alert('hi');
	var objReplyBox = eval("document.getElementById('replyBox"+iCommentId+"')");
	//alert(objReplyBox.id);
	objReplyBox.style.display="inline";
}

// This function to discart the reply commnet box

function discartComment(iCommentId){
	var objReplyBox = eval("document.getElementById('replyBox"+iCommentId+"')");
	objReplyBox.style.display="none";
}

// This function is used to save the comment
function saveComment(iVideoId,iCommentId)
{
	
	var commentMsgObj = document.getElementById('commentMsg');
	var commentObj = eval("document.getElementById('txtComment"+iCommentId+"')");
	var commentByObj= eval("document.getElementById('txtCommentBy"+iCommentId+"')");

	if(commentByObj.value=="" || commentByObj.value.length==0){
		alert(profile_video_comment_name_alert);
		commentByObj.focus();
		return false;
		}
	if(commentObj.value=="" || commentObj.value.length==0){
		alert(profile_video_comment_alert);
		commentObj.focus();
		return false;
		}
	
	var doc = null; 
	if (typeof window.ActiveXObject != 'undefined' ) 
	{ 
		doc = new ActiveXObject("Microsoft.XMLHTTP"); 
	} 
	else 
	{ 
		doc = new XMLHttpRequest(); 
	}			
	
	
	doc.open("GET", "addprofilecomment_ajx.php?iVideoId=" + iVideoId + "&iCommentId=" + iCommentId + "&comment=" + commentObj.value + "&commentBy=" + commentByObj.value,false);
	
	doc.send(null);	
	
	if(doc.responseText)
			commentMsgObj.innerHTML = profile_video_comment_add_confirm;
			
				
	commentObj.value="";
	commentByObj.value="";
	if(iCommentId!=0){
		var objReplyBox = eval("document.getElementById('replyBox"+iCommentId+"')");
		objReplyBox.style.display="none";
	}
	window.location.reload();
	//alert(doc.responseText);
//	var Res = doc.responseText;
}

// This function is used to save the comment
function setIcon(iVideoId){
	var doc = null; 
	if (typeof window.ActiveXObject != 'undefined' ) 
	{ 
		doc = new ActiveXObject("Microsoft.XMLHTTP"); 
	} 
	else 
	{ 
		doc = new XMLHttpRequest(); 
	}			
	
	
	doc.open("GET", "set_icon_a.php?iVideoId=" + iVideoId,false);
	doc.send(null);
	
	if(doc.responseText)
	alert(video_set_for_profileicon);

}

function change_div(flag)
{

//alert(flag);
var Objdiv_R=document.getElementById("scroll3");
var Objdiv_G=document.getElementById("scrollG");
var Objdiv_P=document.getElementById("scrollP");
if(flag=='R')
{
Objdiv_R.style.display='block';
Objdiv_G.style.display='none';
Objdiv_P.style.display='none';
}

if(flag=='G')
{
Objdiv_G.style.display='block';
Objdiv_R.style.display='none';
Objdiv_P.style.display='none';
}

if(flag=='P')
{

Objdiv_P.style.display='block';
Objdiv_G.style.display='none';
Objdiv_R.style.display='none';
}

	
}

function display_flag()
{
var Objdiv_flag=document.getElementById("div_flag");
alert(Objdiv_flag);
Objdiv_flag.style.display='block';
}