function preload(){
	if (document.images){
		var imgFiles = preload.arguments;
		var Preloadarray = new Array();
	
		for (var i=0; i<imgFiles.length; i++){
   			Preloadarray[i] = new Image;
   			Preloadarray[i].src = imgFiles[i];
    	}
	}
}

function popUpContent(url) {
 popUpWin = window.open(url,'','height=310,width=310, location=no, scrollbars=no, menubars=no,toolbars=no,resizable=yes');
 if (!popUpWin.opener) 
	popUpWin.opener = self;	
}

var gencontents = new Array();
gencontents[1]='Time-Limited Special Offer: BUY GOLD GET DIAMOND! Save $50 Cash! Click to learn more...'
gencontents[2]='Last Minute Offer : BUY GOLD GET DIAMOND! Hurry! Click to see how...'
gencontents[3]='BUY GOLD GET DIAMOND! Can you believe it!? Click and see...'
gencontents[4]='GOLDEN CHANCE: BUY GOLD GET DIAMOND! Get it NOW! Click to see how...'
gencontents[5]='Don\'t miss this golden chance: Buy $49.95 Gold Edition Get FREE Upgrade to $100 Diamond Edition!'

function drawscroll(nwidth,nspeed,ncontents,nlink) {
	var scrollcontents=gencontents[ncontents]

	document.write('<applet code="iscroll.class" codebase="Applet/" width="' + nwidth + '" height="16">')
	document.write('<param name="Notice" value="Applet by www.CodeBrain.com">')
	document.write('<param name="Text" value="' + scrollcontents + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;">')
	document.write('<param name="TextColor" value="#0057CC">')
	document.write('<param name="TextLinkColor" value="#0000FF">')
	document.write('<param name="VerticalBias" value="3">')
	document.write('<param name="FontName" value="Arial">')
	document.write('<param name="FontHeight" value="16">')
	document.write('<param name="FontStyle" value="1">')
	document.write('<param name="Link" value="' + nlink + '">')
	document.write('<param name="Speed" value="' + nspeed + '">')
	document.write('<param name="Pause" value="1000">')
	document.write('<param name="BackgroundColor" value="#E6F7FB">')
	document.write('<param name="MouseMode" value="2">')
	document.write('</applet>')
}

// Ticker startup
function startTicker()
{
	// Define run time values
	theCurrentStory     = -1;
	theCurrentLength    = 0;
	// Locate base objects
	if (document.getElementById) {	
		    theAnchorObject     = document.getElementById("tickerAnchor");
			runTheTicker();   	
		 }
	else {
            document.write("<style>.ticki{display:none;}.ticko{border:0px; padding:0px;}</style>");
            return true;
	}
}
// Ticker main run loop
function runTheTicker()
{
	var myTimeout;  
	// Go for the next story data block
	if(theCurrentLength == 0)
	{
		theCurrentStory++;
		theCurrentStory      = theCurrentStory % theItemCount;
		theStorySummary      = theSummaries[theCurrentStory].replace(/&quot;/g,'"');		
		theTargetLink        = theSiteLinks[theCurrentStory];
		theAnchorObject.href = theTargetLink;
		thePrefix 	     = "<span class=\"tickls\">" + theLeadString[theCurrentStory] + "</span>";
	}
	// Stuff the current ticker text into the anchor
	theAnchorObject.innerHTML = thePrefix + 
	theStorySummary.substring(0,theCurrentLength) + whatWidget();
	// Modify the length for the substring and define the timer
	if(theCurrentLength != theStorySummary.length)
	{
		theCurrentLength++;
		myTimeout = theCharacterTimeout;
	}
	else
	{
		theCurrentLength = 0;
		myTimeout = theStoryTimeout;
	}
	// Call up the next cycle of the ticker
	setTimeout("runTheTicker()", myTimeout);
}
// Widget generator
function whatWidget()
{
	if(theCurrentLength == theStorySummary.length)
	{
		return theWidgetNone;
	}

	if((theCurrentLength % 2) == 1)
	{
		return theWidgetOne;
	}
	else
	{
		return theWidgetTwo;
	}
}

var theCharacterTimeout = 50;
var theStoryTimeout     = 5000;
var theWidgetOne        = "_";
var theWidgetTwo        = "-";
var theWidgetNone       = "";

var theLeadString = new Array();
var theSummaries = new Array();
var theSiteLinks = new Array();

var theItemCount = 2;

theLeadString[0] = "";
theSummaries[0] = "Ihr PC - ein Monster-Musikstudio! Lassen Sie es Wirklichkeit werden!";
theSiteLinks[0] = "http://www.audio4fun.com/adlines.php?id=29";

theLeadString[1] = "";
theSummaries[1] = "Mit einem AV Music Morpher hört die Musik Ihnen zu!";
theSiteLinks[1] = "http://www.audio4fun.com/adlines.php?id=30";