


String.prototype.trim = function() {
    return this.replace(/^\s+|\s+$/g,"");
}
var xmlHttp
var is_duplicate = false;

function saveZoom1(lat,long,zoom)
{
    xmlHttp=GetXmlHttpObject()
    if (xmlHttp==null)
    {
        alert ("Browser does not support HTTP Request")
        return;
    }
    xmlHttp.open("GET",'save_zoom.php?lat='+lat+'&long='+long+'&zoom='+zoom,true);
    xmlHttp.send(null);
}


function saveZoom(lat,long,zoom){
    xmlHttp=GetXmlHttpObject()
    $.blockUI({
        css: {
            border: 'none',
            padding: '15px',
            backgroundColor: '#000',
            '-webkit-border-radius': '10px',
            '-moz-border-radius': '10px',
            opacity: .5,
            color: '#fff'
        }
    });
    if (xmlHttp==null)
    {
        alert ("Browser does not support HTTP Request")
        return;
    }
    xmlHttp.open("GET",'save_zoom.php?lat='+lat+'&long='+long+'&zoom='+zoom,true);
    xmlHttp.send(null);
    setTimeout($.unblockUI,1);
}

function verify_duplicate_users(user,id){
    xmlHttp=GetXmlHttpObject()
    jQuery.blockUI({
        css: {
            border: 'none',
            padding: '15px',
            backgroundColor: '#000',
            '-webkit-border-radius': '10px',
            '-moz-border-radius': '10px',
            opacity: .5,
            color: '#fff'
        }
    });
    if (xmlHttp==null)
    {
        alert ("Browser does not support HTTP Request")
        return;
    }
    xmlHttp.onreadystatechange=stateChanged7;
    xmlHttp.open("GET",'verify_duplicates.php?user='+user+'&id='+id,true);
    xmlHttp.send(null);
}

function changeSession(){
    xmlHttp=GetXmlHttpObject()
    if (xmlHttp==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    }

    xmlHttp.onreadystatechange=stateChg;
    xmlHttp.open("GET",'reset_session.php',true);
    xmlHttp.send(null);
}

function stateChg(){
    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    {
//alert('ok');
}
}

function stateChanged7()
{
    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    {
        if (xmlHttp.responseText == '1'){
            is_duplicate = true;
        }
        else{
            is_duplicate = false;
        }
    }
    setTimeout(jQuery.unblockUI,1);
}


function populateCounty(stateCode)
{
    xmlHttp=GetXmlHttpObject();
    
try{
    jQuery.blockUI({
            css: {
                border: 'none',
                padding: '15px',
                backgroundColor: '#000',
                '-webkit-border-radius': '10px',
                '-moz-border-radius': '10px',
                opacity: .5,
                color: '#fff'
            }
        });
}
catch (e){
    
}

        
    


    if (xmlHttp==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    }

    xmlHttp.onreadystatechange=stateChanged;
    xmlHttp.open("GET",'get_counties.php?code='+stateCode,true);
    xmlHttp.send(null);
}

function stateChanged2()
{
    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    {
        var parti = xmlHttp.responseText.split("^&");
        document.getElementById(parti[0]).innerHTML=parti[1];
    }
}

function stateChanged()
{
    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    {
        //alert(xmlHttp.responseText);
        document.getElementById('counties').innerHTML = xmlHttp.responseText;
    }
    if (typeof $ == 'function'){
        setTimeout(jQuery.unblockUI);
    }
}

