function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

/*		prompts for chat	*/

//my script posting links in chat
function thePrompt()
{
	theURL = prompt('Enter the URL', 'http://');
	if (theURL != null)
	{
		theName = prompt('Now the name of the link','My Link');
		if (theName != null)
		{
			theLink = '<a href="' + theURL + '" target="_new">' + theName + '</a>';
			insertAtCursor(document.getElementById('chat_msg'), theLink);
		}
	}
}

//my script posting bold in chat
function thePromptBold()
{
	theBold = prompt('Text to be Bold', '');
	if (theBold != null)
	{
			theText = '<b>' + theBold + '</b> ';
			insertAtCursor(document.getElementById('chat_msg'), theText);
	}
}

//my script posting italics in chat
function thePromptItal()
{
	theItal = prompt('Text to be Italicized', '');
	if (theItal != null)
	{
			theText = '<i>' + theItal + '</i> ';
			insertAtCursor(document.getElementById('chat_msg'), theText);
	}
}



/*		end prompts for chat	*/

/*		prompts for comments	*/


//my script from comments posting links
function thePromptComments()
{
	theURL = prompt('Enter the URL', 'http://');
	if (theURL != null)
	{
		theName = prompt('Now the name of the link','My Link');
		if (theName != null)
		{
			theLink = '<a href="' + theURL + '" target="_new">' + theName + '</a>';
			insertAtCursor(document.getElementById('comment_comment'), theLink);
		}
	}
}

//my script posting bold in comment
function thePromptBoldComment()
{
	theBoldComment = prompt('Text to be Bold', '');
	if (theBoldComment != null)
	{
			theText = '<b>' + theBoldComment + '</b> ';
			insertAtCursor(document.getElementById('comment_comment'), theText);
	}
}

//my script posting italics in comment
function thePromptItalComment()
{
	theItalComment = prompt('Text to be Italicized', '');
	if (theItalComment != null)
	{
			theText = '<i>' + theItalComment + '</i> ';
			insertAtCursor(document.getElementById('comment_comment'), theText);
	}
}

//my script posting quote in comment
function theQuoteComment()
{
	theQuoteComment = prompt('Text to be Quoted', '');
	if (theQuoteComment != null)
	{
			theText = '<div class="quote">' + theQuoteComment + '</div> ';
			insertAtCursor(document.getElementById('comment_comment'), theText);
	}
}

//my script posting images in comment
function thePromptImageComment()
{
	theImageLocation = prompt('Where\'s the image?', 'http://');
	if (theImageLocation != null)
	{
		theName = prompt('What would you like to call the image?', 'My Pic');
		if (theName != null)
		{
			theImageComment = '<img src="' + theImageLocation + '" title="' + theName + '" alt="' + theName + '">';
			insertAtCursor(document.getElementById('comment_comment'), theImageComment);
		}
	}
}

/*		End prompts for comments		*/

/*		prompts for news		*/

//my script from news posting links
function thePromptNews()
{
	theURL = prompt('Enter the URL', 'http://');
	if (theURL != null)
	{
		theName = prompt('Now the name of the link','My Link');
		if (theName != null)
		{
			theLink = '<a href="' + theURL + '" target="_new">' + theName + '</a>';
			insertAtCursor(document.getElementById('news_news'), theLink);
		}
	}
}

//my script posting bold in news
function thePromptBoldNews()
{
	theBoldNews = prompt('Text to be Bold', '');
	if (theBoldNews != null)
	{
			theText = '<b>' + theBoldNews + '</b> ';
			insertAtCursor(document.getElementById('news_news'), theText);
	}
}

//my script posting italics in news
function thePromptItalNews()
{
	theItalNews = prompt('Text to be Italicized', '');
	if (theItalNews != null)
	{
			theText = '<i>' + theItalNews + '</i> ';
			insertAtCursor(document.getElementById('news_news'), theText);
	}
}

//my script posting quote in news
function theQuoteNews()
{
	theQuoteNews = prompt('Text to be Quoted', '');
	if (theQuoteNews != null)
	{
			theText = '<div class="quote">' + theQuoteNews + '</div> ';
			insertAtCursor(document.getElementById('news_news'), theText);
	}
}

/*		prompts for intro		*/

//my script from news posting links
function thePromptIntro()
{
	theURL = prompt('Enter the URL', 'http://');
	if (theURL != null)
	{
		theName = prompt('Now the name of the link','My Link');
		if (theName != null)
		{
			theLink = '<a href="' + theURL + '" target="_new">' + theName + '</a>';
			insertAtCursor(document.getElementById('news_intro'), theLink);
		}
	}
}

//my script posting bold in news
function thePromptBoldIntro()
{
	theText = '<b>bold</b> ';
	insertAtCursor(document.getElementById('news_intro'), theText);
}

//my script posting italics in news
function thePromptItalIntro()
{
	theText = '<i>itals</i> ';
	insertAtCursor(document.getElementById('news_intro'), theText);
}

//my script posting quote in news
function theQuoteIntro()
{
	theText = '<div class="quote">quote</div> ';
	insertAtCursor(document.getElementById('news_intro'), theText);
}

//my script posting images in comment
function thePromptImageNews()
{
	theImageLocation = prompt('Where\'s the image?', 'http://');
	if (theImageLocation != null)
	{
		theName = prompt('What would you like to call the image?', 'My Pic');
		if (theName != null)
		{
			theImageNews = '<img src="' + theImageLocation + '" title="' + theName + '" alt="' + theName + '">';
			insertAtCursor(document.getElementById('news_news'), theImageNews);
		}
	}
}


/*		End prompts for news		*/



//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;
	}
}

//limits the amount of text
function limitText(limitField, limitCount, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
	} else {
		limitCount.value = limitNum - limitField.value.length;
	}
}


function popitup(url) {
	newwindow=window.open(url,'name','height=1024,width=1280');
	if (window.focus) {newwindow.focus()}
	return false;
	}
	
	

//show hide	
function showstuff(boxid){
   document.getElementById(boxid).style.visibility="visible";
}

function hidestuff(boxid){
	//document.write(boxid);
   document.getElementById(boxid).style.visibility="hidden";
}