function open_window(url, sirka, vyska, name, scrollbars, resizable, titlebar, toolbar, menubar)
{
	var width = new String();
	var height = new String();

	new_window = window.open(url, name, "height=" + vyska + ", width=" + sirka + ", toolbar=" + toolbar + ", titlebar=" + titlebar + ", scrollbars=" + scrollbars + ", menubar=" + menubar + ", resizable=" + resizable);
	new_window.focus();
}


function input_default(elm){
	if (!elm.base) elm.base = elm.value
	if (elm.value == elm.base) elm.value = "";
	else if (elm.value == "") elm.value = elm.base;
}

function check_order(selectedtype)
{
  document.order_form.order_status.value = selectedtype ;
  document.order_form.submit() ;
}


// informacne okienko

var offsetxpoint=10
var offsetypoint=20
var ie=document.all
var ns6=document.getElementById && !document.all
var enableinfo=false
var info_obj

/*
function info_obj_init(){
}
*/

function ietruebody(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function info(div, thetext, thecolor, thewidth){
	if (ns6||ie) {
		info_obj=document.all ? document.all[div] : document.getElementById? document.getElementById(div) : ""
	}
	if (ns6||ie){
		if (typeof thewidth!="undefined") info_obj.style.width=thewidth+"px"
		if (typeof thecolor!="undefined" && thecolor!="") info_obj.style.backgroundColor=thecolor
			info_obj.innerHTML=thetext
		enableinfo=true
		return false
	}
}

function positioninfo(e){
if (enableinfo){
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20

var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000

if (rightedge<info_obj.offsetWidth)
info_obj.style.left=ie? ietruebody().scrollLeft+event.clientX-info_obj.offsetWidth+"px" : window.pageXOffset+e.clientX-info_obj.offsetWidth+"px"
else if (curX<leftedge)
info_obj.style.left="5px"
else
info_obj.style.left=curX+offsetxpoint+"px"

if (bottomedge<info_obj.offsetHeight)
info_obj.style.top=ie? ietruebody().scrollTop+event.clientY-info_obj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-info_obj.offsetHeight-offsetypoint+"px"
else
info_obj.style.top=curY+offsetypoint+"px"
info_obj.style.visibility="visible"
}
}

function hide_info(){
if (ns6||ie){
enableinfo=false
info_obj.style.visibility="hidden"
info_obj.style.left="-1000px"
info_obj.style.backgroundColor=''
info_obj.style.width=''
}
}

document.onmousemove=positioninfo


//------------------------------
//			 show_tab
//------------------------------

function show_tab(tab)
{
	switch(tab)
	{
		default:
			$("#tab_attributes").show();
			$("#tab_photogallery").hide();
			
			$("#a_attributes").attr("class", "selected");
		  $("#a_photogallery").removeClass();
		break;

		case "photogallery":
			$("#tab_attributes").hide();
			$("#tab_photogallery").show();
			
			$("#a_photogallery").attr("class", "selected");
			$("#a_attributes").removeClass();
			
		break;
	}
}