var current_man = "pic/man.gif";

function preload() {
	var imgFiles = preload.arguments;
    var preloadArray = new Array();
    for (var i=0; i < imgFiles.length; i++ ) {
    	preloadArray[i] = new Image;
    	preloadArray[i].src = imgFiles[i];
    } //for
} //preload
  
function locate_img(name) {
	var theImage = false;
    if (document.images) {
    	theImage = document.images[name]; 
    } //if
    if (theImage) {
    	return theImage;
    } //if
    return (false);
} //locate_img
  
function swap(id, newsrc) {
	var theImage = locate_img(id);
    if (theImage) {
		if(newsrc == 0) {
	    	theImage.src = current_man;
	  	} else {
        	theImage.src = newsrc;
		}
    } //if
} //swap
  
function man_change(c_man) {
	current_man = c_man;
}
  
function show_articul(articul_id, plus_id) {
    var flag = document.getElementById(articul_id).style.display
    if (flag == "none") {
    	swap(plus_id, "pic/minus.gif");
    	document.getElementById(articul_id).style.display = "block";
    } else {
    	swap(plus_id, "pic/plus.gif");
    	document.getElementById(articul_id).style.display = "none";
    } //if
} //show_articul-->

function show_articul_g(articul_id, plus_id) {
    var flag = document.getElementById(articul_id).style.display
    if (flag == "none") {
    	swap(plus_id, "pic/minus_g.gif");
    	document.getElementById(articul_id).style.display = "block";
    } else {
    	swap(plus_id, "pic/plus_g.gif");
    	document.getElementById(articul_id).style.display = "none";
    } //if
} //show_articul-->
