function viewBig(oImg)
{
	bigImg = window.open("", "_blank", "resizable=1, scrollbars=1");
	bigImg.document.write("<html><body onload='window.moveTo(0 ,0);window.resizeTo(document.getElementById(\"Img\").width+18, document.getElementById(\"Img\").height+60);' onclick='window.close();' style='margin:0px;padding: 0px;'><img id='Img' src='"+oImg.src.replace("/preview/", "/fullsize/")+"' /></body></html>");
	bigImg.document.close();
}// end of function viewBig(oImg)

function viewBigOld(oImg)
{
	bigImg = window.open(oImg.src.replace("/preview/", "/fullsize/"), "_blank", "none");
}// end of function viewBig(oImg)

//#######################################################################################
function open_href(objHref, strTarget)
{// function for open window in XHTML 1.1 strict - no target by anchor is allowed
 	window.open(objHref.href, strTarget);
 	return false;
}// end of function window_open_href(objHref)

function setActiveForm()
{
	arrForms = document.getElementsByTagName('Form');
	var arrInpts;
	if(arrForms[0])arrInpts = arrForms[0].getElementsByTagName('Input');
	if(arrInpts && arrInpts[0] && arrInpts[0].type!='hidden')
		arrInpts[0].focus();
}

function fireChangeEvent(control, targetWindow) 
{ 
	if(!targetWindow)targetWindow = window;
    if (document.all) 
    { 
        control.fireEvent("onchange"); 
    } 
    else 
    { 
		var changeevent=targetWindow.document.createEvent("HTMLEvents")
		changeevent.initEvent("change", true, true)
		control.dispatchEvent(changeevent)
    } 
}// end of function fireChangeEvent(control, targetWindow) 

function showSox(oH6)
{
	// hide all forms in items
	oFormActual = oH6.parentNode.getElementsByTagName("FORM");
	oForm = oH6.parentNode.parentNode.getElementsByTagName("FORM");
	for(i=0;i<oForm.length;++i)
		if(oForm[i] != oFormActual[0])
		oForm[i].style.display = "none";
	// visit acctual form
	if(oFormActual[0].style.display == "none")
		oFormActual[0].style.display = "block";
	else oFormActual[0].style.display = "none";
}

function showCalender(ID_BOX)
{
	window.open('calendar.php?prev=0&time=0&targetInput=deliveryDate&selectedDate='+document.getElementById('deliveryDate').value, '', 'width=350,height=300');
}
