<!--
// Written by Dexter Zafra at www.ex-designz.net
//Handle Check Username Availability Using Ajax

 var http = createRequestObject();

function fixicon (iconfixall1,iconfixall2,iconfixall3,iconfixall4,iconfixall5,iconfixall6,num,ShowShortList) {
	
					var theElemenet = document.getElementById("Allicon");					
					var content="";
					var icon="";
					if (num==1){
						for(var a=1;a<=iconfixall1;a++){						
							if (a<19){
								if (a<10){icon=icon+"<img src='/Themes/images/expression/"+num+"_0"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_0"+a+"]\");' />"}
								else{icon=icon+"<img src='/Themes/images/expression/"+num+"_"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_"+a+"]\");' />"}
							}
							if (a<10){content=content+"<img src='/Themes/images/expression/"+num+"_0"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_0"+a+"]\");' />"	}
								else{content=content+"<img src='/Themes/images/expression/"+num+"_"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_"+a+"]\");' />"	}
							
													
						}				
						content="<div class='cate_list'><div class='category_list'><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",6," + ShowShortList + ")' >Blacky</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",5," + ShowShortList + ")' >Super Smiley</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",1," + ShowShortList + ")' class='on orange'>Loco Mushroom</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",2," + ShowShortList + ")'>Freaky Panda</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",3," + ShowShortList + ")'>Wacky Monkey</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",4," + ShowShortList + ")'>Crazy Onion</a></div><div class='close'><a href='javascript:void(0)' class='lightgray' onClick='showiconnone()'>[x]</a></div></div><div class='gallary_box'>"+content;}
						
					if (num==2){
						for(var a=1;a<=iconfixall2;a++){						
							if (a<19){
								if (a<10){icon=icon+"<img src='/Themes/images/expression/"+num+"_0"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_0"+a+"]\");' />"}
								else{icon=icon+"<img src='/Themes/images/expression/"+num+"_"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_"+a+"]\");' />"}
							}
							if (a<10){content=content+"<img src='/Themes/images/expression/"+num+"_0"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_0"+a+"]\");' />"	}
								else{content=content+"<img src='/Themes/images/expression/"+num+"_"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_"+a+"]\");' />"	}
							
													
						}
						content="<div class='cate_list'><div class='category_list'><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",6," + ShowShortList + ")'>Blacky</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",5," + ShowShortList + ")' >Super Smiley</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",1," + ShowShortList + ")'>Loco Mushroom</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",2," + ShowShortList + ")' class='on orange'>Freaky Panda</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",3," + ShowShortList + ")'>Wacky Monkey</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",4," + ShowShortList + ")'>Crazy Onion</a></div><div class='close'><a href='javascript:void(0)' class='lightgray' onClick='showiconnone()'>[x]</a></div></div><div class='gallary_box'>"+content;}
					if (num==3){
						for(var a=1;a<=iconfixall3;a++){						
							if (a<19){
								if (a<10){icon=icon+"<img src='/Themes/images/expression/"+num+"_0"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_0"+a+"]\");' />"}
								else{icon=icon+"<img src='/Themes/images/expression/"+num+"_"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_"+a+"]\");' />"}
							}
							if (a<10){content=content+"<img src='/Themes/images/expression/"+num+"_0"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_0"+a+"]\");' />"	}
								else{content=content+"<img src='/Themes/images/expression/"+num+"_"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_"+a+"]\");' />"	}
							
													
						}
						content="<div class='cate_list'><div class='category_list'><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",6," + ShowShortList + ")'>Blacky</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",5," + ShowShortList + ")' >Super Smiley</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",1," + ShowShortList + ")' >Loco Mushroom</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",2," + ShowShortList + ")'>Freaky Panda</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",3," + ShowShortList + ")'  class='on orange'>Wacky Monkey</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",4," + ShowShortList + ")'>Crazy Onion</a></div><div class='close'><a href='javascript:void(0)' class='lightgray' onClick='showiconnone()'>[x]</a></div></div><div class='gallary_box'>"+content;}
					if (num==4){
						for(var a=1;a<=iconfixall4;a++){						
							if (a<19){
								if (a<10){icon=icon+"<img src='/Themes/images/expression/"+num+"_0"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_0"+a+"]\");' />"}
								else{icon=icon+"<img src='/Themes/images/expression/"+num+"_"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_"+a+"]\");' />"}
							}
							if (a<10){content=content+"<img src='/Themes/images/expression/"+num+"_0"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_0"+a+"]\");' />"	}
								else{content=content+"<img src='/Themes/images/expression/"+num+"_"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_"+a+"]\");' />"	}
							
													
						}
						content="<div class='cate_list'><div class='category_list'><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",6," + ShowShortList + ")'>Blacky</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",2," + ShowShortList + ")' >Super Smiley</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",1," + ShowShortList + ")'>Loco Mushroom</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",2," + ShowShortList + ")'>Freaky Panda</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",3," + ShowShortList + ")'>Wacky Monkey</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",4," + ShowShortList + ")' class='on orange'>Crazy Onion</a></div><div class='close'><a href='javascript:void(0)' class='lightgray' onClick='showiconnone()'>[x]</a></div></div><div class='gallary_box'>"+content;}
					if (num==5){
						for(var a=1;a<=iconfixall5;a++){						
							if (a<19){
								if (a<10){icon=icon+"<img src='/Themes/images/expression/"+num+"_0"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_0"+a+"]\");' />"}
								else{icon=icon+"<img src='/Themes/images/expression/"+num+"_"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_"+a+"]\");' />"}
							}
							if (a<10){content=content+"<img src='/Themes/images/expression/"+num+"_0"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_0"+a+"]\");' />"	}
								else{content=content+"<img src='/Themes/images/expression/"+num+"_"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_"+a+"]\");' />"	}
							
													
						}
						content="<div class='cate_list'><div class='category_list'><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",6," + ShowShortList + ")'>Blacky</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",5," + ShowShortList + ")' class='on orange' >Super Smiley</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",1," + ShowShortList + ")'>Loco Mushroom</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",2," + ShowShortList + ")'>Freaky Panda</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",3," + ShowShortList + ")' >Wacky Monkey</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",4," + ShowShortList + ")'>Crazy Onion</a></div><div class='close'><a href='javascript:void(0)' class='lightgray' onClick='showiconnone()'>[x]</a></div></div><div class='gallary_box'>"+content;}
					if (num==6){
						for(var a=1;a<=iconfixall6;a++){						
							if (a<19){
								if (a<10){icon=icon+"<img src='/Themes/images/expression/"+num+"_0"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_0"+a+"]\");' />"}
								else{icon=icon+"<img src='/Themes/images/expression/"+num+"_"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_"+a+"]\");' />"}
							}
							if (a<10){content=content+"<img src='/Themes/images/expression/"+num+"_0"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_0"+a+"]\");' />"	}
								else{content=content+"<img src='/Themes/images/expression/"+num+"_"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_"+a+"]\");' />"	}
							
													
						}						
						content="<div class='cate_list'><div class='category_list'><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",6," + ShowShortList + ")' class='on orange'>Blacky</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",5," + ShowShortList + ")' >Super Smiley</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",1," + ShowShortList + ")'>Loco Mushroom</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",2," + ShowShortList + ")'>Freaky Panda</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",3," + ShowShortList + ")'>Wacky Monkey</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",4," + ShowShortList + ")' >Crazy Onion</a></div><div class='close'><a href='javascript:void(0)' class='lightgray' onClick='showiconnone()'>[x]</a></div></div><div class='gallary_box'>"+content;}					
					
					
					//   add by bright special for comment with no icon list 20090409
					
	//				if (num==0){
