function GetAddFormAndOpenModal(form, promo, code){
if(form){
$.post('/personal/items/add/',
{ itemadd : form['itemadd'].value, submitform : form['submitform'].value, checkbutton : form['checkbutton'].value,
promo : form['promo'].value, code : form['code'].value, lastchoose : form['lastchoose'].value },
function(html){
$("#chooseAdd div.content").html(html);
}, "html");
}else{
$.post("/personal/items/add/?promo="+promo+"&code="+code, function(html){
OpenModalWindow2('chooseAdd');
$("#chooseAdd div.content").html(html);
}, "html");
}
}
function GetAddFormAndOpenModal(form, promo, code){
if(form){
var params = 'itemadd=' + encodeURIComponent(form['itemadd'].value)
+ '&submitform=' + encodeURIComponent(form['submitform'].value)
+ '&checkbutton=' + encodeURIComponent(form['checkbutton'].value)
+ '&promo=' + encodeURIComponent(form['promo'].value)
+ '&code=' + encodeURIComponent(form['code'].value)
+ '&lastchoose=' + encodeURIComponent(form['lastchoose'].value)
;
var request = new XMLHttpRequest();
request.onreadystatechange = processRequestChange;
request.open('POST', "/personal/items/add/", true);
request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
request.send(params);
}else{
var request = new XMLHttpRequest();
request.onreadystatechange = processRequestChange;
request.open('GET', "/personal/items/add/?promo="+promo+"&code="+code, true);
request.send(null);
}
}