// JavaScript Document
/*function checkPicasa(host)
{
	alert("yes");	
	var picasaUrl = "picasa://importbutton/?url="+host+"/picasa/pbz/local.pbz";
	window.open(picasaUrl);
}*/
//Chk is picasa installed
function installPicasa()
{
	//alert("pbzloc= "+pbzloc);
	if (_picasaInstalled) 
	 {
	   window.location.href = "picasa://importbutton/?url=" + pbzloc + "";
	 }
	 else
	  	window.location.href = "http://picasa.google.com/";
}
//Chk is picasa installed Over

function albumWin(albumId,pageId,Albumstatus,profileId)
{
	var left_popup = (screen.width - 600)/2;
	var top_popup = (screen.height - 450)/2;
	//alert(top_popup+left_popup);
	var url = "customizeAlbum.php?albumId="+albumId+"&status="+Albumstatus+"&pageId="+pageId+"&"+profileId;
	/*window.open(url,"customizeAlbum", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, height=450, width=600, left="+left_popup+", top="+top_popup);*/
	window.open(url ,'customizeAlbum', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, height=450, width=600, left='+left_popup+', top='+top_popup);
}

//Show Hide Layers
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); 
  //alert("x=  "+x);
 // x= "layer1";
  return x;
}

function MM_showHideLayers() { //v6.0
	var i,p,v,obj,args=MM_showHideLayers.arguments;
    for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//To Hide all layers

function MM_showHideLayers1(layer11,act11) { 
	//var tot = document.getElementById('totalRec').value;	
		var tot = document.getElementsByName('totalRec')[0].value;
	for(i=1;i<tot;i++)
	{
		var	id = 'layer'+i;
		MM_showHideLayers(id,'','hide');
	}
	MM_showHideLayers(layer11,'',act11);
}

function hideAll() { 
	var divs = document.getElementsByTagName('div'); 
	for(i=1;i<=divs.length;i++)
	{ 
		var pass = "layer2"+i;
		if(divs[i].id.match(pass)){
			//alert("pass= "+pass);
			divs[i].style.visibility="hidden";
		}
	}
}

//Show Hide Layers Over

// PlayVideo file
function playVideo(winFile,title)
{
	url = "playVideo.php?winFile="+winFile;
	newwindow4=window.open(url,"playVideo","height=263,width=300,align=center"); 
	//alert(winFile);
}

//Play MP3 File
function playMp3(mp3File,title)
{
	var xmlhttp=false; //Clear our fetching variable
	try {
			xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object�
	} catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
        var file = 'mp3_player.php?mp3File='+mp3File+'&title='+title; //This is the path to the file we just finished making *
      xmlhttp.open('GET', file, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4) { //Check if it is ready to recieve data
        
                var content3 = xmlhttp.responseText; 
                if( content3 ){ 
					document.getElementById('mp3Content').innerHTML = content3; 
                }
        }
        }
        xmlhttp.send(null) //Nullify the XMLHttpRequest
	return;	
}

//Large Photo
function largeEntity(pageId,id,userId,entId,tabId,albumEntityTypeId,albumId)
{
	/*alert("entId"+entId);
	alert("pageId"+pageId);
	alert("tabId"+tabId);
	alert("userId"+userId);
	alert("entTypeId"+albumEntityTypeId);
	alert("albumId "+albumId);*/
	if(tabId == "photo") 
	{
		var urlFile = "largePhoto.php?pageId="+pageId+"&largePhotoId="+id+"&userId="+userId+"&entId="+entId+"&albumEntityTypeId="+albumEntityTypeId+"&albumId="+albumId+"&tabId="+tabId;
	//window.open(urlFile);
	}
	else if(tabId == "video")
	{
		//var urlFile = "playVideo.php?pageId="+pageId+"&largeVideoId="+id+"&userId="+userId+"&entId="+entId+"&entTypeId="+albumEntityTypeId+"&albumId="+albumId;
		//myRef = window.open(urlFile,"mywin","left=10,top=10,width=300,height=263,toolbar=1,resizable=0,right=10");
		var urlFile = "largeVideo.php?pageId="+pageId+"&largePhotoId="+id+"&userId="+userId+"&entId="+entId+"&albumEntityTypeId="+albumEntityTypeId+"&albumId="+albumId+"&tabId="+tabId;
	}
	window.open(urlFile);
}
/*function largeVideo(pageId,id,userId,entId,videoFile)
{
	/*alert(entId);
	alert(pageId);
	alert(id);
	alert(userId);
	var urlFile = "largeVideo.php?pageId="+pageId+"&largeVideoId="+id+"&userId="+userId+"&entId="+entId+"&winFile="+videoFile;
	window.open(urlFile,"largeVideo");
}*/
	
