	function viewLink(linkId)
	{
		link = document.getElementById(linkId);
		linkValue = link.value;
		window.open(linkValue);
	}

	function addAssociations()
	{
		frm = document.getElementById("profile");
		num = document.getElementById("additionals").value;
		num++;

		br = document.createElement("br");
		lbl = document.createElement("label");
		lbl.appendChild(document.createTextNode("Name"));
		lbl.className = "mediumLabel";
		
		input = document.createElement("input");
		input.setAttribute("name","additional" + num);
		input.setAttribute("type","text");
		

		document.getElementById('otherA').appendChild(br);
		document.getElementById('otherA').appendChild(lbl);
		document.getElementById('otherA').appendChild(input);

		lbl = document.createElement("label");
		lbl.appendChild(document.createTextNode(" Website"));
		lbl.className = "mediumLabel";
		
		input = document.createElement("input");
		input.setAttribute("name","additionalWebsite" + num);
		input.setAttribute("type","text");
	
		document.getElementById('otherA').appendChild(lbl);
		document.getElementById('otherA').appendChild(input);

		document.getElementById("additionals").value = num;
		
		return false;
	}

	function alertUser(elem)
	{
		if(elem.checked)
		{
			alert("By selecting Yes, you agree to use one of your credits and publish this listing on Inns.net\nIf you want to save your progress and not publish the listing change your selection to No.");
		}
	}
	
	function getPageSize()
	{
		var viewportwidth;
		var viewportheight;
		 
		// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
		 
		if (typeof window.innerWidth != 'undefined')
		{
		viewportwidth = window.innerWidth,
		viewportheight = window.innerHeight
		}
		 
		// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
		
		else if (typeof document.documentElement != 'undefined'
		&& typeof document.documentElement.clientWidth !=
		'undefined' && document.documentElement.clientWidth != 0)
		{
		viewportwidth = document.documentElement.clientWidth,
		viewportheight = document.documentElement.clientHeight
		}
		 
		 // older versions of IE
		 
		else
		{
		viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
		viewportheight = document.getElementsByTagName('body')[0].clientHeight
		}
		
		arrayPageSize = new Array(viewportwidth,viewportheight);
		return arrayPageSize;
	}
	
	function showFileUpload(id)
	{
		showOverlay();
		$("div#file_upload").show();
		$("div#file_upload").centerInClient();
		$("div#file_upload h1").append($("a#" + id).html());
	}
	
	function showOverlay()
	{
		
		$('#jquery-overlay').css("width",$(document).width()).css("height",$(document).height()).toggle();		
	}
	
	function hideOverlay()
	{
		$('#jquery-overlay').fadeOut("fast");
		$("#loader").fadeOut("fast");	
	}
	



