function formHandler()
{
var URL = document.form.neighbourhood.options[document.form.neighbourhood.selectedIndex].value;
window.location.href = URL;
}

function enpic(url,wid,hei)
{
var winleft = (screen.width - wid) / 2;
var winUp = (screen.height - hei) / 2;
window.open(url,'ENPIC','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=no,width='+wid+',height='+hei+',left='+winleft+',top='+winUp+'');
}

function upload(type,log)
{
	if (type=="logo")
	{
	var mywidth=300;
	var myheight=150;
	var myscroll="no";
	}
	if (type=="descr")
	{
	var mywidth=300;
	var myheight=150;
	var myscroll="no";
	}
	if (type=="gallery")
	{
	var mywidth=320;
	var myheight=300;
	var myscroll="yes";
	}
var winleft = (screen.width - mywidth) / 2;
var winUp = (screen.height - myheight) / 2;
window.open('http://www.nabernet.com/mainfiles/imageupload.php?type='+type+'&log='+log+'','IU','toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars='+myscroll+',width='+mywidth+',height='+myheight+',left='+winleft+',top='+winUp+'');
}

function clearIt(theText)
{
if (theText.value == theText.defaultValue) {theText.value = ""}
}

function coupon(cnum)
{
var wid=500;
var hei=350;
var winleft = (screen.width - wid) / 2;
var winUp = (screen.height - hei) / 2;
window.open('coupon.php?id='+cnum+'','COU','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width='+wid+',height='+hei+',left='+winleft+',top='+winUp+'');
}
function formatText (tag,type)
{
var selectedText = document.selection.createRange().text; 
	if (selectedText != "")
	{
		if (type == "short")
		{
		var newText = "[" + tag + "]" + selectedText + "[/" + tag + "]"; 
		document.selection.createRange().text = newText;
		} else {
		var newText = "[" + tag + "]" + selectedText + "@@text[/" + tag + "]"; 
		document.selection.createRange().text = newText;
		}
	}
}