function updateField(fname, lname, email, phone, date, loc, hear, com)
{
    var urlToOpen =  'http://'+document.domain+'/sendmail.php?fname='+fname+'&lname='+lname+'&email='+email+'&phone='+phone+'&date='+date+'&loc='+loc+'&hear='+hear+'&com='+com;
	//http://'+document.domain+'/
	//http://localhost/melissa/
    var req;
    try {
        req=new GeckoActiveXObject("Microsoft.XMLHTTP");
    } catch (e) {
        try {
            req=new ActiveXObject("Microsoft.XMLHTTP");
        } catch (oc) {
            req=null;
        }
    }
    if(!req && typeof XMLHttpRequest != "undefined")
        req = new XMLHttpRequest();
    if (!req)
        alert("Could not create connection object.");
    try
    {
        req.onreadystatechange = function(){
            if (req.readyState == 4)
            {
                if (req.status == 200) {
                    response=req.responseText; //aici facem prelucrarea
                    document.getElementById('msg').innerHTML = response;
					//clear fields
					if (response == "Your email has been sent!") {
					/*set('fname','');
					set('lname','');
					set('email','');
					set('phone','');
					set('date','');
					set('loc','');
					set('hear','');
					set('com','');*/
					hide('fields');
					}
                } else {
                    alert(urlToOpen+' '+req.status+' There was a problem with the request.');
                }
            }
        };
        req.open('GET', urlToOpen, true);
        req.setRequestHeader('If-Modified-Since', 'Wed, 15 Nov 1995 00:00:00 GMT');
        req.send(null);
        //document.write(urlToOpen);
    }
    catch(ex)
    {
        alert('Ex ' + ex.name + " - " + ex.message);
    }
}

var useBSNns;

if (useBSNns)
{
	if (typeof(bsn) == "undefined")
		bsn = {}
	var _bsn = bsn;
}
else
{
	var _bsn = this;
}



// Constructor

_bsn.Crossfader = function (divs, fadetime, delay )
{	
	this.nAct = -1;
	this.aDivs = divs;
	
	for (var i=0;i<divs.length;i++)
	{
		document.getElementById(divs[i]).style.opacity = 0;
		document.getElementById(divs[i]).style.position = "absolute";
		document.getElementById(divs[i]).style.filter = "alpha(opacity=0)";
		document.getElementById(divs[i]).style.visibility = "hidden";
	}
	
	this.nDur = fadetime;
	this.nDelay = delay;

	this.stopPending = false;
	this.stopped = false;
		
	this._newfade();
}

// Public methods

_bsn.Crossfader.prototype.StopStart = function()
{
	if (this.stopped || this.stopPending)
	{
		document['stopper'].src='images/stop.gif';
		this.stopPending = false;
		this._newfade();
	}
	else 
	{
		document['stopper'].src='images/start.gif';
		this.stopPending = true;
	}
}

_bsn.Crossfader.prototype.StopFade = function()
{
	if (this.stopped || this.stopPending)
	{
		return;
	}
	this.stopPending = true;
	document['stopper'].src='images/start.gif';
}

_bsn.Crossfader.prototype.StartFade = function()
{
	document['stopper'].src='images/stop.gif';
	if (this.stopPending)
	{
		this.stopPending = false; // Cancel pending stop
		return;
	}
	else if (!this.stopped)
	{
		return;
	}
	this._newfade();
}

_bsn.Crossfader.prototype.SetFade = function(newFade)
{
	newFade = parseFloat(newFade);
	if (isNaN(newFade))
	{
		return "Value provided for new fade time must be numeric";
	}
	if (newFade < 0)
	{
		return "Value provided for new fade time cannot be negative";
	}

	this.StopFade();
	this.nDur = newFade * 1000;
	this.StartFade();
	return "";
}

_bsn.Crossfader.prototype.SetDelay = function(newDelay)
{
	newDelay = parseFloat(newDelay);
	if (isNaN(newDelay))
	{
		return "Value provided for new display time must be numeric";
	}
	if (newDelay <= 0)
	{
		return "Value provided for new display time must be greater than zero";
	}

	this.StopFade();
	this.nDelay = newDelay * 1000;
	this.StartFade();
	return "";
}

// Private methods

