function bag_link(link) {
	document.location.href = link;
}
function winopen (popupURL,width,height) {
        var popup = window.open(popupURL,"popup",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=' + width + ',height=' + height );
        popup.focus();
        if( navigator.appName.substring(0,8) == "Netscape" ) {
                popup.location = popupURL;
        }
}
function winopen_mess (popupURL,width,height) {
        var popup = window.open(popupURL,"popup",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=' + width + ',height=' + height );
        popup.focus();
        if( navigator.appName.substring(0,8) == "Netscape" ) {
                popup.location = popupURL;
        }
}
function loadpage(urla,fram,pid,ses,brend,sex,collection,pnum){
    window.frames[fram].document.location = urla + "?pid=" + pid + "&SESSION=" + ses;
    document.all.bag.scrollTop = 0;
    takethat(brend,sex,collection,pnum);
}
function takethat(brend,sex,collection,pnum) {
        var popupURL = "/basket.php?brend=" + brend + "&sex=" + sex + "&collection=" + collection + "&pgnum=" + pnum;
        var popup = window.open(popupURL,"popup",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=200,height=60');
        popup.focus();
        if( navigator.appName.substring(0,8) == "Netscape" ) {
                popup.location = popupURL;
        }
}
function sub_zakaz(){
    document.forms["pre_zakaz"].ac.value=0;
    document.forms["pre_zakaz"].submit();
}
function sub_del(id){
    document.forms["pre_zakaz"].ac.value=1;
    document.forms["pre_zakaz"].itemid.value=id;
    document.forms["pre_zakaz"].submit();
}
function sub_ch(){
    document.forms["pre_zakaz"].ac.value=2;
    document.forms["pre_zakaz"].submit();
}
function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  }
}

