/**
 *
 */
showing = false;

/**
 * easier access to elements
 **/
function getel(obj_id){
	return document.getElementById(obj_id);
}


function yousure(id){
	getel('deletepage-'+id).style.display='none';
	getel('yousure-'+id).style.display='block';
}

function showsub(id){
	getel('sub_'+id).style.display='block';
}

function thumbup(id){
    getel(id).style.display='block';
}

function thumbout(id){
    getel(id).style.display='none';
}

function stylein(id){
    getel("row_"+id).style.backgroundColor='#333333';
    getel("item_"+id).style.backgroundColor='#333333';
}

function styleout(id){
    getel("row_"+id).style.backgroundColor='#222222';
    getel("item_"+id).style.backgroundColor='#222222';
}

function votenow(id){
// 	alert('voted: '+id);
	getel('votenow').innerHTML = "Thanks for voting";
	return false;
}

function updatefield(field, value){
	// alert(value);
	getel(field).innerHTML = value;
}


function setwarning(type){
	if(type == 'ritv'){
		getel('ritv_warning').innerHTML = "RI TV Galleries only appear in the RI TV section";
	} else {
		getel('type_warning').innerHTML = "This isn't changeable, are you sure?";	
	}
}


function selectall(field){
	var nodes = glow.dom.get(".checkme");
	nodes.attr("checked", true);
}
function deselectall(field){
	var nodes = glow.dom.get(".checkme");
	nodes.attr("checked", false);
}

function setvar(field){
	var nodes = glow.dom.get(".checkme");
	nodes.attr("value", field);
	document.doupdate.submit();
}

function overmode(mode){
	glow.dom.get("#video_player").css("display", mode);
}

function overnav(){
	overmode("none");
	
	thetime = new Date();
	changed = thetime.getTime();
}

function outnav(){
	newtime = new Date();
	changer = newtime.getTime();
	
	if((changer - changed) > 1000){
		overmode("block");
	} else {
		setTimeout('outnav()',2000);
	}
		
}




