function unHide(sWap) {
	document.a.src = sWap;
	aDiv.style.display = "block";
	bDiv.style.display = "none";
}
function reHide() {
	document.a.src = "images/spacer.gif";
	bDiv.style.display = "block";
	aDiv.style.display = "none";
}
function display(port) {
	document.a.src = "portfolio/" + port + "_mid.jpg";
}
function displayObj(port) {
	document.a.src = "audio_video/" + port;
}
function popItem(iImg) {
	window.open("itemPop.php?image="+iImg,"thewindow","toolbar=no,width=640,height=560,status=no,scrollbars=no,resizable=0,menubar=no,xpos=20,ypos=20,top=20,left=20,bgcolor=000000");
}	
function popObj(newObj) {
	window.open("objectPop.php?file="+newObj,"thewindow","toolbar=no,width=610,height=480,status=no,scrollbars=no,resizable=0,menubar=no,xpos=20,ypos=20,top=20,left=20,bgcolor=000000");
}	
function sortMe(artSort) {
	sortThing = "admin.php?Action=articleList&articleSort=" + artSort.options[artSort.selectedIndex].value;
	document.location.href  = sortThing;
}

function sortPage(pSort) {
	sortThing2 = "admin.php?Action=articleList&pageSort=" + pSort.options[pSort.selectedIndex].value;
	document.location.href  = sortThing2;
}

function logIn(){
window.open('login.php','LOGIN',"status=no,toolbar=no,location=no,menu=no,scrollbars=no,width=200,height=150,left=200,top=200");
}

function getBig(evt) 	{
	txtName = evt.name;
	evt.rows = "6";
	bttns = "B"+txtName;
	bEle = document.getElementById(bttns);
	bEle.style.visibility = "visible";
}

function getSmall(evt) {
	goNow();
	evt.rows = "2";
}

function goNow() {
		bttns = "B"+txtName;
		bEle = document.getElementById(bttns);
		bEle.style.visibility = "hidden";
		}
		
function markSelection ( txtObj ) {
	if ( txtObj.createTextRange ) {
		txtObj.caretPos = document.selection.createRange().duplicate();
		isSelected = true;
	}
}

function insertTag (tag) {
	if ( isSelected ) {
		var txtObj = eval ( "document.forms[0]." + txtName );
		if (txtObj.createTextRange && txtObj.caretPos) {
			var caretPos = txtObj.caretPos;
				if ( txtObj.caretPos.text !='' ) {
					caretPos.text = "<"+tag+">"+caretPos.text+"<\/"+tag+">";
					txtObj.focus();
				} else {
					txtObj.focus();
				}
		}
	}
}

function loginFocused() {
	document.login.UID.focus()
}
