function tab1() {
	document.getElementById('tab1').style.display = 'block';
	document.getElementById('tab2').style.display = 'none';
	document.getElementById('tab3').style.display = 'none';
} 
function tab2() {
	document.getElementById('tab1').style.display = 'none';
	document.getElementById('tab2').style.display = 'block';
	document.getElementById('tab3').style.display = 'none';
} 
function tab3() {
	document.getElementById('tab1').style.display = 'none';
	document.getElementById('tab2').style.display = 'none';
	document.getElementById('tab3').style.display = 'block';
}
function ValidateCommentForm()
{
    var name = document.CommentForm.name_send;
    var email = document.CommentForm.Email;
    var comment = document.CommentForm.coments_txt;

    if (name.value == "")
    {
        window.alert("Моля въведете вашето име.");
        name.focus();
        return false;
    }
    if (comment.value == "")
    {
        window.alert("Моля въведете вашиято коментар.");
        comment.focus();
        return false;
    }
    return true;
}

function open_query_product_window(url) {
	var target = "_blank";
	var width = 640;
	var height = 480;
	var centered = true;
	
	var paramYY = "scrollbars=no,resizable=0";
	var paramYN = "scrollbar=no,resizable=0";
	var paramNN = "scrollbar=0;resizable=0";
	var parameter2 = "";
	if (centered == true && (navigator.appName.indexOf("Netscape") > -1 && parseInt(navigator.appVersion.substring(0,1)) >=4 )
			|| (navigator.appName.indexOf("Microsoft Internet Explorer") > -1 && parseInt(navigator.appVersion.substring(0,1)) >=4 )) {
		var w = (screen.width/2)-(width/2); 
		var h = (screen.height/2)-(height/2); 

		if (width != 0) {
			parameter2 += ',width=' + width + ', screenX=' + w + ',left=' + w;
		}
		if (height != 0) {
			parameter2 += ',height=' + height + ', screenY=' + h + ',top=' + h;
		}
	} else {
		if (width != 0) {
			parameter2 += ',width=' + width;
		}
		if (height != 0) {
			parameter2 += ',height=' + height;
		}
	}
	
	var win = window.open(url, target, paramNN + parameter2);
	
	if (win) {
		win.focus();
	}
}