function blocking(nr, cookie, vis_state)
{
        if (document.layers)
        {
                current = (document.layers[nr].display == 'none') ? vis_state : 'none';
                document.layers[nr].display = current;
        }
        else if (document.all)
        {
                current = (document.all[nr].style.display == 'none') ? vis_state : 'none';
                document.all[nr].style.display = current;
        }
        else if (document.getElementById)
        {
                display = (document.getElementById(nr).style.display == 'none') ? vis_state : 'none';
                document.getElementById(nr).style.display = display;
        }
}

function sendform(a,b) {
	if (document.getElementById('commentform').author.value == "") {
	alert('Please enter the Name');
	document.getElementById('commentform').author.focus();
	return false;
	} 
	else
	if ((document.getElementById('commentform').email.value.indexOf('@', 0)<1)||(document.getElementById('commentform').email.value.indexOf('@', 0)==document.getElementById('commentform').email.value.length-1)) {
	alert('Incorrectly entered E-Mail');
	document.getElementById('commentform').email.focus();
	return false;
	}
	else
	if ( (document.getElementById('commentform').message.value == "")||(document.getElementById('commentform').message.value == "Message") ) {
	alert('Please enter your message');
	document.getElementById('commentform').message.focus();
	return false;
	}

	var A = a;
	var B = b;

	C = A+B;
	c = prompt(A + "+" + B + "=", "?");

	if ( c != C ) {
	return false;
	} else {
	document.getElementById('commentform').c.value = c;
	}

return true;
document.getElementById('commentform').submit();
}

function sendformadmin() {
	if (document.getElementById('commentform').author.value == "") {
	alert('Please enter the Name');
	document.getElementById('commentform').author.focus();
	return false;
	} 
	else
	if (document.getElementById('commentform').email.value == "") {
	alert('Please enter the Password');
	document.getElementById('commentform').email.focus();
	return false;
	}
return true;
}

function sendformadminset() {
	if (document.getElementById('commentform').gbname.value == "") {
	alert('Please enter a name for the guest book');
	document.getElementById('commentform').gbname.focus();
	return false;
	} 
	else
	if (document.getElementById('commentform').sitename.value == "") {
	alert('Please enter the URL of the guestbook');
	document.getElementById('commentform').sitename.focus();
	return false;
	}
return true;
}

function requestform(a,b) {
	if (document.getElementById('commentform').author.value == "") {
	alert('Please enter the Name');
	document.getElementById('commentform').author.focus();
	return false;
	} 
	else
	if ((document.getElementById('commentform').email.value.indexOf('@', 0)<1)||(document.getElementById('commentform').email.value.indexOf('@', 0)==document.getElementById('commentform').email.value.length-1)) {
	alert('Please enter the E-Mail');
	document.getElementById('commentform').email.focus();
	return false;
	}
	else 
	if (document.getElementById('commentform').product.value == "") {
	alert('Please select Product');
	document.getElementById('commentform').product.focus();
	return false;
	} 

	var A = a;
	var B = b;
	C = A+B;
	c = prompt(A + "+" + B + "=", "?");

	if ( c != C ) {
	return false;
	} else {
	document.getElementById('commentform').c.value = c;
	}

return true;
document.getElementById('commentform').submit();
}

function view(nom) {
        if ( nom == 3 )
        {
		//alert(nom);
		document.forms["scripts_com"].submit();
		//scripts_com.submit();
        }
        if ( nom == 2 ) document.forms["php_resourceindex_com"].submit();
        if ( nom == 4 ) document.forms["search_scripts_com"].submit();
}

function pay(prod) {
//Next2.mesto_nom.value = prod
	document.forms["pay"].LMI_PAYMENT_DESC.value = "Payment for the GuestBook (" + prod + ")";
	document.forms["pay"].submit();
}

String.prototype.printAddr = 
function (_hamper,_prefix,_postfix,_face)
{
  _hamper=
  _prefix+
  "@"+
  this+
  (_postfix || '')
document.write('<a href=mailto:' + _hamper + '>' + (_face||_hamper) + '</a>');
}

