var newwindow;

function popup_window(url,name)
{
	newwindow=window.open(url,name,'height=400,width=400');
	if (window.focus) {newwindow.focus()}
}

function show_hide(id)
{
	if (document.getElementById)
	{
		obj = document.getElementById(id);
		if (obj.style.display == "block" || obj.style.display == "")
		{
			obj.style.display = "none";
		}
		else
		{
			obj.style.display = "block";
		}
	}
}

function show(id)
{
    if (document.getElementById)
    {
        obj = document.getElementById(id);
        obj.style.display = "block";
    }
}

function hide(id)
{
    if (document.getElementById)
    {
        obj = document.getElementById(id);
        obj.style.display = "none";
    }
}

function setcookie(c_name,value,expiredays)
{
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+
	((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function clear_text(id,original_text)
{
	if (document.getElementById)
	{
		obj = document.getElementById(id);
		if (obj.value == original_text)
		{
			obj.value = "";
		}
	}
}

function default_text(id,original_text)
{
	if (document.getElementById)
	{
		obj = document.getElementById(id);
		if (obj.value == "")
		{
			obj.value = original_text;
		}
	}
}

function text_colour(id,new_colour,original_colour,original_text)
{
	if (document.getElementById)
	{
		obj = document.getElementById(id);
		if (obj.value == original_text)
		{
			obj.style.color = original_colour;
		}
		else
		{
			obj.style.color = new_colour;
		}
	}
}

function change_frame_url(frame_name,url)
{
	alert("rar");
	parent.functionality_area.location.href = url;
}