//						var inum = 6;
//						for(var a=1;a<=iconfixall6;a++){						
//							if (a<19){
//								if (a<10){icon=icon+"<img src='/Themes/images/expression/"+inum+"_0"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+inum+"_0"+a+"]\");' />"}
//								else{icon=icon+"<img src='/Themes/images/expression/"+inum+"_"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+inum+"_"+a+"]\");' />"}
//							}
//							if (a<10){content=content+"<img src='/Themes/images/expression/"+inum+"_0"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+num+"_0"+a+"]\");' />"	}
//								else{content=content+"<img src='/Themes/images/expression/"+inum+"_"+a+".gif' style='cursor:pointer' onclick='insertAtCaret(document.getElementById(\"comment_content\"),\"[em"+inum+"_"+a+"]\");' />"	}
//							
//													
//						}						
//						content="<div class='cate_list'><div class='category_list'><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",0)' class='on orange'>Blacky</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",0)' >Super Smiley</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",0)'>Loco Mushroom</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",0)'>Freaky Panda</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",0)'>Wacky Monkey</a><a href='javascript:void(0)' onClick='fixicon("+iconfixall1+","+iconfixall2+","+iconfixall3+","+iconfixall4+","+iconfixall5+","+iconfixall6+",0)' >Crazy Onion</a></div><div class='close'><a href='javascript:void(0)' class='lightgray' onClick='showiconnone()'>[x]</a></div></div><div class='gallary_box'>"+content;}		
//						
					//=============================
					
					
					theElemenet.innerHTML =content+"</div>"
					
					if (ShowShortList!=0)
					{
						var theElemenetshort = document.getElementById("iconshortlist");
						theElemenetshort.innerHTML =icon
					}

				}
