function popupCall2Phone() {
        // consWindow = window.open('/flash/call2phone/call2phone_session.html','Call to office','status=0,toolbar=0,scrollbars=1,width=650,height=550');
        consWindow = window.open('/id-scripts/call2phone/call2phone_session.html','Call to office','status=0,toolbar=0,scrollbars=1,width=650,height=550');
        consWindow.moveTo(250,100);
        return false;
}

var popWnd= new Array(
    //      wnd,     name,      params
    new Array(null,"popupWindow1","height=500,width=650,resizable=no,scrollbars=no,toolbar=no,location=no,menubar=no"),
    new Array(null,"popupWindow2","height=535,width=500,resizable=yes,scrollbars=yes,toolbar=no,location=no,menubar=no"),
    new Array(null,"popupWindow3", "height=540,width=790,resizable=yes,scrollbars=yes,toolbar=no,location=no,menubar=no,left=0,top=0"),//help window
    new Array(null,"popupWindow4", "height=540,width=635,resizable=yes,scrollbars=yes,toolbar=no,location=no,menubar=no,left=0,top=0"),//print windows
    new Array(null,"popupWindow", "height=400,width=390,resizable=no,scrollbars=yes,toolbar=no,location=no,menubar=no"),// used in atty_header.inc cons_header.inc general_header.inc
    new Array(null,"popupWindowD", "height=535,width=685,resizable=yes,scrollbars=yes,toolbar=yes,location=no,menubar=no"),// used in demo (categories.html, categories3.html, categories_2.html)
    new Array(null,"popupWindowT","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=670,height=550"),// used in demo (testimonials)
    new Array(null,"popupWindowZip", "height=480,width=630,resizable=yes,scrollbars=no,toolbar=yes,location=no,menubar=yes"), // zip-code lookup window
    new Array(null,"popupWindowPrint", "height=100,width=100,resizable=yes,scrollbars=no,toolbar=no,location=no,menubar=no"), // print window
    //add new window definitions before lpPopupWindow (made for the optimization)
    new Array(null,"popupWindow5","height=300,width=300,resizable=no,scrollbars=no,toolbar=no,location=no,menubar=no"),
    new Array(null,"popupWindowScript", "height=720,width=790,resizable=yes,scrollbars=yes,toolbar=no,location=no,menubar=no,left=0,top=0"),
    new Array(null, "popupWindowProfile", "height=500,width=480,resizable=yes,scrollbars=yes,toolbar=no,location=no,menubar=no,left=0,top=0")
);

function popupCall2PhoneI() {
    url = '/id-scripts/call2phone/call2phone_session.html';
    OPW(url, 'popupWindow1');
    return false;
}


function CPW(name)
{
    var i = 0;
    for(i = 0; i < popWnd.length; i++) {
        if(popWnd[i][1] == name)
            break;
    }
    
    if(popWnd[i][0] == null ||(popWnd[i][0]).closed) {
        popWnd[i][0].close();
    }
    
    popWnd[i][0]=null;
}

function OPW(url, name) {

    var i=0;

    for(i=0; i<popWnd.length; i++) {
        if( popWnd[i][1] == name ) {
            break;
        }
    }

    if( popWnd[i][0] == null || (popWnd[i][0]).closed) {
        popWnd[i][0] = window.open( url, popWnd[i][1], popWnd[i][2] );
    } else {
        popWnd[i][0].location.href = url;
    }

    popWnd[i][0].focus();
}

