/*меин функтионс
----------------------------------------------*/

function vid(p){return document.getElementById(p);}

function fval(p){return document.forms[0].elements[p].value;}


function add_png(name){
if(path==null) path="";
if(document.all && !window.opera) {
    if (/MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == "Win32") {
        document.write("<style>."+name+" {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+path+"i/"+name+".png', sizingMethod='crop');}</style>");
    }
    } else if (document.getElementById) {
    document.write("<style>."+name+" {background:url('"+path+"i/"+name+".png') no-repeat;}</style>");
}
}

function check(obj){
prefix="Не заполнено обязательное поле ";
i=0;
while(obj.elements[i]){
	if(document.getElementById("req_"+obj.elements[i].name)!=null && obj.elements[i].value==""){
		alert("Поля отмеченные звездочкой (*) обязательны для заполнения"); 
		return false;
		}	
	i++;
}
return true;
}


function chk_req(obj){
document.getElementById("req_"+obj.name).className=(obj.value=="" ? "or" : "wt");
}