function GetXmlHttpObject(){
    var xmlHttp=null;
    try    {
        // Firefox, Opera 8.0+, Safari
        xmlHttp=new XMLHttpRequest();
    }
    catch (e)
    {
        // Internet Explorer
        try{
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e){
            xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
    }
    return xmlHttp;
}

function isdefined( variable)
{
    return (typeof(window[variable]) === "undefined")?  false: true;
}

function isFunction(possibleFunction) {
    return (typeof(possibleFunction) == typeof(Function));
}



function mkVisible(idNumber,pipeline,ct,st,pt,cycle){

    cycle = mkVisible.arguments[5];
    //  console.log(cycle);

    var cycle_str='';
    if (typeof cycle === 'undefined'){
    //   alert('cycle undefined');
    } else {
        cycle_str='&cycle='+cycle;
    }

    //    var cy=$('#ddlCycle').val();

    xmlHttp=GetXmlHttpObject()
    if (xmlHttp==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    }

    xmlHttp.onreadystatechange=stateChanged_2;
    xmlHttp.open("GET",'make_visible.php?code='+idNumber+'&pipeline='+pipeline+'&ct='+ct+'&st='+st+'&pt='+pt+cycle_str,true);
    xmlHttp.send(null);

}






function stateChanged_2()
{
    if (xmlHttp.readyState==2 || xmlHttp.readyState==3 || xmlHttp.readyState==1)
    {

    }

    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    {
        //setTimeout($.unblockUI, 100);
        //document.getElementById("loading").className = "loading-invisible"
        //alert(xmlHttp.responseText);
        document.getElementById('idRefineQuery').innerHTML = xmlHttp.responseText;
        if ($("#ddlCycle").val()!='1'){
            $(".end_date_container").show();
            $(".summarize").attr('disabled',false);
            $(".group_by_cycle").hide();
            $(".group_by_aggregates").show();
            $("#date-criteria").html('For Date Range Between:');
        } else {
            $(".end_date_container").hide();
            $(".summarize").attr('disabled',true);
            $(".group_by_cycle").show();
            $(".group_by_aggregates").hide();
            $("#date-criteria").html('For Date:');
        }

    }
}

function populateByProduction(production,str_where,gets){
    //alert(production+'00000'+str_where);


    xmlHttp=GetXmlHttpObject()
    if (xmlHttp==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    }

    try {
        jQuery.blockUI({
            css: {
                border: 'none',
                padding: '15px',
                backgroundColor: '#000',
                '-webkit-border-radius': '10px',
                '-moz-border-radius': '10px',
                opacity: .5,
                color: '#fff'
            }
        });
    } catch(e){
      //  alert(e);
    }

    xmlHttp.onreadystatechange=stateChanged_3;
    xmlHttp.open("POST",'populateByProduction.php?production='+production+'&str_where='+str_where+'&gets='+gets,true);
    xmlHttp.send(null);
}

function populateByCycle(cycle,str_where,gets){

    xmlHttp=GetXmlHttpObject()
    if (xmlHttp==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    }

 /*   try {
        jQuery.blockUI({
            css: {
                border: 'none',
                padding: '15px',
                backgroundColor: '#000',
                '-webkit-border-radius': '10px',
                '-moz-border-radius': '10px',
                opacity: .5,
                color: '#fff'
            }
        });
    } catch(e){
      //  alert(e);
    }
*/
    xmlHttp.onreadystatechange=after_cycle_loaded;
    xmlHttp.open("POST",'populateByCycle_revised.php?cycle='+cycle+'&str_where='+str_where+'&gets='+gets,true);
    xmlHttp.send(null);
}

function after_cycle_loaded()
{

    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    {
        //alert(xmlHttp.responseText);
        //document.getElementById("loading").className = "loading-invisible"
        var mySplitResult = xmlHttp.responseText.split("(*|*)");
      //  alert(mySplitResult[0]);
        document.getElementById(mySplitResult[0]).style.display = '';
        document.getElementById('img_right_'+mySplitResult[0]).style.display= "none";
        document.getElementById('img_down_'+mySplitResult[0]).style.display = "block";
        
        document.getElementById(mySplitResult[0]).innerHTML = mySplitResult[1];
      /*  document.getElementById('img_right_'+mySplitResult[0]).style.display = 'none';
        document.getElementById('img_down_'+mySplitResult[0]).style.display = '';*/
        setTimeout(jQuery.unblockUI,1);
    }

}

function stateChanged_3()
{

    /*if (xmlHttp.readyState==2 || xmlHttp.readyState==3 || xmlHttp.readyState==1)
{

}*/

    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    {
        //alert(xmlHttp.responseText);
        //document.getElementById("loading").className = "loading-invisible"
        var mySplitResult = xmlHttp.responseText.split("(*|*)");
        //alert(mySplitResult[0]);
        document.getElementById(mySplitResult[0]).style.display = '';
        document.getElementById(mySplitResult[0]).innerHTML = mySplitResult[1];
        document.getElementById('img_right_'+mySplitResult[0]).style.display = 'none';
        document.getElementById('img_down_'+mySplitResult[0]).style.display = '';
        //document.getElementById('loading').innerHTML = '';
        setTimeout(jQuery.unblockUI,1);
    }

}

function populate_lines(agg,subagg,where,order,gets){
    xmlHttp=GetXmlHttpObject()
    if (xmlHttp==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    }
    jQuery.blockUI({
        css: {
            border: 'none',
            padding: '15px',
            backgroundColor: '#000',
            '-webkit-border-radius': '10px',
            '-moz-border-radius': '10px',
            opacity: .5,
            color: '#fff'
        }
    });
    xmlHttp.onreadystatechange=stateChanged_4;
    xmlHttp.open("POST",'populate_subagg.php?agg='+agg+'&subagg='+subagg+"&where="+where+'&order='+order+'&gets='+gets,true);
    xmlHttp.send(null);
}

function stateChanged_4()
{
    if (xmlHttp.readyState==2 || xmlHttp.readyState==3 || xmlHttp.readyState==1)
    {
    //document.getElementById("loading").className = "loading-visible";
    }

    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    {
        //alert(xmlHttp.responseText);
        //document.getElementById("loading").className = "loading-invisible"
        var mySplitResult = xmlHttp.responseText.split("(*|*)");
        //alert();
        var divinner = mySplitResult[0].trim()+'_'+mySplitResult[1].trim();
        if (divinner != '_'){
            document.getElementById(divinner).style.display = '';
            //alert(xmlHttp.responseText);
            document.getElementById(divinner).innerHTML= mySplitResult[2];
            //document.getElementById(mySplitResult[0]).innerHTML = mySplitResult[1];
            document.getElementById('img_right_'+divinner).style.display = 'none';
            document.getElementById('img_down_'+divinner).style.display = '';
        //alert(mySplitResult[2]);
        }
        setTimeout(jQuery.unblockUI,1);
    }
}

function populate_avg(page,where,order){

    xmlHttp=GetXmlHttpObject()
    try {
        jQuery.blockUI({
            css: {
                border: 'none',
                padding: '15px',
                backgroundColor: '#000',
                '-webkit-border-radius': '10px',
                '-moz-border-radius': '10px',
                opacity: .5,
                color: '#fff'
            }
        });
    } catch (e) {
    // alert('jQuery is not defined');
    //gray_out();
    }


    if (xmlHttp==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    }
    //alert(page+'---'+where+'---'+order);

    xmlHttp.onreadystatechange=stateChanged_5;
    xmlHttp.open("POST",'without_agregates_.php?page_no='+page+"&where="+where+'&order='+order,true);
    xmlHttp.send(null);
}

function populate_avg1(page,where,order){
    xmlHttp=GetXmlHttpObject()
    if (xmlHttp==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    }
    //alert(page+'---'+where+'---'+order);

    xmlHttp.onreadystatechange=stateChanged_5;
    xmlHttp.open("POST",'without_agregates2_.php?page_no='+page+"&where="+where+'&order='+order,true);
    xmlHttp.send(null);
}

function stateChanged_5()
{
    //alert(xmlHttp.responseText);
    if (xmlHttp.readyState==2 || xmlHttp.readyState==3 || xmlHttp.readyState==1)
    {
    //document.getElementById("loading").className = "loading-visible";
    }

    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    {
        //document.getElementById("loading").className = "loading-invisible"
        document.getElementById('populate_avg').innerHTML = xmlHttp.responseText;
        setTimeout(jQuery.unblockUI,1);
    }
}

function agg(i){
    if (i == 1){
   //     document.getElementById('idSumar').innerHTML = '<table width="100%"><tr><td colspan="2"><hr /></td></tr><tr><td><input type="checkbox" name="aggregates" value="3" /></td><td>Also Group Aggregates</td></tr></table>';
          document.getElementById('idSumar').innerHTML = '<table width="100%">'+
                                                '<td>'+
                                                    '<span class="group_by_cycle"> <input type="checkbox" name="g_cycle" value="3" /> Also Group By Cycle</span>'+
                                                    '<span class="group_by_aggregates" style="display:none"> <input type="checkbox" name="aggregates" value="3" /> Also Group Aggregates</span>'+
                                                '</td>'+

                                                '<td>'+
                                                    '<span class="group_by_cycle"></span>'+
                                                    '<span class="group_by_aggregates" style="display:none"></span>'+
                                                '</td>'+
                                                '</table>';
    }
    if (i == 2){
       // document.getElementById('idSumar').innerHTML = '<table width="100%"><tr><td colspan="2"><hr /></td></tr><tr><td><input type="checkbox" name="pipelines" value="3" checked="checked" /></td><td>Also Group Pipelines</td></tr></table>';
      document.getElementById('idSumar').innerHTML = '<table width="100%">'+
                                                '<td>'+
                                                    '<span class="group_by_cycle"> <input type="checkbox" name="g_cycle" value="3" /> Also Group By Cycle</span>'+
                                                    '<span class="group_by_aggregates" style="display:none"> <input type="checkbox" name="pipelines" value="3" /> Also Group Pipelines</span>'+
                                                '</td>'+

                                                '<td>'+
                                                    '<span class="group_by_cycle"></span>'+
                                                    '<span class="group_by_aggregates" style="display:none"></span>'+
                                                '</td>'+
                                                '</table>';
    }
    if (i == 3){
        document.getElementById('idSumar').innerHTML = '';
    }
}
function validare_cristi_bou(){
    var errors = '';
    if (document.getElementById('idD1') != null){
        if (document.getElementById('idD2') != null){
            if (document.getElementById('idD1').value > document.getElementById('idD2').value){
                errors = 'The first date should be lower than the second one \n';
            }
            if (document.getElementById('idLabelBlank').innerHTML.trim()==''){
                if (document.getElementById('idPointType').selectedIndex == 0)
                    errors = 'A point type is mandatory \n';
            }
            if (errors != ''){
                alert(errors);
                return false;
            }
            else{
                return true;
            }
        }
    }
}

function populate_by_pipeline(id_pipeline,where,gets){
    xmlHttp=GetXmlHttpObject()
    //de reparat!!!

       jQuery.blockUI({
        css: {
            border: 'none',
            padding: '15px',
            backgroundColor: '#000',
            '-webkit-border-radius': '10px',
            '-moz-border-radius': '10px',
            opacity: .5,
            color: '#fff'
        }
    });
    if (xmlHttp==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    }
    xmlHttp.onreadystatechange=stateChanged9;
    xmlHttp.open("POST",'populate_by_pipeline.php?id_pipeline='+id_pipeline+'&where='+where+'&gets='+gets,true);
    xmlHttp.send(null);
}

function populate_by_cycle(id_cycle,where,gets){
    xmlHttp=GetXmlHttpObject()
    //de reparat!!!

       jQuery.blockUI({
        css: {
            border: 'none',
            padding: '15px',
            backgroundColor: '#000',
            '-webkit-border-radius': '10px',
            '-moz-border-radius': '10px',
            opacity: .5,
            color: '#fff'
        }
    });
    if (xmlHttp==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    }
    xmlHttp.onreadystatechange=cycles_loaded;
    xmlHttp.open("POST",'populateByCycle_revised.php?id_cycle='+id_cycle+'&where='+where+'&gets='+gets,true);
    xmlHttp.send(null);
}

function cycles_loaded(){
    if (xmlHttp.readyState==2 || xmlHttp.readyState==3 || xmlHttp.readyState==1)
    {
    //document.getElementById("loading").className = "loading-visible";
    }
    else{
        //document.getElementById("loading").className = "loading-invisible"
        var mySplitResult = xmlHttp.responseText.split("(*|*)");
    //    alert(mySplitResult[0]);
        document.getElementById(mySplitResult[0]).style.display = '';
        document.getElementById(mySplitResult[0]).innerHTML = mySplitResult[1];
        document.getElementById('img_right_'+mySplitResult[0]).style.display = 'none';
        document.getElementById('img_down_'+mySplitResult[0]).style.display = '';
        //document.getElementById('loading').innerHTML = '';
        //alert(xmlHttp.responseText);
        setTimeout(jQuery.unblockUI,1);
    }

}

function stateChanged9()
{
    if (xmlHttp.readyState==2 || xmlHttp.readyState==3 || xmlHttp.readyState==1)
    {
    //document.getElementById("loading").className = "loading-visible";
    }
    else{
        //document.getElementById("loading").className = "loading-invisible"
        var mySplitResult = xmlHttp.responseText.split("(*|*)");
        document.getElementById(mySplitResult[0]).style.display = '';
        document.getElementById(mySplitResult[0]).innerHTML = mySplitResult[1];
        document.getElementById('img_right_'+mySplitResult[0]).style.display = 'none';
        document.getElementById('img_down_'+mySplitResult[0]).style.display = '';
        //document.getElementById('loading').innerHTML = '';
        //alert(xmlHttp.responseText);
        setTimeout(jQuery.unblockUI,1);
    }

}

function populate_pipelines(id_pipeline,where,order){
    xmlHttp=GetXmlHttpObject()
    jQuery.blockUI({
        css: {
            border: 'none',
            padding: '15px',
            backgroundColor: '#000',
            '-webkit-border-radius': '10px',
            '-moz-border-radius': '10px',
            opacity: .5,
            color: '#fff'
        }
    });
    if (xmlHttp==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    }
    xmlHttp.onreadystatechange=stateChanged9;
    xmlHttp.open("POST",'populate_by_pipeline.php?id_pipeline='+id_pipeline+'&where='+where+'&order='+order,true);
    xmlHttp.send(null);
}

function popup_rid(id){
    window.open('popupPntrid.php?pntrid='+id,'Point_Rid','height=200,width=400,location=2,scrollbars=1');
}

String.prototype.trimm = function() {
    return this.replace(/^\s+|\s+$/, '');
};
function  isValidDateFormat(date)
{
    var date = document.getElementById(date).value;
    var m = date.substring(0,2);
    var d = date.substring(3,5);
    var y = date.substring(6,10);
    if((date.length > 10) || ((date.charAt(2)!="-") && (date.charAt(2)!="/")) || ((date.charAt(5)!="-") &&(date.charAt(5)!="/"))||(d>31) ||(m>12) ||(y<1900))
    {
        return false;
    }
    else
    {
        var m = date.substring(0,2);
        var d = date.substring(3,5);
        var y = date.substring(6,10);
        if (d==0 ||m==0 ||y==0 )
        {
            return false;
        }

        if(m==01||m==03||m==05||m==07||m==08||m==10||m==12)
        {
            var dmax = 31;
        }
        else
        if (m==04||m==06||m==09||m==11)
        {
            var dmax = 30;
        }
        else
        {
            if((y%400==0) || (y%400==0 && y%100!=0))
            {
                dmax = 29;
            }
            else dmax = 28;
        }
        if (d>dmax)
            return false;
    }
    return true;
}

function is_valid(){
    if (document.getElementById('start_date').value.trimm() == ''){
        alert('The start date is mandatory!');
        document.getElementById('start_date').focus();
        return false;
    }
    else{
        var str = ':\n';
        var num_errors=0;

        if (document.getElementById('idPipeline') != null){
            if (document.getElementById('idPipeline').value == ''){
                str += 'The pipeline name is required!\n';
                numerrors++;
            }
        }

        if (document.getElementById('idStates') != null){
            if (document.getElementById('idStates').value == ''){
                str += 'The state field is required!\n';
                numerrors++;
            }
        }

        if (document.getElementById('idPointsName') != null) {
            if (document.getElementById('idPointsName').value.length < 5){
                document.getElementById('idPointsName').select();
                str += 'Please enter valid criteria for the point name/number (at least 5 characters) !\n';
                numerrors++;
            }
        }

        if (!isValidDateFormat('start_date')){
            str += 'The start date is not valid!\n';
            numerrors++;
        }
        if (document.getElementById('end_date').value.trimm() != ''){
            if (!isValidDateFormat('end_date')){
                str += 'The end date is not valid!\n';
                numerrors++;
            }
        }
        // var errs='Error'
        if (str != ':\n') {
            var errs=(num_errors>1) ? 'Errors ' : 'Error ';
            str=errs + str;
            alert(str);
            return false;
        }

        return true;
    }
}

function is_valid_errors(){
    var str = ':\n';
    var num_errors=0;
    
    if (document.getElementById('idPipeline') != null){
        if (document.getElementById('idPipeline').value == ''){
            str += 'The pipeline name is required!\n';
            num_errors++;
        }
    }

    if (document.getElementById('idStates') != null){
        if (document.getElementById('idStates').value == ''){
            str += 'The state field is required!\n';
            num_errors++;
        }
    }

    if (document.getElementById('idPointsName') != null) {
        if (document.getElementById('idPointsName').value.length < 5){
            document.getElementById('idPointsName').select();
            str += 'Please enter valid criteria for the point name/number (at least 5 characters) !\n';
            num_errors++;
        }
    }

    if (!isValidDateFormat('start_date')){
        str += 'The start date is not valid!\n';
        num_errors++;
    }
    if (document.getElementById('end_date').value.trimm() != ''){
        if (!isValidDateFormat('end date')){
            str += 'The end date is not valid!\n';
            num_errors++;
        }
    }
    var errs=(num_errors>1) ? 'Errors ' : 'Error ';
    str=errs + str;
    alert(str);
}

function is_valid_1(){
    var error_counter=0;
    if (document.getElementById('start_date').value.trimm() == ''){
        document.getElementById('start_date').focus();
        //     alert('valid');
        return false;
    }
    else{
        var str = '';
        //alert(str);
        if (document.getElementById('idPipeline') != null){
            if (document.getElementById('idPipeline').value == ''){
                str += 'The pipeline name is required!\n';
                error_counter++;
            }
        }

        if (document.getElementById('idStates') != null){
            if (document.getElementById('idStates').value == ''){
                str += 'The state field is required!\n';
                error_counter++;
            }
        }

        if (document.getElementById('idPointsName') != null) {
            if (document.getElementById('idPointsName').value.length < 5){
                document.getElementById('idPointsName').select();
                str += 'Please enter a valid name field (at least 5 characters or numbers !\n';
                error_counter++;
            }
        }

        if (!isValidDateFormat('start_date')){
    //        alert('date invalid');
            str += 'The start date is not valid!\n';
            error_counter++;
        }

        if (document.getElementById('end_date').value.trimm() != ''){
                    
            if (!isValidDateFormat('end_date')){
                str += 'The end date is not valid!\n';
                error_counter++;
            }
        }
                
       if (error_counter>0){
           var errors_str=(error_counter==1) ? 'Error:\n'+str : 'Errors:\n'+str;
           alert(errors_str);
           return false;
       }
       return true;
    }
}





function hdsubmit(){
    document.getElementById('hd').innerHTML = '<input type="hidden" name="Submit" value="1" />';
}

function hdsubmitexport1(){
    document.getElementById('hd').innerHTML = '<input type="hidden" name="ExportToCsv" value="1" />';
}
function hdsubmitexport2(){
    document.getElementById('hd').innerHTML = '<input type="hidden" name="ExportIndividual" value="1" />';
}

function shdok(){
    document.getElementById('shd').innerHTML = '<input type="hidden" name="okok" value="1" />';
}


function shdokok(){
    document.getElementById('shd').innerHTML = '<input type="hidden" name="okokok" value="1" />';
}

function ov_(elm){
    elm.style.cursor = 'pointer';
}

function out_(elm){
    elm.style.cursor = 'none';
}
/*
function show_single_point_map(pct){
    document.getElementById('mapframe').src = 'googlemap.php?pct='+pct;
    window.scrollTo(100,100);
}
function show_agg_map(agg){
    document.getElementById('mapframe').src = 'googlemap.php?agg='+agg;
    window.scrollTo(100,100);
}
function show_subagg_map(subagg,agg){
    document.getElementById('mapframe').src = 'googlemap.php?subagg='+subagg+'&aggl='+agg;
    window.scrollTo(100,100);
}
function show_pipes_map(pipe){
    document.getElementById('mapframe').src = 'googlemap.php?pipe='+pipe;
    window.scrollTo(100,100);
}
*/



function show_single_point_map(pct){
    document.getElementById('mapframe').src = 'maps/geoserve.php?pct='+pct;
    window.scrollTo(100,100);
}
function show_agg_map(agg){
    document.getElementById('mapframe').src = 'maps/geoserve.php?agg='+agg;
    window.scrollTo(100,100);
}
function show_subagg_map(subagg,agg){
    document.getElementById('mapframe').src = 'maps/geoserve.php?subagg='+subagg+'&aggl='+agg;
    window.scrollTo(100,100);
}
function show_pipes_map(pipe){
    document.getElementById('mapframe').src = 'maps/geoserve.php?pipe='+pipe;
    window.scrollTo(100,100);
}






function map_all_points(){
    //	document.getElementById('mapframe').src = 'googlemap.php?allpcts=all';

    document.getElementById('mapframe').src = 'maps/geoserve.php?allpcts=all';

    window.scrollTo(100,100);
}


   /*   jQuery(document).ready(function() {
            $('input[id^="cycle_arrow_"]').live('click',function(){
//                alert(jQuery($(this).attr('id')));
                alert('clicked');
            });
      });**/



