//------------------------------------------------------------------------------
function OpenPhoto(path, h, w)
{
    date = new Date();
    t = date.getTime();
    win=open("","displaywindow"+t,'status=no,toolbar=no,menubar=no, scrollbars=no, height='+h+', width='+w);
    win.document.open();
    win.document.write('<span style="position: absolute; top:0px; left:0px;"><span style="position: absolute; top: 10px; right: 13px; z-index: 3; cursor: pointer; cursor: hand;"><img src="/design/images/close.gif" width="17" height="17" border="0" alt="Закрыть" onclick=window.close() /></span><image src=\''+path+'\' /></span>');
    win.document.close();
}
//------------------------------------------------------------------------------
function over_sub(id)
{
    var ItmId1 = document.getElementById(id);
    ItmId1.style.backgroundImage = "URL(/design/images/question.jpg)";
    ItmId1.style.backgroundRepeat = "no-repeat";
}

//------------------------------------------------------------------------------
function out_sub(id)
{
    var ItmId1 = document.getElementById(id);
    ItmId1.style.backgroundImage = "URL(/design/images/question2.jpg)";
}

//------------------------------------------------------------------------------
function OpenWindow(path, w, h)
{
	var docs=null;	docs=open(path, "name1", 'status=0, toolbar=0, menubar=0, scrollbars=1, height='+h+', width='+w);
}
//------------------------------------------------------------------------------
startList = function() {
        if (document.all&&document.getElementById) {
            navRoot = document.getElementById("nav-one");
            for (i=0; i<navRoot.childNodes.length; i++) {
                node = navRoot.childNodes[i];
                if (node.nodeName=="LI") {
                    node.onmouseover=function() { this.className+=" sfHover";}
                    node.onmouseout=function() {
                        this.className=this.className.replace(" sfHover", "");
}
}
}
}
}
window.onload=startList;
//------------------------------------------------------------------------------
function showdiv(divid)
{
	if(document.getElementById(divid).style.display=="none")
	{
	document.getElementById(divid).style.display="inline";
	}
	else
	{
	document.getElementById(divid).style.display="none";
}
}
//------------------------------------------------------------------------------		
	function checkForm()
{	
    var pattern=/^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/;
    if(pattern.test(subm_form.email.value) && subm_form.name.value != '')
	{   
	document.forms.add.action = 'mail.php';
	return true;  
        }
	else
	{   
	alert("Вы неверно заполнили поле email или не ввели имя!");
        return false;
}
}
