/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function confirm_entry(url)
{
    input_box=confirm("Are you sure?");
    if (input_box==true)
    {
        // Output when OK is clicked
        window.location.href=url;
    }
    else
    {
// Output when Cancel is clicked
//alert ("You clicked cancel");
}
}

var xmlhttp;

function ajax_call(url)
{
    
    xmlhttp=GetXmlHttpObject();
    if (xmlhttp==null)
    {
        alert ("Browser does not support HTTP Request");
        return;
    }

    //xmlhttp.onreadystatechange=stateChanged;
    xmlhttp.open("GET",url,true);
    xmlhttp.send(null);
}

function stateChanged()
{
    //if (xmlhttp.readyState==4)
    //{
    //    document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
    //}
}

function GetXmlHttpObject()
{
    if (window.XMLHttpRequest)
    {
        // code for IE7+, Firefox, Chrome, Opera, Safari
        return new XMLHttpRequest();
    }
    if (window.ActiveXObject)
    {
        // code for IE6, IE5
        return new ActiveXObject("Microsoft.XMLHTTP");
    }
    return null;
}

function popup(url)
{
    var width  = 400;
    var height = 300;
    var left   = (screen.width  - width)/2;
    var top    = (screen.height - height)/2;
    var params = 'width='+width+', height='+height;
    params += ', top='+top+', left='+left;
    params += ', directories=no';
    params += ', location=no';
    params += ', menubar=no';
    params += ', resizable=no';
    params += ', scrollbars=no';
    params += ', status=no';
    params += ', toolbar=no';
    newwin=window.open(url,'windowname5', params);
    if (window.focus) {newwin.focus()}
    return false;
}

