﻿
function disablepostonfirstclick(post, Com, Name, Email, REmail)
{
 
    
    var lnkpost, txtCom, txtName, txtEmail, REVEmail, bolTerms, ctlCAPTCHA;
    lnkpost = document.getElementById(post);
    txtCom = document.getElementById(Com);
    txtName = document.getElementById(Name);
    txtEmail = document.getElementById(Email);
    REVEmail  = document.getElementById(REmail);
    bolTerms = document.getElementById(post.replace('lbPostCommentFinal','cbTerms')).checked;
             
    if(txtName.value!='' && txtCom.value!='' && txtEmail.value!='' && REVEmail.isvalid==true && bolTerms==true)
    {
        lnkpost.style.visibility='hidden';
        lnkpost.disabled = true;
    }
    
    
}
function hide(obj)
{
    obj.style.visibility="hidden";
}
function show(obj)
{
    obj.style.visibility="visible";
}
function scrolltopostreply()
{
    var row2 = document.getElementById("rowPost");
	row2.scrollIntoView();
    row2.focus();
	
}
function scrolltopost()
{
    var row2 = document.getElementById("rowPost");
    row2.scrollIntoView();
    row2.focus();
    
}
function scrolltopost2()
{
    if (document.getElementById("rowPost")) {
        var row2 = document.getElementById("rowPost");
        row2.scrollIntoView();
        row2.focus();
    }
    else {
        setTimeout("scrolltopost2();",500);
    }
}


