function NoLoginFunction() {
	
}
NoLoginFunction.prototype = new DXMLHttpRequestShell();
NoLoginFunction.constructor = NoLoginFunction;
NoLoginFunction.prototype.onLoad = function() {
		result = this.getResponseText(); 

    if (result == "OK") {
		if(action == "mail") {
			window.location = BASE_URL + dataProvider.vendorId + "/newmail.html"
		} else if (action == "favorite") {
			this.fastGetUrl(BASE_URL + dataProvider.vendorId + "/addcustomerfavorites.html");
			window.location = BASE_URL + "favorites-couples.html"
		} else if(action == "note") {
			window.location = BASE_URL + activeCategory + "/addnote.html"
		} else if(action == 'report') {
			alert('Thank you for your REPORT message.\nWe will investigate promptly');
		} else {
			window.location = BASE_URL + "login-vendors.html";
		} 
	} else if(result == "exist") {
		alert('You have already REPORTED this user.');
    } else {
    	this.ErrorMessage('Invalid username or password!');
    }
}
NoLoginFunction.prototype.send = function() {
    this.init();

    uname = document.getElementById("idname").value;
    passwd =  document.getElementById("idpass").value;
    
    if( uname == "" || passwd == "") {
    	this.clear();
		document.getElementById("trname").style.color="#DA1347";
		document.getElementById("trpasswd").style.color="#DA1347";
		document.getElementById("aMsg").innerHTML = 'All fields are required!';
    	return;
    } else {
    	document.getElementById("trname").style.color="";
   		this.fastPostUrl("nologin.html", "username=" + uname + "&pass=" + passwd);
   	}
}
NoLoginFunction.prototype.clear = function() {
    	document.getElementById("idname").value = "";
    	document.getElementById("idpass").value = "";		
		
}
NoLoginFunction.prototype.clearClose = function(msg) {
		document.getElementById("loginRequired").style.display = "none";
		if (document.getElementById("vendorsGalleryPane").style.height != "460px") {
			document.getElementById("Zoom").style.visibility = "visible";
		}
		document.getElementById("trname").style.color="";
		document.getElementById("trpasswd").style.color="";
		document.getElementById("aMsg").innerHTML = "";
		document.getElementById("upload").style.display = "none";
		resizeHandler.openWindow = false;
		document.getElementById("flashPlayer").style.visibility = "visible";	
		document.getElementById("message").value = "I found this while doing some wedding research.  Check it out:";
}
NoLoginFunction.prototype.SendReport = function() {
	if(confirm('Are you sure you want to REPORT this user?')) {
		this.init();
		this.fastGetUrl(BASE_URL + dataProvider.vendorId + "/userreport.html")
	}
}
NoLoginFunction.prototype.ErrorMessage = function(msg) {
	document.getElementById("aMsg").innerHTML = msg;
	this.clear();
}
NoLoginFunction.prototype.CloseShareWin = function() {
	resizeHandler.openWindow = false;
	document.getElementById("flashPlayer").style.visibility = "visible";
	if (document.getElementById("vendorsGalleryPane").style.height != "460px") {
		document.getElementById("Zoom").style.visibility = "visible";
	}
	shareWin.close();
	document.getElementById("sMsg").innerHTML = "";
	document.getElementById("upload").style.display = "none";
	document.getElementById("message").value = "I found this while doing some wedding research.  Check it out:";
}
function alertMessage(whoMessage) {
	resizeHandler.openWindow = true;
   	document.getElementById("upload").style.display = "inline";
   	document.getElementById("Zoom").style.visibility = "hidden";
   	resizeHandler.setNewTransparentCoordinate();
   	if(whoMessage == 1) {
   		loginRequiredWin.open();
   		resizeHandler.selectWindow = 1;
   	} else if(whoMessage == 2) {
   		shareWin.open();
   		resizeHandler.selectWindow = 2;
   	}
   	resizeHandler.setNewWindowCoordinates();
}

