/* Function that does image swapping */
function image_rollover(image_name, image_source)
	{
	if(document.images)
		{
		document[image_name].src = image_source
		}
	return true;
	}

/* Functions that handle preload. */
function MM_preloadImages() { //v3.0
var d=document; 

if(d.images) { 
	if(!d.MM_p) d.MM_p=new
	Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
	for(i=0; i<a.length; i++)
	   if (a[i].indexOf("#")!=0) { 
	   	d.MM_p[j]=new Image;
		d.MM_p[j++].src=a[i];}}
	}

/* Function to check guestbook form */
function isFormComplete () {
if ( stripSpaces ( document.guestbookForm.nume.value ) == '' ) {
	alert ( 'Va rugam introduceti numele. Multumim!' );
	return false;
	}

if ( stripSpaces ( document.guestbookForm.comentarii.value ) == '' ) {
	alert ( 'Va rugam adaugati comentariul dumneavostra. Multumim!' );
	return false;
	}

// if we get here, we're okay
return true;
}

/* Auxiliary function to strip spaces from entries */
function stripSpaces ( x ) {
      while (x.substring(0,1) == ' ') x = x.substring(1);
      return x;
}

function popUp ( fileIn ) {
popUpWin=window.open ( fileIn, '', 'scrollbars=no,width=250,height=275' );
}

