function viewBig(oImg)
{
//	Slimbox.open(oImg.src.replace("/preview/", "/fullsize/"));
//	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 shopCheckDeposit(oInput, strDeposit, variantSelectType, strAlert)
{
	var maxDeposit = -1;
	var	idSelectedVariant = 0;
	// 1 - get variant select type and selcted variant value
	if(strDeposit.indexOf(",") != -1)
	{// are variants
		arrDeposit = strDeposit.split(",");
		if(variantSelectType == 0)
		{// checkbox
			// get checked variant
			for(i=0; i< arrDeposit.length; ++i)
			{
				arrDepositVariant = arrDeposit[i].split("-");
				oChkbox = document.getElementById("variant_radio_"+arrDepositVariant[0]);
				if(oChkbox && oChkbox.checked)
					idSelectedVariant = arrDepositVariant[0];
			}// end of for 
			
		}else
		{// selectbox
			idSelectedVariant = document.getElementById("IdVariant-"+parseInt(arrDeposit[0])).value;
		}// end of else

		// get max items on deposit
		for(i=1; i< arrDeposit.length; ++i)
		{
			arrDepositVariant = arrDeposit[i].split("-");
			if(arrDepositVariant[0] == idSelectedVariant)
				maxDeposit = arrDepositVariant[1];
		}// end of for 
			
	}// end of if are variants
	// if is no deposit by variant or are no variants use deposit from article
	if(maxDeposit == -1)
		maxDeposit = parseInt(strDeposit.substr(strDeposit.indexOf("-")+1));// there are no variants
	if(maxDeposit != -1 && parseInt(oInput.value) > parseInt(maxDeposit))
	{
		oInput.value=maxDeposit;
		window.alert(strAlert.replace("{Count}", maxDeposit));
	}// end of if is value more than maxDeposit	
}// end of function shopCheckDeposit(oInput, strDeposit, variantSelectType, alert)


//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
//alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
//alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("/*alert(message);*/return false")


