function popup(url, name, width, height) {
	settings=
	"toolbar=no,location=no,directories=no,"+
	"status=no,menubar=no,scrollbars=yes,"+
	"resizable=yes,width="+width+",height="+height+""
	MyNewWindow=window.open(url,name,settings);
}

// Insert Smiles to text box
function x () {
	return;
}

function DoSmilie(addSmilie) {
	var addSmilie;
	var revisedMessage;
	var currentMessage = document.shoutform1.ShoutComment.value;
	revisedMessage = currentMessage+addSmilie;
	document.shoutform1.ShoutComment.value=revisedMessage;
	document.shoutform1.ShoutComment.focus();
	return;
}

//Drop-Down menu functions
function MM_findObj(n, d) {
	var p,i,x;
	if(!d) d=document;
	if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document;
		n=n.substring(0,p);
	}
	if(!(x=d[n])&&d.all) {
		x=d.all[n];
	}
	for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) {
		x=d.getElementById(n);
	}
	return x;
}

function MM_swapImage() {
	var i,j=0,x,a=MM_swapImage.arguments;
	document.MM_sr=new Array;
	for(i=0;i<(a.length-2);i+=3) {
	if ((x=MM_findObj(a[i]))!=null) {
		document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
	} }
}

function expand(listID) {
	if (listID.style.display == "none") {
		listID.style.display = "";
	}
	else {
		listID.style.display = "none";
	}
	window.event.cancelBubble = true;
}

function contract(listID) {
	if (listID.style.display == "show") {
		listID.style.display = "";
	}
	else {
		listID.style.display = "none";
	}
	window.event.cancelBubble = true;
}

//end Drop-Down menu functions

/*
Original Javascript code by dynamic drive.
Modified javascript code by SuperCat http://www.ourscripts.net
Special thanks to Dilandou for helping me with the PHP and JS mixing.
Cross browser Marquee II- ¿ Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS, visit http://www.dynamicdrive.com
Credit MUST stay intact
*/

// Start edit speed settings

var scrollinterval=35; // Specify the refresh rate. This affects speed too. Larger is slower.
var pauseit=1; //Pause marquee onmousever of text area (0=no. 1=yes)?

// End edit speed and size settings

////NO NEED TO EDIT BELOW THIS LINE////////////

var marqueespeed=1; // Specify speed (larger is faster 1-10) This is the amount of pixel movement per refresh. 1 is best for smoothness.
marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1); //slow speed down by 1 for NS
var copyspeed=marqueespeed;
var pausespeed=(pauseit==0)? copyspeed: 0;
var iedom=document.all||document.getElementById;
var actualheight='';
var cross_marquee, ns_marquee;

function scrollup(){
	copyspeed=marqueespeed+3;
}
function scrolldoubledown(){
	copyspeed=marqueespeed-5;
}

var txt='';
if (iedom||document.layers){
	with (document){
		if (iedom){
			txt+='<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden" onmouseover="copyspeed=pausespeed" onmouseout="copyspeed=marqueespeed">';
			txt+='<div id="iemarquee" style="position:absolute;left:0px;top:0px;width:100%;">';
			txt+='</div></div>';
		}
		else if (document.layers){
			txt+='<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee">';
			txt+='<layer name="ns_marquee2" width='+marqueewidth+' height='+marqueeheight+' left=0 top=0 onmouseover="copyspeed=pausespeed" onmouseout="copyspeed=marqueespeed"></layer>';
			txt+='</ilayer>';
		}
	}
}

function scrollmarquee(){
	if (iedom){
		if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8)) {
			cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px";
		}
		else {
			cross_marquee.style.top=parseInt(marqueeheight)+8+"px";
		}
	}
	else if (document.layers){
		if (ns_marquee.top>(actualheight*(-1)+8)) {
			ns_marquee.top-=copyspeed;
		}
		else {
			ns_marquee.top=parseInt(marqueeheight)+8;
		}
	}
}

function populate(){
	if (iedom){
		cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee;
		cross_marquee.style.top=parseInt(marqueeheight)+8+"px";
		cross_marquee.innerHTML=marqueecontent;
		actualheight=cross_marquee.offsetHeight;
	}
	else if (document.layers){
		ns_marquee=document.ns_marquee.document.ns_marquee2;
		ns_marquee.top=parseInt(marqueeheight)+8;
		ns_marquee.document.write(marqueecontent);
		ns_marquee.document.close();
		actualheight=ns_marquee.document.height;
	}
	lefttime=setInterval("scrollmarquee()",scrollinterval);
}
window.onload=populate;