//Large Photoshow
function largeShow(showId,pageId)
{
	//alert(showId);
	//alert(pageId);
	url = "showDisplay.php?showId="+showId+"&pageId="+pageId;
	newwindow4=window.open(url,"Photoshow","height=500,width=500,align=center");
}

//Download File
function downloadFile(file)
{
	//alert(file);
	window.open("downloadFile.php?file="+file);
	//window.open(file);
}
function makeMainImage(userId,photoId,tabId,pageId,albumEntityTypeId,entId)
{
	/*alert("userId= "+userId); 
	alert("photoId= "+photoId);
	alert("tabId= "+tabId);
	alert("pageId= "+pageId);
	alert("albumEntityTypeId= "+albumEntityTypeId);*/
	
	
	//alert("albumName= "+albumName); 
	answer = confirm("Yes, make this my profile image!");
	if(answer == true)
	{
		var xmlhttp=false; 
		try {
				xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
		} 
		catch (e)
		{
			try {
					xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
			} catch (E) {
				xmlhttp = false;
						}
		}
		if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
						xmlhttp = new XMLHttpRequest(); 
		 }
		var file = "makeMainImage.php?pageId="+pageId+"&photoId="+photoId+"&userId="+userId+"&albumEntityTypeId="+albumEntityTypeId+"&entId="+entId;  
		//window.open(file);
		xmlhttp.open('GET', file, true); 
		xmlhttp.onreadystatechange=function() {
		   if (xmlhttp.readyState==4) 
		   { 
			 var content3 = xmlhttp.responseText; 
			 if( content3 ){ 
			//alert(content3);
				parent.document.getElementById('profileImage1').innerHTML = content3; 
			  }    	
			 /* linkUrl = "widget.php?userId="+userId+"&link=seemore&tabId=photo&pageId="+pageId;
			  window.location.href = linkUrl; */
		   } //Over If
		  } //Over Function
			xmlhttp.send(null); //Nullify the XMLHttpRequest
			return; 
	} //If ans true
}
//edit title in MC page2 start
function editTitle(userId,curId,tabId,pageId,albumEntityTypeId)
{
	var newTitle = prompt ("Enter New Title","");
	if(newTitle == "" )
	{ 	}
	else if(newTitle != null)	
	{
		var xmlhttp=false; 
		try {
				xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
		} 
		catch (e)
		{
			try {
					xmlhttp = new
					ActiveXObject('Microsoft.XMLHTTP');
			} catch (E) {
				xmlhttp = false;
						}
		}
		if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
						xmlhttp = new XMLHttpRequest(); 
		 }
		var file = "editTitle.php?curId="+curId+"&newTitle="+newTitle+"&tabId="+tabId+"&pageId="+pageId+"&albumEntityTypeId="+albumEntityTypeId; 
		//window.open(file);
		xmlhttp.open('GET', file, true); 
		xmlhttp.onreadystatechange=function() {
		   if (xmlhttp.readyState==4) { 
				var content3 = xmlhttp.responseText; 
				 if( content3 ){ 
				 var id = "title"+curId;
					document.getElementById(id).innerHTML = content3; 
				  }    	
			   }
		   }
			xmlhttp.send(null); //Nullify the XMLHttpRequest
			return;	
	} //Else Over
}
//edit title in MC page2 end
//When Record is Deleted in Media Center Page2 start
function delRecord(userId,curId,tabId,pageId,albumEntityTypeId)
{
 	answer = confirm("Are You Sure to delete Record ?");
	if(answer == true)
	{
		var xmlhttp=false; 
		try {
				xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
		} 
		catch (e)
		{
			try {
					xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
			} catch (E) {
				xmlhttp = false;
						}
		}
		if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
						xmlhttp = new XMLHttpRequest(); 
		 }
		var file = "deleteRecord.php?curId="+curId+"&tabId="+tabId+"&pageId="+pageId+"&albumEntityTypeId="+albumEntityTypeId;
		//alert(file);
		//window.open(file);
		xmlhttp.open('GET', file, true); 
		if(pageId == "user")
		var linkUrl= "widget.php?userId="+userId+"&link=seemore&tabId="+tabId+"&pageId="+pageId+"deleteRec=yes";	
		else if(pageId == "community")
			var linkUrl= "widget.php?commId="+curId+"&link=seemore&tabId="+tabId+"&pageId="+pageId;	
		else if(pageId == "storefront")
			var linkUrl= "widget.php?sfId="+entId+"&link=seemore&tabId="+tabId+"&pageId="+pageId;	
		else if(pageId == "neighbor")
			var linkUrl= "widget.php?nhId="+curId+"&link=seemore&tabId="+tabId+"&pageId="+pageId;	
		else if(pageId == "album")
			var linkUrl= "widget.php?nhId="+curId+"&link=seemore&tabId="+tabId+"&pageId="+pageId;		
		//else if(pageId == "page_admin")
		//var linkUrl= "widget.php?pId="+curId+"&link=seemore&tabId="+tabId+"&pageId="+pageId+"&pageName="+pageName;	

	   xmlhttp.onreadystatechange=function() {
       if (xmlhttp.readyState==4) { 
			 window.location.href=linkUrl;
		   }
	   }
			xmlhttp.send(null); //Nullify the XMLHttpRequest
			return;	
	}
}
//When Record is Deleted in Media Center Page2 Over
//When Tag is Edited in Media Center Page2 start
function editTag(userId,curId,tabId,pageId,albumEntityTypeId)
{
	
	var newTag = prompt ("Enter Tag","");
	if(newTag == "" )
	{ 	}
	else if(newTag != null)	
	{
	
	var xmlhttp=false; 
	try {
			xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
	} 
	catch (e)
	{
		try {
				xmlhttp = new
				ActiveXObject('Microsoft.XMLHTTP');
		} catch (E) {
			xmlhttp = false;
					}
	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
					xmlhttp = new XMLHttpRequest(); 
	 }
	var file = "addtagMC.php?curId="+curId+"&newTag="+newTag+"&tabId="+tabId+"&pageId="+pageId+"&albumEntityTypeId="+albumEntityTypeId; 
	//alert(file);
   // window.open(file);
	xmlhttp.open('GET', file, true); 
   
  /* if(pageId == "user")
		var linkUrl= "widget.php?userId="+userId+"&link=seemore&tabId="+tabId+"&pageId="+pageId;	
	else if(pageId == "community")
		var linkUrl= "widget.php?commId="+tabId+"&link=seemore&tabId="+tabId+"&pageId="+pageId;	
	else if(pageId == "storefront")
		var linkUrl= "widget.php?sfId="+entId+"&link=seemore&tabId="+tabId+"&pageId="+pageId;	
	else if(pageId == "neighbor")
		var linkUrl= "widget.php?nhId="+tabId+"&link=seemore&tabId="+tabId+"&pageId="+pageId;	*/

	   xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4) { 
	        var content3 = xmlhttp.responseText; 
			 if( content3 ){ 
			 var tagId = "tag"+curId;
			 	document.getElementById(tagId).innerHTML = content3; 
			  }    	
		   }
	   }
	    xmlhttp.send(null); //Nullify the XMLHttpRequest
	    return;	
	} //Else Over
}
//When Tag is Edited in Media Center Page2 Over
function popupWin(left,top)
{
	//alert(top);
	//alert(left);
	//if ( !newwindow || newwindow.closed ) {
		//newWin = window.open('','test','height=70,width=70,top='+top+',left='+left); <!--'','htmlname','width=' + pwidth +',height=' +pheight + ',resizable=1,top=50,left=10'-->
		var xmlhttp=false; 
	try {
			xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
	} 
	catch (e)
	{
		try {
				xmlhttp = new
				ActiveXObject('Microsoft.XMLHTTP');
		} catch (E) {
			xmlhttp = false;
					}
	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
					xmlhttp = new XMLHttpRequest(); 
	 }
	var file = "test.php?curId="+curId+"&newTag="+newTag+"&tabId="+tabId+"&pageId="+pageId; 
	//alert(file);
    //window.open(file);
	xmlhttp.open('GET', file, true); 
 	   xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4) { 
	        var content3 = xmlhttp.responseText; 
			 if( content3 ){ 
			// var tagId = "tag"+curId;
			 	//document.getElementById(tagId).innerHTML = content3; 
				//alert(content3);
				newWin.document.writeln(content3);
			  }    	
		   }
	   }
	    xmlhttp.send(null); //Nullify the XMLHttpRequest
	    return;	
	//}
}
function upload(userId,pageId,tabId,entId)
{
	/*alert("user= "+userId);
	alert(pageId);
	alert(entId);
	alert(tabId);*/
	if(pageId == "user")
	{
		if(tabId == "photo")
		{
			url = "uploadPhoto.php?userId="+entId;
			window.open(url,"uploadPhoto","height=550,width=620");
		}
		else if(tabId == "video")
		{
			url = "uploadVideo.php?userId="+entId;
			window.open(url,"uploadVideo","height=350,width=550");
		}
		else if(tabId == "show")
		{
			url = "uploadShow.php?userId="+entId;
			window.open(url,"uploadShow","height=475,width=550");
		}
		else if(tabId == "file")
		{
			url = "uploadFile.php?userId="+entId;
			window.open(url,"uploadFile","height=350,width=550");
		}
		else if(tabId == "mp3")
		{
			url = "uploadMp3.php?entId="+entId+"&pageID="+pageId;
			window.open(url,"uploadMp3","height=375,width=550");
		}
	}
	else if(pageId == "community")
	{
		if(tabId == "photo")
		{
			url = "commUploadPhoto.php?commId="+entId+"&userId="+userId;
			window.open(url,"uploadPhoto","height=550,width=620");
		}
		else if(tabId == "video")
		{
			url = "commUploadVideo.php?commId="+entId+"&userId="+userId;
			window.open(url,"uploadVideo","height=350,width=550");
		}
		else if(tabId == "show")
		{
			url = "commUploadShow.php?commId="+entId+"&userId="+userId;
			window.open(url,"uploadShow","height=475,width=550");
		}
		else if(tabId == "file")
		{
			url = "commUploadFile.php?commId="+entId+"&userId="+userId;
			window.open(url,"uploadFile","height=350,width=550");
		}
		else if(tabId == "mp3")
		{
			url = "uploadMp3.php?entId="+entId+"&pageID="+pageId+"&userId="+userId;
			window.open(url,"uploadMp3","height=375,width=550");
		}
	}
	else if(pageId == "neighbor")
	{
		if(tabId == "photo")
		{
			url = "nhUploadPhoto.php?nhId="+entId+"&userId="+userId;
			window.open(url,"uploadPhoto","height=550,width=620");
		}
		else if(tabId == "video")
		{
			url = "nhUploadVideo.php?nhId="+entId+"&userId="+userId;
			window.open(url,"uploadVideo","height=350,width=550");
		}
		else if(tabId == "show")
		{
			url = "nhUploadShow.php?nhId="+entId+"&userId="+userId;
			window.open(url,"uploadShow","height=475,width=550");
		}
		else if(tabId == "file")
		{
			url = "nhUploadFile.php?nhId="+entId+"&userId="+userId;
			window.open(url,"uploadFile","height=350,width=550");
		}
		else if(tabId == "mp3")
		{
			url = "uploadMp3.php?entId="+entId+"&pageID="+pageId+"&userId="+userId;
			window.open(url,"uploadMp3","height=375,width=550");
		}
	}
	/*else if(pageId == "album")
	{
		url = "album_uploadPhoto.php?userId="+userId+"&albumId="+entId;
			window.open(url,"uploadPhoto","height=550,width=620");
	}*/
} 
function uploadAlbum(pageId,tabId,albumEntityTypeId,entId,albumId,userId)
{
	/*alert("pageId "+pageId);
	alert("tabId "+tabId);
	alert("albumEntityTypeId "+albumEntityTypeId);
	alert("entId "+entId);
	alert("albumId "+albumId);*/
	
		
	if(pageId == "album")
	{
		if(tabId == "photo")
		{	
			url2 = "album_uploadPhoto.php?userId="+userId+"&albumId="+albumId+"&albumEntityTypeId="+albumEntityTypeId+"&entId="+entId;
			window.open(url2,"uploadPhoto","height=550,width=620");
		}
	}
	
}
function rating(rate,id,tabId,pageId,entId,userId)
{
	/*alert("rate"+rate);
	alert("id"+id);
	alert("tabId"+tabId);
	alert("pageId"+pageId);
	alert("entId"+entId);
	alert("userId"+userId);*/
	
	
var xmlhttp=false; 
	try {
			xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
	} 
	catch (e)
	{
		try {
				xmlhttp = new
				ActiveXObject('Microsoft.XMLHTTP');
		} catch (E) {
			xmlhttp = false;
					}
	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
					xmlhttp = new XMLHttpRequest(); 
	 }
	var file = "rating.php?rate="+rate+"&id="+id+"&tabId="+tabId+"&pageId="+pageId+"&entId="+entId+"&userId="+userId; 
	//alert(file);
   //window.open(file);
	xmlhttp.open('GET', file, true); 
 
	   xmlhttp.onreadystatechange=function() {
       if (xmlhttp.readyState==4) { 

	        var content3 = xmlhttp.responseText; 
			 if( content3 ){ 
			//alert(content3);
			  var arrRate  = content3.split(",");
			  userRateImg1 = 	arrRate[0];
			  avgRateImg1 = 	arrRate[1];
			  userRate1 = arrRate[2];
			  avgRate1 = arrRate[3];
			  userNameRate = arrRate[4];
			  avgRateBig = arrRate[5];
			  //userRateBig = arrRate[6];
			  id1 = "userRateImg2"+id;
			  id2 = "userRate2"+id;
			  id3 = "avgRateImg2"+id;
			  id4 = "avgRate2"+id;
			  id5 = "userName1"+id; 
			  id6 = "averageRate"+id;
			  id7 = "averageRate2"+id;
			  //alert("userRateImg "+userRateImg1+" avgRateImg "+avgRateImg1+" userRate1 "+userRate1);
			  document.getElementById(id1).innerHTML = userRateImg1; 
			  
				document.getElementById(id2).innerHTML = userRate1; 
				document.getElementById(id3).innerHTML = avgRateImg1; 
				document.getElementById(id4).innerHTML = avgRate1; 
				document.getElementById(id5).innerHTML = userNameRate; 
				//alert(avgRateBig);   
				//document.getElementById(id6).style.display= "none";
				document.getElementById(id6).innerHTML = avgRateBig;
				<!-- innerHTML = avgRateBig;<li class="current-rating" style="width:<? echo $avgRatePer;?>%;">Currently 3/5 Stars.</li>
				//alert(document.getElementById("averageRate"));-->

			  }    	
		   }
	   }
	    xmlhttp.send(null); //Nullify the XMLHttpRequest
	    return;	 
}

