// Grab the data from the hidden frame
// f = frame grabbing from; o = object name to grab from; t = target element to replace with content; s = show layer or not
function getContent(f,o,t,s){
	e1 = gE(o,f);
	content = e1.innerHTML;
	e = gE(t);
	e.innerHTML = '';
	e.innerHTML = content;
	if(!s || s==0) sE(e);
	return;
}

// Change title of the main page
function pageTitle(t){
	parent.document.title = t;
}

// Highlight error fields
function show_errors(){
	if( input_error.length > 1 ){
		for(i=1;i<input_error.length;i++){
			var e = gE(input_error[i]);
			e.style.background = "#E4EBF5";
			e.style.border= "1px solid #000000";
			
		}
	}
}

function debug(){
	wH(gE('Debug'),"Thumb_w: "+thumb_w+"<br>Shelf_w: "+shelf_w+"<br>Thumb_x: "+thumb_x);
}


// Grab the data from the hidden frame for the debug
// f = frame grabbing from; o = object name to grab from;
function debugConsole(o){
	e = gE(o);
	debug_code = e.innerHTML;
	debugLaunch();
}

function debugLaunch(){
	cw = "debugWindow";
	debugWindow = open('debug.php',cw,'toolbar=no,location=no,status=yes,directories=no,menubar=no,scrollbars=yes,resizable=yes,width=450,height=600,left=10,top=10');
}