﻿<!--
var TypeNames = new Array("frmMessageView", "frmProfileView","frmProfileMsgView","frmImageView", "frmLocVisit", "frmRecommendMaint", "frmPlaceViewDets", "frmChatWindow", "frmProfileBonus", "frmBonusDets");
var Windows = new Array(null, null, null, null, null, null, null, null, null,null);


this.clickIE4=function() {
    if (event.button == 2) {
        return false;
    }
}

this.clickNS4=function(e) {
    if (document.layers || document.getElementById && !document.all) {
        if (e.which == 2 || e.which == 3) {
            return false;
        }
    }
}

if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown = clickNS4;
}
else if (document.all && !document.getElementById) {
    document.onmousedown = clickIE4;
}

document.oncontextmenu = new Function("return false")


this.redirectToMail=function()
{
    document.location="slProfileViewMessages.aspx";
}


this.open_blog=function()
{
   var frmBlog='http://loveisthebug.wordpress.com';
    var lnTypeId=getTypeIdFromName("frmBlog")
   
    if (Windows[lnTypeId]!=null)
        if (!Windows[lnTypeId].closed)
            Windows[lnTypeId].close();

        Windows[lnTypeId]= window.open(frmBlog,'frmBlog','status=no,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,left=270,top=100,height=700px,width=900px');
 
}

this.bonusDetails=function()
{
    var frmBonusDets='SLBonusDets.aspx';
    var lnTypeId=getTypeIdFromName("frmBonusDets")
   
    if (Windows[lnTypeId]!=null)
        if (!Windows[lnTypeId].closed)
            Windows[lnTypeId].close();

//        Windows[lnTypeId]= window.open(frmProfileBonus,'frmProfileBonus','status=no,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no,left=270,top=300,height=150,width=500px');
    alert("Coming Soon...");

}


this.profileBonus=function(p_nIdReg,p_lChangeWidth)
{
    var frmProfileBonus='SLProfileBonus.aspx';
    var lnTypeId=getTypeIdFromName("frmProfileBonus")
    var lcWidth="315px";
    
    if (Windows[lnTypeId]!=null)
        if (!Windows[lnTypeId].closed)
            Windows[lnTypeId].close();

        if (p_lChangeWidth)
            lcWidth="370px";
            
        Windows[lnTypeId]= window.open(frmProfileBonus,'frmProfileBonus','status=no,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no,left=300,top=200,height=220,width='+lcWidth);
}


this.galleryFilter=function(p_nCurrentPage,p_nFilter,ctrlName)

{

    try
    {
    
      var objIFrame=document.getElementById(ctrlName);
       if (typeof(objIFrame)!=undefined)
       {
            objIFrame.src='SLMemberGalleryImages.aspx?pageId='+p_nCurrentPage+"&fltr="+p_nFilter;            ;
            galleryAnthemMethod(p_nCurrentPage,p_nFilter);
        }    
    }
    catch(err)
    {
        window.status(err.Message);
    }
}

this.galleryNext=function(p_nCurrentPage,p_nFilter,ctrlName)
{
    try
    {
      var objIFrame=document.getElementById(ctrlName);
      if (typeof(objIFrame)!=undefined)
       {
 
        p_nCurrentPage=p_nCurrentPage+1;
        objIFrame.src='SLMemberGalleryImages.aspx?pageId='+p_nCurrentPage+"&fltr="+p_nFilter;            ;
        galleryAnthemMethod(p_nCurrentPage,p_nFilter);    
        }
    }
    catch(err)
    {
        window.status(err.Message);
    }

}


this.galleryPrev=function(p_nCurrentPage,p_nFilter,ctrlName)
{

    try
    {
      var objIFrame=document.getElementById(ctrlName);
      if (typeof(objIFrame)!=undefined)
       {
        p_nCurrentPage=p_nCurrentPage-1;  
        
        if (p_nCurrentPage<1)
            p_nCurrentPage=1;
                     
            objIFrame.src='SLMemberGalleryImages.aspx?pageId='+p_nCurrentPage+"&fltr="+p_nFilter;            
            galleryAnthemMethod(p_nCurrentPage,p_nFilter);
        }
    }
    catch(err)
    {
        window.status(err.Message);
    }
}

this.galleryAnthemMethod=function(p_nNewPage,p_nFilter)
{
        Anthem_InvokePageMethod('getGalleryData',[p_nNewPage,p_nFilter],"");

}

this.openVisitList=function()
{
    var frmLocVisit='SLProfLocVisitList.aspx';
    var lnTypeId=getTypeIdFromName("frmLocVisit")
   
    if (Windows[lnTypeId]!=null)
        if (!Windows[lnTypeId].closed)
            Windows[lnTypeId].close();

        Windows[lnTypeId]= window.open(frmLocVisit,'frmLocVisit','status=no,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no,left=270,top=300,height=150,width=500px');
}

this.open_image=function(idViewReg,imageId)
{
    var frmImageView='SLGallery.aspx?idViewReg='+idViewReg+'&imageId='+imageId;
    var lnTypeId=getTypeIdFromName("frmImageView")
    
    if (Windows[lnTypeId]!=null)
        if (!Windows[lnTypeId].closed)
            Windows[lnTypeId].close();
    
        
    Windows[lnTypeId]= window.open(frmImageView,'frmImageView','status=no,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no,left=410,top=250,height=405px,width=405px');
    Windows[lnTypeId].focus();
}


this.menuOverStyle=function (idObj,Style)
{
    idObj.className=Style;

}

this.open_profile=function(regId)
{

    var frmProfileView='SLProfileView.aspx?regId='+regId;
    var lnTypeId=getTypeIdFromName("frmProfileView")

    if (Windows[lnTypeId]!=null)
        if (!Windows[lnTypeId].closed)
            Windows[lnTypeId].close();
        
    Windows[lnTypeId] = window.open(frmProfileView,'frmProfileView','status=no,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,left=300,top=10,height=600px,width=525px');
    Windows[lnTypeId].focus();

}

this.closeChildren=function()
{
alert('here');
	for (var i=0;i<Windows.length;i++)
	{
		if (Windows[i] != null && !Windows[i].closed)
		{
			Windows[i].close();
		}
	}
}

this.getTypeIdFromName=function(name)
{

	var i=0;
	while (i<TypeNames.length && TypeNames[i]!=name) {i++;}
	return i;
}


//    google_ad_client = "pub-3397790291584218";
//    google_ad_width = 468;
//    google_ad_height = 60;
//    google_ad_format = "468x60_as";
//    google_ad_type = "text_image";
//    google_ad_channel = "1227140025";
//    google_color_border = "996699";
//    google_color_bg = "E6E6FA";
//    google_color_link = "660066";
//    google_color_text = "000000";
//    google_color_url = "008000";


this.openComparePopUp=function(linkURL) 
{	
   window.open(linkURL,'popup','resizable=yes,scrollbars=yes,top=100,left=200,width=860,height=580');
}

this.openPurchasePopUp=function(linkURL) 
{	

     var purchasePop = dhtmlwindow.open("purchasebox", "iframe", linkURL, "Loveisthebug Upgrade Options", "width=615px,height=564px,resize=0,scrolling=0,center=1","recal");
}

this.openPopUp=function(linkURL) 
{	
   window.open(linkURL,'popup','resizable=yes,scrollbars=yes,top=100,left=200,width=600,height=600');
}

//-->