_bsn.Crossfader.prototype._newfade = function()
{
	if (this.nID1)
		clearInterval(this.nID1);

	if (this.stopPending)
	{
		this.stopPending = false;
		this.stopped = true;
		return;
	}
	this.stopped = false;
	
	this.nOldAct = this.nAct;
	this.nAct++;
	if (!this.aDivs[this.nAct])	this.nAct = 0;
	
	if (this.nAct == this.nOldAct)
		return false;
	
	document.getElementById( this.aDivs[this.nAct] ).style.visibility = "visible";
	
	this.nInt = 50;
	this.nTime = 0;
	
	var p=this;
	this.nID2 = setInterval(function() { p._fade() }, this.nInt);
}

_bsn.Crossfader.prototype.next = function()
{
	if (this.nID1)
		clearInterval(this.nID1);

	this.stopPending = true;
	
	document['stopper'].src='images/start.gif';
	
	this.nOldAct = this.nAct;
	this.nAct++;
	if (!this.aDivs[this.nAct])	this.nAct = 0;
	
	if (this.nAct == this.nOldAct)
		return false;
	
	document.getElementById( this.aDivs[this.nAct] ).style.visibility = "visible";
	
	this.nInt = 50;
	this.nTime = 0;
	
	var p=this;
	this.nID2 = setInterval(function() { p._fade() }, this.nInt);
	this.StopFade();
}

_bsn.Crossfader.prototype.previous = function(limit)
{
	if (this.nID1)
		clearInterval(this.nID1);

	this.stopPending = true;
	
	document['stopper'].src='images/start.gif';
	
	this.nOldAct = this.nAct;
	this.nAct--;
	if (!this.aDivs[this.nAct])	this.nAct = limit-1;
	
	if (this.nAct == this.nOldAct)
		return false;
	
	document.getElementById( this.aDivs[this.nAct] ).style.visibility = "visible";
	
	this.nInt = 50;
	this.nTime = 0;
	
	var p=this;
	this.nID2 = setInterval(function() { p._fade() }, this.nInt);
	this.StopFade();
}

_bsn.Crossfader.prototype._fade = function()
{
	this.nTime += this.nInt;
	
	var ieop = Math.round( this._easeInOut(this.nTime, 0, 1, this.nDur) * 100 );
	var op = ieop / 100;
	document.getElementById( this.aDivs[this.nAct] ).style.opacity = op;
	document.getElementById( this.aDivs[this.nAct] ).style.filter = "alpha(opacity="+ieop+")";
	
	if (this.nOldAct > -1)
	{
		document.getElementById( this.aDivs[this.nOldAct] ).style.opacity = 1 - op;
		document.getElementById( this.aDivs[this.nOldAct] ).style.filter = "alpha(opacity="+(100 - ieop)+")";
	}
	
	if (this.nTime == this.nDur)
	{
		clearInterval( this.nID2 );
		
		if (this.nOldAct > -1)
			document.getElementById( this.aDivs[this.nOldAct] ).style.visibility = "hidden";	
		
		var p=this;
		this.nID1 = setInterval(function() { p._newfade() }, this.nDelay);
	}
}

_bsn.Crossfader.prototype._easeInOut = function(t,b,c,d)
{
	return c/2 * (1 - Math.cos(Math.PI*t/d)) + b;
}

function show(name) {
	document.getElementById(name).style.visibility = "visible";
}

function hide(name) {
	document.getElementById(name).style.visibility = "hidden";
}

function get(name) {
	return document.getElementById(name).value; 
}

function set(name, val) {
	document.getElementById(name).value=val; 
}

/* 'A Better Mouse Trap' copy prevention script (c) 2004 
Concho Software - San Angelo, TX USA http://copy-not.com 
also available at http://www.isdntek.com This script is free.
Do not remove this notice! */ 
function copyNotS(){ for(im in document.images){ 
if(document.images[im].src){ if
(document.images[im].src.indexOf("http://www.melissafullerimages.com")>=0){ 
document.images[im].galleryimg="no"; 
document.images[im].onmousedown=function(){return false}; 
document.images[im].ondrag=function(){return false}; 
document.images[im].oncontextmenu=function(){return false} 
}}}} setTimeout("copyNotS()",200);