function cont_ml()
{
	var string1 = ":trave";
	var string2 = "ller";
	var string3 = "be";
	var string4 = "st-st";
	var string5 = "ays.c";
	var string6 = string1 + string2 + "@" + string3 + string4 + string5 + "om";
	var string7 = "mai";
	var string8 = "Cont";
	document.write("<a href=" + string7 + "lto" + string6 + " title=\"Contact\">" + string8 + "act</a>");
}

function setlogin(un, error){
	if (!error){
		error = '';
	}
	if (un){
		un1 = un;
		un2 = un;
	}else{
		un1 = 'user name';
		un2 = '';
	}
	
	document.getElementById('login_place').innerHTML = '\
		<b>Login:</b><br />\
		<form id="li1" name="li1" action="" method="POST">\
			<span id="login_msg" style="color: #880000;">' + error + '</span>\
			<div>\
				<input id="user1" type="text"                 value="' + un1 + '" style="width: 126px; color: #888888;" />\
				<input id="user2" type="text"     name="user" value="' + un2 + '" style="width: 126px; color: #000000;" />\
				<input id="pw1"   type="text"                 value="password"    style="width: 126px; color: #888888;" />\
				<input id="pw2"   type="password" name="pw"                       style="width: 126px; color: #000000;" />\
				<input type="hidden" name="action" value="login">\
				<img src="artwork/spacer.gif" width="1" height="4" /><br />\
				<input type="button" value="cancel" onclick="setmenu();" style="width: 63px">\
				<input type="submit" value="submit" style="width: 63px">\
			</div>\
		</form>\
	';

	inp1=document.li1.user2;
	inp1.className='hide';
	inp2=document.li1.pw2;
	inp2.className='hide';
	document.li1.user1.onfocus=function() {
		this.value='';
		this.className='hide';
		inp1.className='';
		inp1.focus();
	}
	document.li1.pw1.onfocus=function() {
		this.value='';
		this.className='hide';
		inp2.className='';
		inp2.focus();
	}
}

function setmenu(){
	var string1 = ":trave";
	var string2 = "ller";
	var string3 = "be";
	var string4 = "st-st";
	var string5 = "ays.c";
	var string6 = string1 + string2 + "@" + string3 + string4 + string5 + "om";
	var string7 = "mai";
	var string8 = "Cont";
	document.getElementById('login_place').innerHTML = '\
		<b>\
		<a href="index.php" title="Home">Home</a><br />\
		<a href="search.php" title="Search for a stay">Search</a><br />\
		<span onMouseOver="this.style.cursor=\'pointer\';" onclick="setlogin();" title="Login" style="color: #880000;">Login</span>\
		/ <a href="register.php" title="Register">Register</a><br />\
		<a href="ingest.php" title="Insert a nice place">Insert a nice place</a><br />\
		<a href="donate.php" title="Become a sponsor">Become a sponsor</a><br />\
		<a href=' + string7 + 'lto' + string6 + ' title="Contact">' + string8 + 'act</a><br />\
		</b>\
		<img src="artwork/spacer.gif" width="1" height="10" /><br />\
		<span style="font-size: 10px; text-align: center;">a <a href="http://wiels.com/" target="extern">wiels.com</a> product</span>\
	';
}

function changeInputType(oldObject, oType) {
  var newObject = document.createElement('input');
  newObject.type = oType;
  if(oldObject.style.width) newObject.style.width = oldObject.style.width;
  if(oldObject.value) newObject.value = oldObject.value;
  if(oldObject.name) newObject.name = oldObject.name;
  if(oldObject.id) newObject.id = oldObject.id;
  if(oldObject.className) newObject.className = oldObject.className;
	newObject.style.color='000000';
  oldObject.parentNode.replaceChild(newObject,oldObject);
  return newObject;
}

function changeConfirmAction(url) {
    document.confirm_form.action = url;
}

function confirmSubmit (text)
{
	var agree = confirm (text);
	if (agree)
		return true ;
	else
		return false ;
}
