//************************************************************************//
//   QShop E-Commerce Solutions                                           //
//   Copyright @ VISUAL TECHNOLOGIES INC  2002-2007                       //
//   http://qshop.com.pl qshop@qshop.com.pl                               //
//************************************************************************//
//   This software is copyrighted, do not attempt to copy                 //
//   without permission                                                   //
//************************************************************************//
var A2N_exist = GE('all_pic');
var cac = 0;
var hide_type = 0;
var moz = (navigator.appName.indexOf("Microsoft"))? true:false;
if(moz==true) {
	hide_type = 0;
} else {
	hide_type = 1;
}
try {
	GE('pics').style.display = "none";
}
catch(Error) {
	
}
function getY(oElement) {
	var iReturnValue = 0;
	while( oElement != null ) {
		iReturnValue += oElement.offsetTop;
		oElement = oElement.offsetParent;
	}
	return iReturnValue;
}
Array.prototype.is_inArray = function (value){
    var i;
    for (i=0; i < this.length; i++) {
        if (this[i] === value) {
            return true;
        }
    }
    return false;
};
msgArray = new Array();
avlItems = new Array();
function ar_push(val) {
	msgArray.push(val);
}
function ar_remove() {
	for(var x=0;x<=msgArray.length-1; x++) {
		msgArray[x]=0;
	}
	msgArray=[];
}
function hide_elem(elem) {
	if(hide_type==0)
		GE(elem).style.display = "none";
	else
		GE(elem).style.filter = "Alpha(Opacity=20)";
}
function show_elem(elem) {
	if(hide_type==0)
		GE(elem).style.display = "";
	else
		GE(elem).style.filter = "Alpha(Opacity=100)";
}
var num_rows = 0;
var A2N_last_val = 0;
function redraw(val_redraw) {
	if(A2N_exist==null) {
		show_elem('pics');
	} else {
		A2N_last_val = val_redraw;
		redraw_done++;
		num_rows = 0;
		ar_remove();
		var cod_l = 0;
		var cod_t = 0;
		var count = 0;
		var count_all = 0;
		var n = 0;
		var element_in_view = 0;
		var contentDiv = GE("pics"); 
		var nDIVel = contentDiv.getElementsByTagName("div"); 
		for (var i = 0; i < nDIVel.length; i++) {
			var elem = nDIVel[i]; 
			if(elem.id.length>0) {
				element_in_view++;
				if(parseFloat(GE(elem.id+'val').value)>parseFloat(val_redraw)) {
					if(hide_type==0) { ar_push(elem.id); }
					hide_elem(elem.id);
				} else {
					show_elem(elem.id);
				}
				if(msgArray.is_inArray(elem.id)==false) {
					avlItems.push(elem.id)
				} else {
					hide_elem(elem.id);
				}
			}
		}
		if(msgArray.length==element_in_view) {
			GE('pics').style.display = "none";
			if(cena_z_bazy!="") GE('pics_info').style.display='';
		} else { 
			GE('pics').style.display = "";
			if(cena_z_bazy!="") GE('pics_info').style.display='none';
		}
		if(removed_dfsql==1) {
			GE('pics').style.display = "";
			if(cena_z_bazy!="") GE('pics_info').style.display='none';
		}
		element_in_view = 0;
	}
}
if(cena_z_bazy=="") { 
	try {
		redraw(); 
	} catch(Error) {
		
	}
}
var timer=0;
function stop_timer() {
	timer=0;
}
function resize_timer() {

}
function start_timer() {

}
function start_draw() {
}
if(A2N_exist!=null) { 
	resize_timer(); 
}
function redrawx(val) {
	redraw(A2N_last_val);
}
var atc_count = 0;
function correct() {

}
