function markNav(id){
	dhtml_objects["nav_pointer"+id].set_visibility("visible");
}

function unmarkNav(id){
	dhtml_objects["nav_pointer"+id].set_visibility("hidden");
}

var flag = new Array("0","0");
var info = new Array("поиск по сайту","пароль");
function check_form(inner,num)
{
	if(flag[num]==0&&inner.value!="") inner.value="";
	flag[num] = 1;
}
function check_form_out(inner,num)
{
	if(inner.value=="") {
		inner.value=info[num];
		flag[num] = 0;
	}
}


function showPage( lang, page, section ){
	var page = "/"+lang+"pageviewer/"+page+"/"+section;
	var OpenWindow=window.open(page, "info", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=550,top=50, left=50");
}

function galleryPreview( lang, sectionid, item_number ){
	var ow=window.open("/"+lang+"/gallery/"+sectionid+"/"+item_number+"/", "preview", "width=570,height=500,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}

function Sami(name, code){
    this.name = name;
    this.code = code;
}

function _list(current_list, main_list){
	populate_array(main_list.options[main_list.selectedIndex].value);
	current_list.length = 0;
	for (counter = 0; counter < _type_array.length; counter++){
		current_list.options[counter] = new Option(_type_array[counter].name, _type_array[counter].code);
	}
	if (its_ns4){history.go(0);}
	current_list.options[0].selected = true;
}

function its_a_digit(character){
	var digit_characters = "0123456789";
	if (digit_characters.indexOf(character) == -1){return false;}
	return true;
}

function its_integer(string_value){
	if(string_value.length == 0){return false;}
	for(var counter = 0; counter < string_value.length; counter++){
		current_char = string_value.charAt(counter);
		if (!its_a_digit(current_char)){return false;}
	}return true;
}

function check_integer(element, text, def){
	if(!its_integer(element.value)){
		alert(text+":\n"+element.value);
		element.value = def;
		element.focus();
		return false;
	}return true;
}

function ShowHideElement(element, default_type) {
	if (!default_type) {
		default_type = "none";
	}
	document.getElementById(element).style.display = (document.getElementById(element).style.display == "block") ? "none" : ((!document.getElementById(element).style.display) ? default_type : "block");
	return false;
}

function ShowNameBrick(element, color) {
	color = (!color) ? "rgb(197,38,12)" : color;
	document.getElementById(element).style.background = color;
	return false;
}

function ShowiMovie (id, movie, width, height) {
	document.getElementById(id).style.width = width;
	document.getElementById(id).style.height = height;
	document.getElementById(id).src = movie;
}

function ShowMovie (movie, splash, width, height) {
	document.write (
		'<div style="cursor: pointer; width: ' + width + 'px; height: ' + height + 'px; border: 1px solid black;"><object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"  width="' + width + '" height="' + height + '" codebase="http://www.apple.com/qtactivex/qtplugin.cab">'
		+ '<param name="src" value="' + splash + '">'
		+ '<param name="controller" value="false">'
		+ '<param name="target" value="myself">'
		+ '<param name="href" value="' + movie + '">'
		+ '<param name="pluginspage" value="http://www.apple.com/quicktime/download/">'
		+ '<embed width="' + width + '" height="' + height + '" controller="false" target="myself" href="' + movie + '" src="' + splash + '" bgcolor="000000" border="0" pluginspage="http://www.apple.com/quicktime/download/indext.html"></embed>'
		+ '</object></div>'
	);
}