function openWindow(dest,height,width) {
  win = window.open(dest, 
                    "popup", 
                    "height=" + height + 
                    ",width=" + width + 
                    ",scrollbars=1,resizable=1,status=1");
  win.focus();
}
function openNWindow(dest,height,width,name) {
  win = window.open(dest, name, 
                    "height=" + height + 
                    ",width=" + width + 
                    ",scrollbars=1,resizable=1,status=1");
  win.focus();
}
function openMWindow(dest,height,width) {
  win = window.open(dest, 
                    "popup", 
                    "height=" + height + 
                    ",width=" + width + 
                    ",scrollbars=no,resizable=no,menubar=no,toolbar=no,location=no,directories=no,status=no");
  win.focus();
}

//function to change content
function changecontent(){
	if (index>=fcontent.length) {
		index=0;
	}
	if (DOM2){
		document.getElementById("fscroller").style.color=startcolor;
		document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag;
		linksobj=document.getElementById("fscroller").getElementsByTagName("A");
		if (fadelinks){
			linkcolorchange(linksobj);
			colorfade();
		}
	} else if (ie4) {
		document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;
	} else if (ns4) {
		document.fscrollerns.document.fscrollerns_sub.document.write(begintag+fcontent[index]+closetag);
		document.fscrollerns.document.fscrollerns_sub.document.close();
	}

	index++
	setTimeout("changecontent()",delay+faderdelay)
}

// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com


function linkcolorchange(obj){
	if (obj.length>0){
		for (i=0;i<obj.length;i++) { 
			obj[i].style.color="rgb("+hex+","+hex+","+hex+")";
		}
	}
}

frame=20;

function colorfade() {            
	// 20 frames fading process
	if(frame>0) { 
		// increase or decrease color value depd on fadescheme
		hex=(fadescheme==0)? hex-12 : hex+12;
		// Set color value.
		document.getElementById("fscroller").style.color="rgb("+hex+","+hex+","+hex+")";
		if (fadelinks) {
			linkcolorchange(linksobj);
			frame--;
		}
		setTimeout("colorfade()",20); 
	} else {
		document.getElementById("fscroller").style.color=endcolor;
		frame=20;
		hex=(fadescheme==0)? 255 : 0;
	}   
}
