function openWinMap(url)
{
var j=window.open(url,"jj","left=20, width=470, height=425, scrollbars=0")
}
function openWinAlbum(url) {
    var j = window.open(url, "jj", "left=20, width=600, height=500, scrollbars=0")
}
function openWin(url)
{
var j=window.open(url,"jj","left=20, width=600, height=600, scrollbars=0") 
}

function openWin1(url)
{
var j=window.open(url,"jj","left=200, top=282, width=337,height=140,scrollbars=0") 
}
function openWin3(url)
{
var j=window.open(url,"jj","left=20, top=20, width=600,height=570,scrollbars=0") 
}
function openWin5(url)
{
var j=window.open(url,"jj","left=20, top=20, width=700,height=650,scrollbars=0") 
}
function openpop(url)
{
var j=window.open(url,"jj","left=20, top=20, width=300,height=210,scrollbars=0") 
}
function openpop_issue(url)
{
var j=window.open(url,"jj","left=20, top=20, width=220,height=390,scrollbars=0") 
}
function openpop_banner(url)
{
var j=window.open(url,"jj","left=20, top=20, width=998,height=125,scrollbars=0") 
}
function openpop_dir(url)
{
var j=window.open(url,"jj","left=20, top=20, width=200,height=220,scrollbars=0") 
}
function openpop_gallery(url)
{
var j=window.open(url,"jj","left=20, top=20, width=600,height=420,scrollbars=0") 
}
function openWinImage(url) {
    var j = window.open(url, "jj", "left=20, width=600, height=210, scrollbars=0")
}
function openWinAlbumImage(url) {
    var j = window.open(url, "jj", "left=20, width=800, height=600, scrollbars=0")
}
function showObjective(fsDivID)
{
	
    hideAll();
    document.getElementById(fsDivID).style.display='inline';
}

function hideAll()
{
	if(document.getElementById('apDiv1'))
    	document.getElementById('apDiv1').style.display='none';
	if(document.getElementById('apDiv2'))
		document.getElementById('apDiv2').style.display='none';
	if(document.getElementById('apDiv3'))
		document.getElementById('apDiv3').style.display='none';
	if(document.getElementById('apDiv4'))
		document.getElementById('apDiv4').style.display='none';
	if(document.getElementById('apDiv5'))
		document.getElementById('apDiv5').style.display='none';
	if(document.getElementById('apDiv6'))
		document.getElementById('apDiv6').style.display='none';		
	if(document.getElementById('apDiv7'))
		document.getElementById('apDiv7').style.display='none';		
		
}

function hideObjective()
{
    hideAll();
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function showhide(layer_ref) { 
    var element = document.getElementById(layer_ref);
    if(element.style.display == "" || element.style.display == "none")
    	element.style.display = "block";
    else
	    element.style.display = "none";
}

function show(layer_ref) { 
    var element = document.getElementById(layer_ref);
	element.style.display = "block";
}

function hide(layer_ref) { 
    var element = document.getElementById(layer_ref);
    element.style.display = "none";
}

function changeTab(evt, foLnk, fiTab)
			{
				hide('dv01');
				hide('dv02');
				hide('dv03');
				hide('dv04');
				hide('dv05');
				hide('dv06');
				hide('dv07');
				hide('dv08');
				hide('dv09');
				show('dv0' + fiTab);
				
}
function changeTab01(evt, foLnk, fiTab)
			{
				hide('dv100');
				hide('dv101');
				show('dv10' + fiTab);
				
}
function free_lnk()
{
window.location.href="create_lifememorial_step3.aspx";
}
function premium_lnk()
{
window.location.href="create_lifememorial_step3_premium.aspx";
}
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); 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; }
}
function onkeyPressForFile(e) {
    var key = window.event ? e.keyCode : e.which;
    e.cancelBubble = true;
    e.returnValue = false;
    return false;
}
function checkMaxLengthOnKeyPress(foEvent, foTextArea, foMaxlength) {
    if (foEvent.charCode || window.event) {
        return foTextArea.value.length < foMaxlength;
    }
    else {
        return true;
    }
}
function floatsonly(e,txtvalue)
{
   
	var floatflag;
	if (e.keyCode) keycode=e.keyCode;
	else keycode=e.which;

    if(e.shiftKey)
    {
        return false;
    }
	if(keycode==9 || keycode==46 || keycode==37 ||keycode==39||keycode==36||keycode==35) {
		return true;
	}
    
	if (keycode!=8)
	{ 
		if(keycode==110 || keycode==190)
		{
			if(txtvalue.indexOf(".")==-1)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		if ((keycode<48||keycode>57) && (keycode<96||keycode>105)) 
		    return false 
	}
}

function numbersonly(e)
{ 
    if(e.shiftKey)
    {
        return false;
    }
   
	if (e.keyCode) keycode=e.keyCode;
	else keycode=e.which;
	if(keycode==9 || keycode==46 || keycode==37 ||keycode==39||keycode==36||keycode==35)
	{				
		return true;
	}
	if (keycode!=8)
	{ 
		if ((keycode<48||keycode>57) && (keycode<96||keycode>105)) 
		return false 
	}
}
function SetUniqueRadioButton(nameregex, current)
{
   re = new RegExp(nameregex);
   for(i = 0; i < document.forms[0].elements.length; i++)
   {
      elm = document.forms[0].elements[i]
      if (elm.type == 'radio')
      {
         if (re.test(elm.name))
         {
            elm.checked = false;
         }
      }
   }
   current.checked = true;
}
function checkMaxLengthOnKeyPress(foEvent, foTextArea, foMaxlength)
{
    if(foEvent.charCode || window.event)
    {
        return foTextArea.value.length < foMaxlength;
    }
    else
    {
        return true;
    }
}

function checkMaxLengthOnBlur(foEvent, foTextArea, foMaxlength)
{
    if (foTextArea.value.length > foMaxlength)
    {
        foTextArea.value = foTextArea.value.substring(0, foMaxlength);
    }
}
