﻿// JScript File

//function to restrict the text input in a text area
function isMaxLength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}

//function to restrict the text input in a text area
function setMaxlength(obj, maxLength){

if (obj.value.length>maxLength)
obj.value=obj.value.substring(0,maxLength)
}

function ShowSearchCategory()
{
    var objDiv = document.getElementById("lpShowSearchCategories");
    objDiv.style.display='block';
    return false;
}
 
function HideSearchCategory()
{
    var objDiv = document.getElementById("lpShowSearchCategories");
    if(objDiv.style.display=='block')
        objDiv.style.display='none';
}

function ShowRatingDiv()
{
    var obj = document.getElementById("BizRatingDiv");
    obj.style.display='block';
    
}

function HideRatingDiv()
{
    document.getElementById("BizRatingDiv").style.display='none';
}

function ShowMemImg()
{
    var objDiv = document.getElementById("lpMemberimg");    
    objDiv.style.display='block';
    return false;
}

function HideMemImg()
{
    var objDiv = document.getElementById("lpMemberimg");
    if(objDiv.style.display=='block')
        objDiv.style.display='none';
}

function ShowMemImgsmall(imgid)
{
var imageiD = 'lpMemberimg' + imgid;
    var objDiv = document.getElementById(imageiD);    
    objDiv.style.display='block';
    return false;
}

function HideMemImgsmall(imgId)
{
var imageiD = 'lpMemberimg' + imgId;
    var objDiv = document.getElementById(imageiD);
    if(objDiv.style.display=='block')
        objDiv.style.display='none';
}