//Add As NewsLetter Start
function addNewsletter(commId,fileId)
{
	//alert(commId);
	answer = confirm("Are You Sure to Add Image As Newsletter ?");
	if(answer == true)
	{
		var xmlhttp=false; 
		try {
				xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
		} 
		catch (e)
		{
			try {
					xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
			} catch (E) {
				xmlhttp = false;
						}
		}
		if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
						xmlhttp = new XMLHttpRequest(); 
		 }
		var file = "newsletter.php?sfId="+commId+"&fileId="+fileId; 
		//window.open(file);
		xmlhttp.open('GET', file, true); 
		xmlhttp.onreadystatechange=function() {
		   if (xmlhttp.readyState==4) 
		   { 
			 var content3 = xmlhttp.responseText; 
			 if( content3 ){ 
			 //alert(content3);
				parent.document.getElementById('thumb11').innerHTML = content3; 
			  }    	
			 /* linkUrl = "widget.php?userId="+userId+"&link=seemore&tabId=photo&pageId="+pageId;
			  window.location.href = linkUrl; */
		   } //Over If
		  } //Over Function
			xmlhttp.send(null); //Nullify the XMLHttpRequest
			return; 
	} //If ans true
}
//Add As NewsLetter Over	

//For Open Tiny Editor Start
function editorWin(largeId,entId,userId,pageId,tabId,albumEntityTypeId,albumId)
{
	var id = document.getElementsByName("curId")[0].value;
	
	/*alert("tabId "+tabId);
	alert("userId"+userId);
	alert("pageId"+pageId);
	alert("id"+id);*/
	//alert("USer= "+user);
	//alert("albumEntityTypeId= "+albumEntityTypeId);
	urlLink = "../include/tinymce/examples/index2.php?id="+id+"&userId="+userId+"&entId="+entId+"&pageId="+pageId+"&tabId="+tabId+"&largePhotoId="+largeId+"&albumEntityTypeId="+albumEntityTypeId+"&albumId="+albumId;
	//alert("urlLink= "+urlLink);
	//window.open(urlLink,"Text_Editor","height=310,width=700,align=center");
	window.open(urlLink,"Text_Editor","height=600,width=700,align=center,valign=center");
}
//For Open Tiny Editor Over

