﻿

// Iframe height
function calcHeight(frame)
{
var the_height;
  //find the height of the internal page
  if(document.getElementById(frame).contentDocument)
  {
  the_height= document.getElementById(frame).contentDocument.height;
  }
  else
  {
  the_height= document.getElementById(frame).contentWindow.document.body.scrollHeight;
  }
  
  //change the height of the iframe
  if(the_height>900)
  {
  document.getElementById(frame).height=the_height;
  }
  else
  {
  document.getElementById(frame).height=900;
  }
  
}

function calcHeight1()
{
var the_height;
  //find the height of the internal page
  if(document.getElementById('IFPhoto').contentDocument)
  {
  the_height= document.getElementById('IFPhoto').contentDocument.height;
  }
  else
  {
  the_height= document.getElementById('IFPhoto').contentWindow.document.body.scrollHeight;
  }
  
  //change the height of the iframe
  if(the_height>700)
  {
  document.getElementById('IFPhoto').height=the_height;
  }
  else
  {
  document.getElementById('IFPhoto').height=700;
  }
  
}

function ValidateLoginName(sender, args)
{
    if (args.Value.length < 5)
    {
        args.IsValid = false;
    }
    else
    {
        args.IsValid = true;
    }        
}

function ValidatePassword(sender, args)
{
    if (args.Value.length < 6 || args.Value.length > 12)
    {
        args.IsValid = false;
    }
    else
    {
        args.IsValid = true;
    }        
}

function ValidateZip(sender, args)
{
    if (args.Value.length < 5)
    {
        args.IsValid = false;
    }
    else
    {
        args.IsValid = true;
    }        
}

function ValidatePhone(sender,args)
{
    if(args.Value.length < 10)
    {
        args.IsValid=false;
    }
    else
    {
        args.IsValid=true;
    }
}