<!--
// Written by Dexter Zafra at www.ex-designz.net
//Handle Check Username Availability Using Ajax
 var http = createRequestObject();
 function createRequestObject() {
	var xmlhttp;
	try{
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
	}catch(e){
		try { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
		catch(f) { xmlhttp=null; }
	}
	if(!xmlhttp&&typeof XMLHttpRequest!="undefined"){
		xmlhttp=new XMLHttpRequest();
	}
	return xmlhttp;
 }

function createRequestObject() {
	var xmlhttp;
	try{
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
	}catch(e){
		try { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
		catch(f) { xmlhttp=null; }
	}
	if(!xmlhttp&&typeof XMLHttpRequest!="undefined"){
		xmlhttp=new XMLHttpRequest();
	}
	return xmlhttp;
 }
 
function sendcomment(){
	var msgerror=window.document.getElementById("msgerror");	
	var comment=window.document.getElementById("comment_content");	
	var boolValid = false;
	if(comment.value==""){msgerror.innerHTML = " &nbsp;Hey,where is your message?";}
    else{boolValid = true;}
	return boolValid;
 }

function handleResponseText(){
try{
	if((http.readyState == 4)&& (http.status == 200)){		//¿ªÊ¼´¦Àí
		var response = http.responseText;
		if(response == "OK"){
		}else{
		}
	}
}catch(e){alert("an error occured");
}finally{}
}

		function showicon () {
	
	var iconm=document.getElementById("iconmore")
	var theElemenet = document.getElementById("Allicon");
	if (theElemenet) {
		theElemenet.style.display = "block";
		iconm.innerHTML="<a href='javascript:void(0)'  onclick='showiconnone()' class='orange' >more...</a>"
					}
				}
					function showiconnone () {
	var iconm=document.getElementById("iconmore")
	var theElemenet = document.getElementById("Allicon");
	if (theElemenet) {
		theElemenet.style.display = "none";
		iconm.innerHTML="<a href='javascript:void(0)'  onclick='showicon()' class='orange' >more...</a>"
					}
				}
				function changeicon (cate) {
	var theElemenet = document.getElementById("Allicon");
	if (theElemenet) {
		theElemenet.style.display = "none";
					}
				}
				function setCaret(textObj){  
				  if(textObj.createTextRange){    
					textObj.caretPos=document.selection.createRange().duplicate();    
				  }  
				}
				function insertAtCaret(textObj,textFeildValue){  
				  if(document.all){    
					if(textObj.createTextRange&&textObj.caretPos){      
					  var caretPos=textObj.caretPos;
					  caretPos.text=caretPos.text.charAt(caretPos.text.length-1)==''?textFeildValue+'':textFeildValue;
					}else {      
					  textObj.value=textFeildValue;      
					}    
				  }else {    
					if(textObj.setSelectionRange){      
					  var rangeStart=textObj.selectionStart;      
					  var rangeEnd=textObj.selectionEnd;      
					  var tempStr1=textObj.value.substring(0,rangeStart);      
					  var tempStr2=textObj.value.substring(rangeEnd);      
					  textObj.value=tempStr1+textFeildValue+tempStr2;	     
					}else {      
					  alert("This version of Mozilla based browser does not support setSelectionRange");      
					}    
				  }  
				}
				function insertImgAtCaret(textObj,textFeildValue){  
				  if(document.all){    
					if(textObj.createTextRange&&textObj.caretPos){      
					  var caretPos=textObj.caretPos;
					  caretPos.text=caretPos.text.charAt(caretPos.text.length-1)==''?textFeildValue+'':textFeildValue;
					}else {      
					  textObj.value=textFeildValue;      
					}    
				  }else {    
					if(textObj.setSelectionRange){      
					  var rangeStart=textObj.selectionStart;      
					  var rangeEnd=textObj.selectionEnd;      
					  var tempStr1=textObj.value.substring(0,rangeStart);      
					  var tempStr2=textObj.value.substring(rangeEnd);      
					  textObj.value=tempStr1+textFeildValue+tempStr2;	     
					}else {      
					  alert("This version of Mozilla based browser does not support setSelectionRange");      
					}    
				  }  
				}
function fixcommentv(show,ID)
{
	if(ID)
	{
		var fans_videos_check = window.document.getElementById("videos_check_" + ID);
		var userfans_videos = window.document.getElementById("comment_video_" + ID);
		var commentv=window.document.getElementById("comment_v_" + ID);
	
	}
	else
	{
		var fans_videos_check = window.document.getElementById("videos_check");
		var userfans_videos = window.document.getElementById("comment_video");
		var commentv=window.document.getElementById("comment_v");
	}
	var reUrl1 = /(?:http|https|ftp):\/\/(?:\w+\.)\w+[\/=\?%\-&_~`@[\]\':+!]*[^<>\"\"]*/
	var reUrl2 = /[http|https|ftp]:\/\/\w+\.\w+[\/=\?%\-&_~`@[\]\':+!]*(?:[^<>\"\"])*/
	var r, re;
   	var s = userfans_videos.value;
	re = new RegExp("((?:http|https|ftp):\/\/(?:[a-zA-Z0-9_]+\.)[a-zA-Z0-9_]+[^\'\"]*)","i");
	r = s.match(re);

	 if (userfans_videos.value.length<1){fans_videos_check.innerHTML = "<span class='info right'></span>";return true;}
	 else if(userfans_videos.value.substring(0,7)=="http://" || userfans_videos.value.substring(0,7)=="HTTP://"){
		 	if(userfans_videos.value.indexOf("<object")!=-1 & userfans_videos.value.indexOf("<OBJECT")!=-1){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}else if (userfans_videos.value.indexOf("</object>")!=-1 & userfans_videos.value.indexOf("</OBJECT>")!=-1){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}else if ( userfans_videos.value.indexOf("</embed>")!=-1 & userfans_videos.value.indexOf("</EMBED>")!=-1 ){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}else if ( userfans_videos.value.indexOf("<embed")!=-1 & userfans_videos.value.indexOf("<EMBED")!=-1 ){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}else if ( userfans_videos.value.indexOf("<param")!=-1 & userfans_videos.value.indexOf("<PARAM")!=-1){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}else if ( userfans_videos.value.indexOf(".")==-1){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}else
			{
				document.getElementById("Vdo").value=document.getElementById("Vdo").value + "[flash=410,380]"+r[0]+"[/flash]";return true;
				//fans_videos_check.innerHTML = "<span class='info right'></span>";insertImgAtCaret(document.getElementById("comment_content"),'[flash=410,380]'+r[0]+'[/flash]');commentv.innerHTML="<input name='comment_video' id='comment_video' type='text' id='textfield' size='32' /> <input type='button' name='button2' id='button2' value='Embed' onClick='javascript:fixcommentvideo();'>";return true;
			}
		}
	 else if(userfans_videos.value.substring(0,7)=="<object" || userfans_videos.value.substring(0,7)=="<OBJECT"){
			if (userfans_videos.value.indexOf("</object>")==-1 & userfans_videos.value.indexOf("</OBJECT>")==-1){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}else if  (userfans_videos.value.indexOf("width")==-1 & userfans_videos.value.indexOf("WIDTH")==-1 ){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}else if (userfans_videos.value.indexOf("height")==-1 & userfans_videos.value.indexOf("HEIGHT")==-1 ){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}else if ( userfans_videos.value.indexOf("<embed")==-1 & userfans_videos.value.indexOf("<EMBED")==-1 ){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}else if ( userfans_videos.value.indexOf("<param")==-1 & userfans_videos.value.indexOf("<PARAM")==-1){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}
			else
			{
				document.getElementById("Vdo").value=document.getElementById("Vdo").value + "[flash=410,380]"+r[0]+"[/flash]";return true;
				//fans_videos_check.innerHTML = "<span class='info right'></span>";insertImgAtCaret(document.getElementById("comment_content"),'[flash=410,380]'+r[0]+'[/flash]');commentv.innerHTML="<input name='comment_video' id='comment_video' type='text' id='textfield' size='32' /> <input type='button' name='button2' id='button' value='Embed' onClick='javascript:fixcommentvideo();'>";return true;
			}
		 }
	 else if(userfans_videos.value.substring(0,6)=="<embed" || userfans_videos.value.substring(0,6)=="<EMBED"){
		 	if(userfans_videos.value.indexOf("<object")!=-1 & userfans_videos.value.indexOf("<OBJECT")!=-1){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}else if (userfans_videos.value.indexOf("</object>")!=-1 & userfans_videos.value.indexOf("</OBJECT>")!=-1){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}else if  (userfans_videos.value.indexOf("width")==-1 & userfans_videos.value.indexOf("WIDTH")==-1 ){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}else if (userfans_videos.value.indexOf("height")==-1 & userfans_videos.value.indexOf("HEIGHT")==-1 ){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}else if ( userfans_videos.value.indexOf("</embed>")==-1 & userfans_videos.value.indexOf("</EMBED>")==-1 ){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}else if ( userfans_videos.value.indexOf("<param")!=-1 & userfans_videos.value.indexOf("<PARAM")!=-1){fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
			}
			else
			{
				if(show && show!=1)
				{
				fans_videos_check.innerHTML = "<span class='info right'></span>";insertImgAtCaret(document.getElementById("comment_content"),'[flash=410,380]'+r[0]+'[/flash]');commentv.innerHTML="<input name='comment_video' id='comment_video' type='text' id='textfield' size='32' /> <input type='button' name='button2' id='button' value='Embed' onClick='javascript:fixcommentvideo();'>";return true;
				}
				else
				{
					document.getElementById("Vdo").value=document.getElementById("Vdo").value + "[flash=410,380]"+r[0]+"[/flash]";return true;
				}
			}
		 }
	 else {
		 fans_videos_check.innerHTML = "<span class='info wrong'>Please enter a valid video code in textarea </span>";return false;
		 }
	
	}

  function closehowtoembed(){
	var messageall=document.getElementById("howtoembed");
	messageall.innerHTML =""
 }
 function openhowtoembed(){
	var messageall=document.getElementById("howtoembed"); 
	var message = "<div class='float_div' style='position:absolute; top:-200px; left:100px; z-index:1000;'><div class='top'><img src='/Themes/images/blue_top_login.gif' /></div><div class='close'><a href='javascript:void(0)' onClick='javascript: closehowtoembed();' class='lightgray'>[x]</a></div><div class='title blue'>"
		message=message+"How to Embed a video..."
		message=message+"</div><div class='middle'><img src='/Themes/images/blue_middle_login.gif' /></div><div class='content' ><div class='share_info' >"
		
				message=message+"<ul>"
					message=message+"<li class='headline'><div class='icon'><img src='/Themes/images/tick.png' /></div>"
					message=message+"Share and promote videos you've seen on video sites...</li>"
					message=message+"<li class='info'>On AsianPopcorn you can embed videos from video websites like YouTube.com and MetaCafe.com</li>"
					message=message+"<li class='info'>In order to show videos on AsianPopcorn, all you have to do is go to a website like YouTube.com and browse to the page where the video you want to add is located.</li>"
					message=message+"<li class='info'>Now just copy the 'embed' code that most video sites offer, and paste it into the 'Embed Code' field on AsianPopcorn.</li>"
					message=message+"<li class='headline'><div class='icon'><img src='/Themes/images/tick.png' /></div>"
					message=message+"The videos you add to AsianPopcorn are only links to videos in YouTube and other similar video sites. Each video is played from YouTube through AsianPopcorn.</li>"
					
					message=message+"<li class='headline'><div class='button_right'  ><img src='/Themes/images_indexpage/button_right.gif' width='10' height='25' /></div><div class='button_bg' style='color:#FFFFFF;padding-top:5px;'><a href='#vid' onClick='javascript: closehowtoembed();' style='color:#FFFFFF;padding-top:5px;'>Close</a><div><br style='clear:both' /></li>"
			  message=message+"</ul>"
	message=message+"</div></div></div>"

	messageall.innerHTML = message
	}
function ToggleCanvasDiv(action,div) {
	var objCanvas = document.getElementById("Canvas");
	var objDiv = document.getElementById(div);
		switch (action) {
		case "open" :
			objCanvas.style.height = document.body.scrollHeight;
			objCanvas.style.display = "block";
			objDiv.style.display = "block";
			break;
		case "close" :
			objCanvas.style.display = "none";
			objDiv.style.display = "none";
			break;
		default :
		case "auto" :
			objCanvas.style.display = (objCanvas.style.display == "none") ? "block" : "none";
			objDiv.style.display = objCanvas.style.display;
			break;
	}
}
function ToggleCanvasDiv_report(action,div,id,num,type) {
	var objCanvas = document.getElementById("Canvas");
	var objDiv = document.getElementById(div);
		switch (action) {
		case "open" :
			objCanvas.style.height = document.body.scrollHeight;
			objCanvas.style.display = "block";
			objDiv.style.display = "block";
			break;
		case "close" :
			objCanvas.style.display = "none";
			objDiv.style.display = "none";
			break;
		default :
		case "auto" :
			objCanvas.style.display = (objCanvas.style.display == "none") ? "block" : "none";
			objDiv.style.display = objCanvas.style.display;
			break;
	}
	var messageall=document.getElementById(div);
	messageall.innerHTML ="<div class=\"float_login_close\"><a href=\"javascript:void(0)\" onclick=\"javascript:ToggleCanvasDiv('close','float_report')\">[x]</a></div><div class=\"register_box\"><div  class=\"navi_message\" >Nature of Abuse:</div><div style=\"float:left; width:20px;\"><input name=\"reporttype\"  id=\"reporttype\"  type=\"radio\" value=\"1\" checked=\"checked\"></div><div style=\"float:left; width:170px;padding-bottom:5px;\">Nudity / Pornographic content</div><div style=\"float:left; width:20px;\"><input name=\"reporttype\"  id=\"reporttype\" type=\"radio\" value=\"2\"></div><div style=\"float:left; width:170px;padding-bottom:5px;\">Use of copyrighted material</div><br style=\"clear:both\"><div style=\"float:left; width:20px;\"><input name=\"reporttype\"  id=\"reporttype\" type=\"radio\" value=\"3\"></div><div style=\"float:left; width:170px;padding-bottom:5px;\">Hate speech or violent content</div><div style=\"float:left; width:20px;\"><input name=\"reporttype\"  id=\"reporttype\" type=\"radio\" value=\"4\"></div><div style=\"float:left; width:170px;padding-bottom:5px;\">SPAM - this person sends out links to commercial sites</div><br style=\"clear:both\"><div style=\"float:left; width:20px;\"><input name=\"reporttype\"  id=\"reporttype\" type=\"radio\" value=\"5\"></div><div style=\"float:left; width:170px;padding-bottom:5px;\">Illegal content</div><div style=\"float:left; width:20px;\"><input name=\"reporttype\"  id=\"reporttype\" type=\"radio\" value=\"6\"></div><div style=\"float:left; width:170px;padding-bottom:5px;\">Harassment</div><br style=\"clear:both\"><div style=\"padding-top:10px;\"><div>Please try to describe the instance of abuse in as much detail as possible. The information you provide will assist us in investigating this offense.</div><div id=\"erroruserregister\" class=\"navi_message\">Details:</div><!--<div class=\"navi_message_step\">Choose your UN & PW > Enter your email > Write Comment</div>--></div><div class=\"float_content_box\" style=\"padding-left:15px;padding-top:10px;\"><ul><li style=\"height:150px;\"><textarea name='textareamessage' id='textareamessage' cols='40' rows='7' ></textarea><div id=\"error_report\"></div></li><li><div class=\"button_right\"><img src=\"/Themes/images_indexpage/button_right.gif\" width=\"10\" height=\"25\" /></div><input id=\"submit\" name=\"submit\" type=\"submit\" tabindex=\"11\" value=\"Send Message\" style=\"cursor:Pointer\" class=\"button_bg\" onClick='javascript: sendmessagere("+num+","+id+");' /><br style=\"clear:both\" /></li></ul></div></div><br style=\"clear:both\" />"
}
function sendmessagere(action,id){
	
	var error = window.document.getElementById("error_report");	
	var textareamessage = window.document.getElementById("textareamessage");
	var report = window.document.getElementsByName("reporttype");
	var messagebox = window.document.getElementById("float_report")
for(var i=0;i<report.length;i++)
{
if (report[i].checked==true)
{
var rep=i+1;
break;
}
} 
	error.innerHTML = "";
	if(textareamessage.value.length<1){error.innerHTML = "&nbsp;Hey! Where is your message?"; }
	else if(textareamessage.value.length>5000){error.innerHTML = "&nbsp;Message must less than 5000 characters";}
	else{
		var postdata;
		var PostData;
		PostData = "action=" + action + "&textareamessage=" +  encodeURIComponent(textareamessage.value) + "&userID=" + id+ "&type=" + rep;
		http.open('POST', "/community/profile_edit/Add_report_submit.asp", true);
		http.onreadystatechange = handleResponseText;
		http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		http.send(PostData);
		
		//var messagebox = window.document.getElementById("messagebox");	
		//messagebox.innerHTML = "#####";
		//var sendmessagebox = window.document.getElementById("sendmessagebox");	
		//sendmessagebox.innerHTML = "";
	messagebox.innerHTML = "Your message has been sent."
	window.setTimeout("ToggleCanvasDivHide('float_report');", 1000);
	}
		
 }
function ToggleCanvasDivHide(div) {
	var objCanvas = document.getElementById("Canvas");
	var objDiv = document.getElementById(div);
			objCanvas.style.display = "none";
			objDiv.style.display = "none";
}
function ToggleCanvasDiv_message(action,div,id,name,num) {
	var objCanvas = document.getElementById("Canvas");
	var objDiv = document.getElementById(div);
		switch (action) {
		case "open" :
			objCanvas.style.height = document.body.scrollHeight;
			objCanvas.style.display = "block";
			objDiv.style.display = "block";
			break;
		case "close" :
			objCanvas.style.display = "none";
			objDiv.style.display = "none";
			break;
		default :
		case "auto" :
			objCanvas.style.display = (objCanvas.style.display == "none") ? "block" : "none";
			objDiv.style.display = objCanvas.style.display;
			break;
	}
	var messageall=document.getElementById(div);
	if (num=='0'){		
		messageall.innerHTML ="<div class=\"float_login_close\"><a href=\"javascript:void(0)\" onclick=\"javascript:ToggleCanvasDiv('close','float_message')\">[x]</a></div><div class=\"register_box\"><div id=\"erroruserregister\" class=\"navi_message\">Send am errpr report to admin:</div><div class=\"float_content_box\" style=\"padding-left:15px;padding-top:10px;\"><ul><li style=\"height:150px;\"><textarea name='textareamessage' id='textareamessage' cols='40' rows='7' ></textarea><div id=\"messageerror\"></div></li><li><div class=\"button_right\"><img src=\"/Themes/images_indexpage/button_right.gif\" width=\"10\" height=\"25\" /></div><input id=\"submit\" name=\"submit\" type=\"submit\" tabindex=\"11\" value=\"Send Message\" style=\"cursor:Pointer\" class=\"button_bg\" onClick='javascript: sendmessage("+num+","+id+");' /><br style=\"clear:both\" /></li></ul></div></div></div><br style=\"clear:both\" />"
		}
	if (num=='1'){
		messageall.innerHTML ="<div class=\"float_login_close\"><a href=\"javascript:void(0)\" onclick=\"javascript:ToggleCanvasDiv('close','float_message')\">[x]</a></div><div class=\"register_box\"><div id=\"erroruserregister\" class=\"navi_message\">Send Messages to "+name+":</div><div class=\"float_content_box\" style=\"padding-left:15px;padding-top:10px;\"><ul><li style=\"height:150px;\"><textarea name='textareamessage' id='textareamessage' cols='40' rows='7' >Hi! Let's be friend.</textarea><div id=\"messageerror\"></div></li><li><div class=\"button_right\"><img src=\"/Themes/images_indexpage/button_right.gif\" width=\"10\" height=\"25\" /></div><input id=\"submit\" name=\"submit\" type=\"submit\" tabindex=\"11\" value=\"Send Message\" style=\"cursor:Pointer\" class=\"button_bg\" onClick='javascript: sendmessage("+num+","+id+");' /><br style=\"clear:both\" /></li></ul></div></div></div><br style=\"clear:both\" />"
		}
	if (num=='2'){
	messageall.innerHTML ="<div class=\"float_login_close\"><a href=\"javascript:void(0)\" onclick=\"javascript:ToggleCanvasDiv('close','float_message')\">[x]</a></div><div class=\"register_box\"><div id=\"erroruserregister\" class=\"navi_message\">Send a message to "+name+":</div><div class=\"float_content_box\" style=\"padding-left:15px;padding-top:10px;\"><ul><li style=\"height:150px;\"><textarea name='textareamessage' id='textareamessage' cols='40' rows='7' ></textarea><div id=\"messageerror\"></div></li><li><div class=\"button_right\"><img src=\"/Themes/images_indexpage/button_right.gif\" width=\"10\" height=\"25\" /></div><input id=\"submit\" name=\"submit\" type=\"submit\" tabindex=\"11\" value=\"Send Message\" style=\"cursor:Pointer\" class=\"button_bg\" onClick='javascript: sendmessage("+num+","+id+");' /><br style=\"clear:both\" /></li></ul></div></div></div><br style=\"clear:both\" />"
	}
	
}
function sendmessage(action,id){
	var error = window.document.getElementById("messageerror");	
	var textareamessage = window.document.getElementById("textareamessage");
	
	error.innerHTML = "";
	if(textareamessage.value.length<1){error.innerHTML = "&nbsp;Hey! Where is your message?"; }
	else if(textareamessage.value.length>10000){error.innerHTML = "&nbsp;Message must less than 10000 characters";}
	else{
		var postdata;
		var PostData;
		PostData = "action=" + action + "&textareamessage=" +  encodeURIComponent(textareamessage.value) + "&userID=" + id;
		http.open('POST', "/community/profile_edit/Add_Message_submit.asp", true);
		http.onreadystatechange = handleResponseText;
		http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		http.send(PostData);
		
		var messagebox = window.document.getElementById("float_message");	
		messagebox.innerHTML = "#####";
		//var sendmessagebox = window.document.getElementById("sendmessagebox");	
		//sendmessagebox.innerHTML = "";
		var box = window.document.getElementById("box");
	if (action==1) {
		messagebox.innerHTML = "Your friend request has been sent successfully. "
		window.setTimeout("ToggleCanvasDivHide('float_message');", 1000);
	}else{
		messagebox.innerHTML = "Your message has been sent."
		window.setTimeout("ToggleCanvasDivHide('float_message');", 1000);
	}
		
//oform.action="/community/profile_edit/Add_Message_submit.asp"; 
//return true;
	}
 }
 
	
	

