/* CMCD js include, mark two 0901 d3/tb */

/* image preloads for nav rollovers */

foo0=new Image(); foo0.src="img/button_arrow_on.gif";
foo1=new Image(); foo1.src="img/nav_lightbox_on.gif";
foo2=new Image(); foo2.src="img/nav_account_on.gif";
foo3=new Image(); foo3.src="img/nav_about_on.gif";

/* form handling */

function formSubmit(which) {
document.which.submit();
}

function selectAll() {
// document.selected_items.action='lightbox.html'; don't know what the back end is - may post to somewhere else

    for (i=0,n=document.selected_items.elements.length;i<n;i++) {
        if (document.selected_items.elements[i].name.indexOf('item') !=-1)
            document.selected_items.elements[i].checked = true;
	}		
}

function clearAll() {
 	
    for (i=0,n=document.selected_items.elements.length;i<n;i++) {
	
        if (document.selected_items.elements[i].name.indexOf('item') !=-1)
            document.selected_items.elements[i].checked = false;
	}
}	

function deleteSelected() {

document.selected_items.action='delete_all.html'; // don't know what the back end is - may post to somewhere else
formSubmit('selected_items');
}

function createCD() {

document.selected_items.action='create_CD.html'; // don't know what the back end is - may post to somewhere else
formSubmit('selected_items');
}


/* rollovers */

function rollOn(which) {
document.images[which].src="img/" + which + "_on.gif";
}

function rollOff(which) {
document.images[which].src="img/" + which + "_off.gif";
}

function iconOn(which,what) {
document.images[which].src="img/icon_" + what + "_on.gif";
}

function iconOff(which,what) {
document.images[which].src="img/icon_" + what + "_off.gif";
}

function ppop(url,w,h,scroll){

popUp=window.open(url,"title","resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars="+ scroll + ",copyhistory=0,width=" + w + ",height=" + (h + 30) + "");

popUp.focus();

}


