function open_contact_form(num_email)
{
    document.getElementById('contact_form_black_smog').style.display='block';
	showContactForm(num_email);
}

function cloce_contact_form()
{
    document.getElementById('contact_form_black_smog').style.display='none';
	document.getElementById('search_lead_at_id').style.display='none';
}

var xmlhttp;
    
function showContactForm(num_email)
{
	xmlhttp = null;
    if (window.XMLHttpRequest) {
        try {
            xmlhttp = new XMLHttpRequest();
        } catch (e){}
    } else if (window.ActiveXObject) {
        try {
            xmlhttp = new ActiveXObject('Msxml2.XMLHTTP');
        } catch (e){
            try {
                xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
            } catch (e){}
        }
    }
	
	var fragment_url='/?part=admin_contact_form&no_admin_blocks=1&numemail='+num_email;
	var bl='search_lead_at_id';
	
	var element = document.getElementById(bl);
    var theURL = fragment_url;
    element.innerHTML = '<div style="width:300px;padding:1px;background:#DCE2E7;border:#CCC solid 1px;" align="left"><div style="padding:5px;background:#658196;color:#FFF" align="left">Contact Form</div><div style="padding:10px;">Form loading. Please wait...</div></div>';
	element.style.display = 'block';
    xmlhttp.open('GET', fragment_url);
    xmlhttp.onreadystatechange = function()
    {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
        {
            element.innerHTML = xmlhttp.responseText;
        }
    }
    xmlhttp.setRequestHeader('Accept','message/x-jl-formresult')
    xmlhttp.send(null);
    return false;
}
    
function showPOSTFormAndShowNewContactBlock(fragment_url,post_str)
{
	xmlhttp = null;
    if (window.XMLHttpRequest) {
        try {
            xmlhttp = new XMLHttpRequest();
        } catch (e){}
    } else if (window.ActiveXObject) {
        try {
            xmlhttp = new ActiveXObject('Msxml2.XMLHTTP');
        } catch (e){
            try {
                xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
            } catch (e){}
        }
    }
	
	var bl='search_lead_at_id';
	
	var element = document.getElementById(bl);
    var theURL = fragment_url;
	element.innerHTML = '<div style="width:300px;padding:1px;background:#DCE2E7;border:#CCC solid 1px;" align="left"><div style="padding:5px;background:#658196;color:#FFF" align="left">Contact Form</div><div style="padding:10px;">Sending. Pleace wait...</div></div>';
	element.style.display = 'block';
    xmlhttp.open('POST', fragment_url);
    xmlhttp.onreadystatechange = function()
    {
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
        {
            element.innerHTML = xmlhttp.responseText;
        }
    }
    xmlhttp.setRequestHeader('Accept','message/x-jl-formresult');
    xmlhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
    xmlhttp.send(post_str);
    return false;
}