function loaders() {
	
}

////////////////////////////////////////////////////////////////

function toggleElementDisplay(id,display) {
	var vis = document.getElementById(id);
	vis.style.display = display;
}

function restore_orig() {
	toggleElementDisplay('pb_page_choose_new','none');
	toggleElementDisplay('pb_page_choose','block');
	toggleElementDisplay('pb_page_blocks','none');
	toggleElementDisplay('pb_edit_block','none');
	makeAjaxRequest('pb_upload.php','','pb_iframe');
	toggleElementDisplay('pb_edit_photo','none');
	return false;
}

function image_popup(url,block_id) {
	pop = open(url + block_id,'image_preview','width=400,height=400');
	pop.focus();
	return false;
}


/////////////////////////////////////////////////////////////////////

function statepopup(state_url,long_link_abbr,state_abbr) {
	toggleElementDisplay('state_popup','block');
	toggleElementDisplay(long_link_abbr + '_popup','none');
	//sp = document.getElementById('state_popup');
	makeAjaxRequest('../php_scripts/state_popup.php','?state_url=' + state_url + '&sn=' + state_abbr + '&idname=' + long_link_abbr,'state_popup');
	return false;
}

function corr_hover(state_abbr,x,y) {
	document.getElementById(state_abbr).style.background = "transparent url(../images/states/" + state_abbr + ".gif) no-repeat -" + x + "px -" + y + "px";
}

function corr_unhover(state_abbr) {
	document.getElementById(state_abbr).style.backgroundImage = "";
}




//////////////////////////////////////////////////////////////////////

function getCursorPosition() {
  if (window.Event) {
    document.captureEvents(Event.MOUSEMOVE);
  }
  document.onmousemove = getXY;
}

function getXY(e) {
	x = (window.Event) ? e.pageX : event.clientX;
	y = (window.Event) ? e.pageY : event.clientY;
	document.getElementById('state_popup').style.top = y;
	document.getElementById('state_popup').style.left = x;
}