function rframe(href)
	{
	var loadwin = href;
	frames['rightFrame'].window.location = loadwin;
	};
function lframe(href)
	{
	var loadwin = href;
	frames['mainFrame'].window.location = loadwin;
	};

function ConfWindow(href,type,text)
	{
	gotoURL = '/alert.cfm?href=' + escape(href) + "&type=" + type + "&text=" + text;
	AlertPopup = window.open(gotoURL,'AlertPopup','resizable=no,toolbar=no,left=150,top=150,status=no,location=no,height=100,width=400,scrollbars=no');
	};

function LoadWindow(href,type)
	{
	var gotoURL = href;
	if(type == "right")
		{
		var framename = 'rightFrame';
		parent.rframe(gotoURL);
		}
	else if(type == "left")
		{
		parent.lframe(gotoURL);
		}
	else if(type == "right_edit")
		{
		parent.searchFrame.location.href=gotoURL;
		}
	else if(type == "left_edit")
		{
		parent.editFrame.location.href=gotoURL;
		}
	else if(type == "right_frame")
		{
		parent.rightFrame.location.href=gotoURL;
		}
	};

	
function editwindow(myurl)
	{
	popup(myurl,945,574,'Yes');
	};
function cropwindow(myurl)
	{
	popup(myurl,750,450,'No');
	};
function bustOut(myhref)
	{
	if(parent.frames.length!=0)
		{
			window.top.location.href=myhref;
		}
	};
function jumpMe(href)
	{
		this.window.location.href=href;
	};
// call this function by
// DeleteConfirm(formname,'text of what you are deleting');
// <input type="Button" value="Delete Image" class="form-button" onclick="DeleteConfirm(imageform,'image')">
function DeleteConfirm(form,item)
	{
	var showtext = "Are you sure that you want to\nDELETE this" + item + "?";
	var praction = window.confirm(showtext);
	if (praction == true)
		{
		form.IsActive.value = 0;
		sform(form);
		}
	};
function sform(form)
	{
	form.submit();
	};
function parentRefresh()
	{
	var pageLoad = top.opener.location.href;
	d = new Date();
	if (top.opener.location.search.length>1)
		{
		top.opener.location.href=pageLoad+'&'+d.getSeconds();
		}
	else top.opener.location.href=pageLoad+'?'+d.getSeconds();
	//this path would have worked as well for the edit window:
	//top.opener.top.bottom.mainFrame.location.href=top.opener.top.bottom.mainFrame.location.href;

	}
	

	function getUrl(target,path,height,width,AllowScroll)
	{
		var totalA = path + " " + target;
		var totalB = target + " " + path;
		var heightPX = height + "px";
		var widthPX = width + "px";
		
		// Targets the IFrame
		if (target == 'iframe')
			{
			document.workspace.location.href = path;
			}
		else if (target == 'modal')
			{
			LaunchModalPopup(path,heightPX,widthPX,AllowScroll);
			}
		else
			{
			alert('No Target Specified')
			}
	};
	
	function LaunchModalPopup(modalUrl,heightPX,widthPX,AllowScroll) {
		var modalName = 'test';
		var modalUrl;
		var modalFeatures;
		var temp;
		//modalUrl = "" ;
		modalFeatures = 'dialogHeight:' + heightPX + '; dialogWidth:' + widthPX + '; center: Yes; help: No; resizable: No; status: No; unadorned: Yes; scroll:' + AllowScroll + ';'
		modalName = window.showModalDialog(modalUrl, modalName, modalFeatures);
		// deal with the returnValue
		temp = modalName;
		if (temp == "ok") { alert('Deactive Was Hit'); } 
		else if (temp == "cancel") { alert('Cancel Was Hit'); } 
		else if (temp == "neither") { alert('The [X] Was Hit'); } 
		else if (temp == "refresh") { document.workspace.location.href = (document.workspace.location); } 
		//} 
	};


