var tid;
var speed = 50;


function ch_row_bgcolor (row, color) {
	for ( var i=0; i < row.cells.length; i++ ) 
		row.cells[i].bgColor=color;
}

function _minimize_pic () {
	pic = document.getElementById ( "bigpic" );
	pic.height -= speed;
	
	if ( pic.height <= 0 ) {
		
		clearInterval ( tid );
		
	}	

}

function minimize_pic () {
	pic = document.getElementById ( "bigpic" );
	
	pic.height --;
	tid = setInterval ( "_minimize_pic()", 1 );
}


function _maximize_pic () {
	pic = document.getElementById ( "bigpic" );
	
	pic.height += speed;
	
	if ( pic.height >= 251 ) {
		pic.height = 251;
		clearInterval ( tid );
	}
}

function maximize_pic () {
	pic = document.getElementById ( "bigpic" );
	pic.height ++;
	
	tid = setInterval ( "_maximize_pic()", 1 );
}


function change_big_cover ( coverimg ) {
	
	pic = document.getElementById ( "big_cover");
	pic.src = coverimg.src;
	
	pictxt = document.getElementById ( "big_cover_subscript" );
	pictxt.innerHTML = coverimg.alt;
}


function deselect_editions () {

	for ( var i = 0; i < 10; i ++ ) {
		
		img = document.getElementById ( "order_img_"+i );
		
		if ( img ) {
			img.style.filter = "alpha(opacity=40)";
			img.style.MozOpacity = ".4";
		}
	}
}

function select_edition ( parent_image ) {
	//curr form
	deselect_editions ();
	
	parent_image.style.filter = "alpha(opacity=100)";
	parent_image.style.MozOpacity = "1";
	
	cf = document.forms[1];
	cf.elements['editie'].value = parent_image.alt;
	
}
