function win(url, name, width, height) {
        open(url,name,'height='+height+',width='+width+',resizable=1,scrollbars=yes,menubar=no,status=no');
}

function os()
                {
                        url = "http://sibmarket.com/os.php";
                        handle = window.open(url, "os", "width=500,height=350,top=100,left=300,directories=no,location=no,menubar=no,scrollbars=no,status=no,titlebar=no,toolbar=no,resizable=yes");
                        handle.window.focus();
                }

function obj_win(url, width, height) {
        handle = window.open(url,"object_image","height='+height+',width='+width+',directories=no,location=no,menubar=no,scrollbars=no,status=no,titlebar=no,toolbar=no,resizable=no");
        handle.document.close();
        return false;
}

function new_iptar()
                {
                        url = "http://sibmarket.com/php/book/rekvizity.htm";
                        handle = window.open(url, "KRS", "width=400,height=300,top=100,left=100,directories=no,location=no,menubar=no,scrollbars=no,status=no,titlebar=no,toolbar=no,resizable=yes");
                        handle.window.focus();
                }

function check_form (theform) {
        var ll=theform.name;
        var lp=theform.addres;
        var lm=theform.email;
        var lk=theform.kol;
        var i=lm.value.indexOf('\@');


        if (ll.value=="") {
                alert("Напишите вашe имя!");
                ll.focus();
                return false;
        }
        if (lp.value=="") {
                alert("Напишите ваш адресс!");
                lp.focus();
                return false;
        }
        if (i<=0 || i>= i.value-1) {
                if (lm.value == "") {
                        alert('Напишите Ваш адрес E-Mail!');
                } else {
                        alert('Напишите правильный адрес E-Mail');
                }
                lm.focus();
                return false;
        }

        if (lk.value=="") {
                alert("Укажите количество!");
                lp.focus();
                return false;
        }


        if (document.all || document.getElementById) {
                for (i=0;i<theform.length;i++) {
                        var tempobj=theform.elements[i];
                        if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset") {
                                tempobj.disabled=true;
                        }
                }
        }

        return true;
}
function check_regform (theform) {
        var lp=theform.regname;
        var ll=theform.name;
        var lm=theform.email;
        var lk=theform.password;
        var i=lm.value.indexOf('\@');

        if (lp.value=="") {
                alert("Напишите ваш логин!");
                lp.focus();
                return false;
        }
        if (lk.value=="") {
                alert("Напишите ваш пароль!");
                lp.focus();
                return false;
        }
        if (ll.value=="") {
                alert("Напишите вашe имя!");
                ll.focus();
                return false;
        }
        if (i<=0 || i>= i.value-1) {
                if (lm.value == "") {
                        alert('Напишите Ваш адрес E-Mail!');
                } else {
                        alert('Напишите правильный адрес E-Mail');
                }
                lm.focus();
                return false;
        }

        if (document.all || document.getElementById) {
                for (i=0;i<theform.length;i++) {
                        var tempobj=theform.elements[i];
                        if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset") {
                                tempobj.disabled=true;
                        }
                }
        }

        return true;
}


window.status = 'Торговая компания СибМаркет';