		
//myField accepts an object reference, myValue accepts the text strint to add
function insertAtCursor(myField, myValue) {
	//IE support
	if (document.selection) {
		myField.focus();

		//in effect we are creating a text range with zero
		//length at the cursor location and replacing it
		//with myValue
		sel = document.selection.createRange();
		sel.text = myValue;
		}

	//Mozilla/Firefox/Netscape 7+ support
	else if (myField.selectionStart || myField.selectionStart == '0') {

		//Here we get the start and end points of the
		//selection. Then we create substrings up to the
		//start of the selection and from the end point
		//of the selection to the end of the field value.
		//Then we concatenate the first substring, myValue,
		//and the second substring to get the new value.
		var startPos = myField.selectionStart;
		var endPos = myField.selectionEnd;
		myField.value = myField.value.substring(0, startPos)+ myValue+ myField.value.substring(endPos, myField.value.length);
	} else {
		myField.value += myValue;
	}
}



function writeCookie() {
	var delay = new Date("December 31, 2023");
	var delay = delay.toGMTString();
	document.cookie="screenWidth=" + screen.width + ";expires=" + delay;
	document.cookie="screenHeight=" + screen.height + ";expires=" + delay;
	document.cookie="screenDepth=" + screen.colorDepth + ";expires=" + delay;
}




 
function popGallery(align){
	popup = window.open("pop_gallery.php?align="+align, "popgallery", "height=700,width=920,resizable=yes,scrollbars=yes,left=100,top=100");
}

function popLink(){
	popup = window.open('pop_link.php', 'poplink','height=100,width=200,resizable=no,left=100,top=100,scrollbars=no,toolbar=no,status=no');
}

