function show_indicator(){
$('indicator').style.display = 'block';
return true;
}

function hide_indicator(){
$('indicator').style.display = 'none';
return true;
}

function hide_element(id) {
$(id).style.display = 'none';
return true;
}

function show_element(id) {
$(id).style.display = 'block';
return true;
}

function image_swap(img_id, img_src){
	img = document.getElementById(img_id);
	img.src = img_src;
	return true;
}

function resize_popup2image() {
  if (document.images[0].src) {
  var imgHeight = document.images[0].height+65;
  var imgWidth = document.images[0].width+30;
  var height = screen.height;
  var width = screen.width;
  var leftpos = width / 2 - imgWidth / 2;
  var toppos = height / 2 - imgHeight / 2; 
  window.moveTo(leftpos, toppos);  
  window.resizeTo(imgWidth, imgHeight);
  }
  self.focus();
}

function dontSubmitOnEnter(event) {
	return !(event.which == 13);	
}

function pausecomp(millis)
{
var date = new Date();
var curDate = null;

do { curDate = new Date(); }
while(curDate-date < millis);
} 

var allPageTags = new Array(); 
function hideFlash()
{
     var theClass = 'message';
     var allPageTags=document.getElementsByTagName("div");
  
     for (i=0; i<allPageTags.length; i++)
     {
         if (allPageTags[i].className==theClass)
         {
// 				
// 				alert(allPageTags[i]);
				var id = "message_to_dropuot";
				allPageTags[i].id = id;
// 				new Effect.DropOut(allPageTags[i]); 
				new Effect.Pulsate(allPageTags[i]);
				window.setTimeout("new Effect.Fade('"+(allPageTags[i].id)+"')", 5000);
				
         }
     }

//document.getElementById('flashMessage').style.display= 'none';

}

function getDateFromDateFields(prefix){
el = $(prefix+'Day');
day = el.options[el.selectedIndex].value;
el = $(prefix+'Month');
month = el.options[el.selectedIndex].value-1;
el = $(prefix+'Year');
year = el.options[el.selectedIndex].value;

date = new Date();
if( day!='' && month!='' && year!='') {
	date.setDate(day);
	date.setMonth(month);
	date.setFullYear(year);
}

// alert(date);

return date;
}

function updateDateFields(prefix, day, month, year){
el = $(prefix+'Day');
for(i=0; i<el.options.length; i++) if(el.options[i].value == day) el.selectedIndex = i;
el = $(prefix+'Month');
for(i=0; i<el.options.length; i++) if(el.options[i].value == month) el.selectedIndex = i;
el = $(prefix+'Year');
for(i=0; i<el.options.length; i++) if(el.options[i].value == year) el.selectedIndex = i;
return true;
}


