/*
 *
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
<!--
var popupwindow;

function openpopupwindow(id) {
    popupwindow = window.open("system/cms/forma_add_grafika.php?idprodukt=" + id, 'Logowanie', 'width=500, height=250, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0, copyhistory=0');
}

function closepopupwindow() {
    //popupwindow.close();
    document.getElementById("rrt1").innerHTML = "Siemanko, co tam?";
}

function setEleVar(typ, tryb, idp, idc) {
    var id2 = document.getElementById("cena" + idc);
    var id3 = document.getElementById("ilosc" + idc);
    var id4 = document.getElementById("tekst" + idc);
    if(document.getElementById("trans" + idc).checked == true) var id5 = 1;
    else var id5 = 0;
    //var id5 = document.getElementById("trans" + idc);
    //if (document.test.checkgroup[i].checked==true)
    //alert("typ=" + typ + " tryb=" + tryb + " idp=" + idp + " id2=" + id2.value + " id3=" + id3.value + " id4=" + id4.value);
    ajaxSetGraf(typ, tryb, idp, idc, id2.value, id3.value, id4.value, id5);
}  

//Browser Support Code
function ajaxSetGraf(typ, tryb, aid1, aid2, aid3, aid4, aid5, aid6){
    var ajaxRequest;  // The variable that makes Ajax possible!
    var eleVar;
    try{
        // Opera 8.0+, Firefox, Safari
        ajaxRequest = new XMLHttpRequest();
    } catch (e){
        // Internet Explorer Browsers
        try{
            ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try{
                ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e){
                // Something went wrong
                alert("Your browser broke!");
                return false;
            }
        }
    }
    // Create a function that will receive data sent from the server
    ajaxRequest.onreadystatechange = function(){
        if(ajaxRequest.readyState == 4){
            document.getElementById("rrt2").innerHTML = ajaxRequest.responseText;
            //document.getElementById("rrt1").innerHTML = "Siemanko, co tam?";
        }
    }
    //if (typ == 2 && tryb == 4) {
      
     // alert("typ=" + typ + "&tryb=" + tryb + "&aid1=" + aid1 + "&aid2=" + aid2 + "&aid3=" + aid3 + "&aid4=" + aid4);
    //}
    //ajaxRequest.open("GET", "../system/time.php", true);
    ajaxRequest.open("GET", "../system/funkcje_serwer.php?typ=" + typ + "&tryb=" + tryb + "&aid1=" + aid1 + "&aid2=" + aid2 + "&aid3=" + aid3 + "&aid4=" + aid4 + "&aid5=" + aid5 + "&aid6=" + aid6, true);
    ajaxRequest.send(null);

}

//-->