//For Open Email Friend Start
function emailWin(largeId,userId,pageId,entId,tabId,albumEntityTypeId,albumId)
{
	var id = document.getElementsByName("curId")[0].value;
	//alert("tab "+tabId)
	/*alert("userId"+userId);
	alert("pageId"+pageId);
	alert("id"+id);
	alert("tab "+tabId);*/
	//alert("USer= "+user);
	urlLink = "emailFrnd.php?userId="+userId+"&largeId="+id+"&pageId="+pageId+"&tabId="+tabId+"&entId="+entId+"&largePhotoId="+largeId+"&albumEntityTypeId="+albumEntityTypeId+"&albumId="+albumId;
	//alert("urlLink= "+urlLink);
	//window.open(urlLink,"Text_Editor","height=310,width=700,align=center");
	var hei = screen.availheight-200; //350;
	var wid = screen.availwidth -50; //250 height=564,width=1072
	window.open(urlLink,"Enmail_Friend","align=center,valign=center,resizable=1");
}
function mainGallary(entId,userId,pageId,tabId,siteHost,pageName,pageNo,albumEntityTypeId)
{
	siteHost = siteHost+"/"+pageName+"."+pageNo+".0.html";
	if(pageId == "user" || albumEntityTypeId == 1 ) //pageId == "album"
	{
		if(pageId == "album")
			paegId = "user";
		url = siteHost+"?userId="+userId+"&link=seemore&pageId="+pageId+"&goToTab="+tabId;
		//alert("url= "+url);
	}
	else if(pageId == "community" || albumEntityTypeId == 2)
		url = siteHost+"?comm_id="+entId+"&link=seemore&pageId="+pageId+"&goToTab="+tabId;	
	else if(pageId == "neighbor" || albumEntityTypeId == 4) 
		url = siteHost+"?nhId="+entId+"&link=seemore&pageId="+pageId+"&goToTab="+tabId;		
		//alert(url);
	location.href=(url);
	/*alert("entID= "+entId);
	alert("userId= "+userId);
	//alert("pageId= "+pageId);
	alert("tabId= "+tabId);
	alert("siteHost= "+siteHost);
	//alert("pageNo= "+pageNo);
	alert("Url= "+url);*/
}
//For Open Email Friend Over



// for a "add as a album image" functionality in album photos
// created by yash gohil dated 30 march 2010 bug no 2581...
function addImageasFolder(userId,imgId,albumId,entId,path,albumEntityTypeId)
{
	var newTag = confirm("Are you sure you want to add this image as a folder image?");
	if(newTag == true)
	{
	
		var xmlhttp=false; 
		try {
				xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
		} 
		catch (e)
		{
			try {
					xmlhttp = new
					ActiveXObject('Microsoft.XMLHTTP');
			} catch (E) {
				xmlhttp = false;
						}
		}
		if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
						xmlhttp = new XMLHttpRequest(); 
		}
		var file = "addFolderImage.php?userId="+userId+"&imgId="+imgId+"&albumId="+albumId+"&entId="+entId+"&path="+path+"&albumEntityTypeId="+albumEntityTypeId; 
		//alert(file);
		//window.open(file);
		xmlhttp.open('GET', file, true); 
		/*xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4) { 
			var content3 = xmlhttp.responseText; 
				if( content3 ){ 
				var tagId = "tag"+curId;
					document.getElementById(tagId).innerHTML = content3; 
				}    	
			}
		}*/
		xmlhttp.send(null); //Nullify the XMLHttpRequest
		return;	
	}
}

// added by yash gohil for create new album bug no 2644
function createAlbumWin(pageId,profileId)
{
	var left_popup = (screen.width - 600)/2;
	var top_popup = (screen.height - 450)/2;
	//alert(top_popup+left_popup);
	var createurl = "customizeAlbum.php?pageId="+pageId+"&"+profileId;
	window.open(createurl ,'customizeAlbum', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, height=450, width=600, left='+left_popup+', top='+top_popup);
}

