
var tour = {

	timeDelay : 10000,
	curQuote : 0,
	aQuote : [],

	init : function( ) {

		tour.aQuote[0] = [ "...one of the few truly unique services you’ll come across...", "Don Reisinger (CNET review)", "http://news.cnet.com/8301-17939_109-10128217-2.html" ];
		tour.aQuote[1] = [ "5.0 star(s): This is a great app - thanks!", "Susanne Bullo (Scrapplet user)", "http://www.scrapplet.com/SusanneBullo" ];
		tour.aQuote[2] = [ "...a powerful new website/platform... offers a dizzying array of options... also has the potential to become very popular for businesses and experienced developers", "Jason Kincaid (TechCrunch review)", "http://www.techcrunch.com/2008/12/22/scrapplet-powerful-social-web-canvases-that-are-as-easy-as-drag-and-drop/" ];
		tour.aQuote[3] = [ "...a unique Web application that acts as an open slate for you to pull in data from around the Web...", "Louis Gray (Blogger review)", "http://www.louisgray.com/live/2008/12/scrapplet-sets-up-blank-canvas-to-mash.html" ];
		tour.aQuote[4] = [ "If you look at it the geeky way Scrapplet is incredible: it lets you drag and drop pieces of the web over to your canvas and create a new web page. The technology underneath...is absolutely incredible.", "Robert Scoble (Scobleizer review)", "http://scobleizer.com/2008/12/23/its-time-for-the-geeks-to-sit-down-and-shut-up/" ];
		tour.aQuote[5] = [ "What makes Scrapplet so easy to use...is its drag’n'drop interface for easy customization and organization of content...", "Kristen Nicole (SocialTimes review)", "http://www.socialtimes.com/2008/12/scrapplet-launches-netvibes-competitor/" ];
		tour.aQuote[6] = [ "It goes without saying that I find this a very interesting initiative...It is a very appealing solution that can accommodate both serious and leisure uses, and which brings the best of different social sites under the same space.", "KillerStartups review", "http://www.killerstartups.com/Social-Networking/scrapplet-com-aggregating-your-life-on-the-web" ];
		tour.aQuote[7] = [ "This concept is amazing and the tech behind is awe-inspiring. I have been showing it to friends who are as amazed as me...", "Martha Sperry (Scrapplet user)", "http://www.scrapplet.com/MarthaSperry" ];
//		tour.aQuote[7] = [ "", "", "" ];
		
		tour.curQuote = random( len( tour.aQuote ) - 1 );
		
		tour.quotes( );
		xlib.intervalSet( "tour.quotes( )", tour.timeDelay )
		
	},

	lookupObjects : function( id ) {
		var rval = "";

		// local object repository		
		switch ( lower( id ) ) {
		  case "fish_school":
		  	rval = "sig=%24xLib%24&name=Image_1600f1958f23c&$otype=10&$issys=0&$style=4326913&$displayMode=1&$left=578&$top=200&$width=332&$height=378&$margin=0&$padding=0&overflow=auto&$scrollTop=0&$scrollLeft=0&bgColor=%23F0F0F0&$transLevel=100&borderStyle=solid&$borderWidth=1&$borderWidthThick=4&borderColor=black&$hdrHeight=22&hdrBgImage=%2Fimages%2Fnavbg.gif&$hdrPadding=2&hdrTextClass=smtxt&hdrTextColor=white&bodyClass=smtxt&$ttWidth=300&$ftrHeight=22&ftrBgImage=%2Fimages%2Fnavbg.gif&$ftrPadding=2&ftrTextClass=smtxt&ftrTextColor=white&action=%3Cimg%20src%3D%27%2Fimages%2Ffish.png%27%20border%3D0%20width%3D100%25%20height%3D100%25%3E&imagedir=%2Flibs%2Fsupport&$eTimerInterval=0&$eTimerReload=0&";
		  	break;
		  case "fish_text":
		  	rval = "sig=%24xLib%24&name=TextBlock_1600634866da&$otype=1&$issys=0&$style=4325889&$displayMode=1&$left=292&$top=183&$width=482&$height=102&margin=0&padding=0&overflow=hidden&$scrollTop=0&$scrollLeft=0&bgColor=white&$transLevel=100&borderStyle=solid&$borderWidth=1&$borderWidthThick=4&borderColor=black&$hdrHeight=22&hdrBgImage=%2Fimages%2Fnavbg.gif&$hdrPadding=2&hdrTextClass=smtxt&hdrTextColor=white&bodyClass=smtxt&$ttWidth=300&$ftrHeight=22&ftrBgImage=%2Fimages%2Fnavbg.gif&$ftrPadding=2&ftrTextClass=smtxt&ftrTextColor=white&action=%3Ctable%20border%3D0%20cellspacing%3D0%20cellpadding%3D0%20width%3D100%25%20height%3D100%25%3E%3Ctr%20valign%3D%27top%27%3E%3Ctd%20style%3D%27text-align%3Aleft%27%3E%3Cfont%20style%3D%27font-family%3AVerdana%3B%20font-size%3A14pt%3B%20color%3A%23e0e0e0%3B%20font-weight%3Anormal%3B%20line-height%3Anormal%3B%20text-decoration%3Anone%3B%20%27%3EWelcome%20to%20my%20cool%20place%20on%20the%20web.%20%20Can%20you%20tell%20I%20really%20like%20fish%3F%20Maybe%20it%27s%20the%20coolness%20of%20the%20water%2C%20or%20the%20color%20and%20variety%20of%20the%20finned%20friends..%3C%2Ffont%3E%3C%2Ftd%3E%3C%2Ftr%3E%3C%2Ftable%3E&imagedir=%2Flibs%2Fsupport&$eTimerInterval=0&$eTimerReload=0&";
		  	break;
		}
		return( rval );
	},

	pageReset : function( ) {
		var awin, cnt, a, i;

		document.location.reload( );
		return;
		
		awin = parent.xWinList;
		cnt = awin.length + 1;
		a = new Array( );
		for ( i=1; i<cnt; i++ ) {
			if ( awin[i] && ( ! awin[i].issys ) ) {
				a[len(a)] = awin[i].name;
			}
		}

		cnt = len( a );
		for ( i=0; i<cnt; i++ ) {
			switch ( upper( xWin( a[i] ).name ) ) {
			  case "HTMLBLOCK_160062CF9737F":		// sliding panel/toolbar
			  case "TEXTBLOCK_1600617285188":		// text title
			  case "HTMLBLOCK_160063209B1EE":		// fish map

//			  case "":
			  	continue;
			}
			xWin( a[i] ).destroy( );
		}

		document.body.style.backgroundImage = "";
		document.body.style.backgroundColor = "#ffffff";
	},
	
	quotes : function( ) {
		var s;
		
		s = "<p><i>\"" + tour.aQuote[tour.curQuote][0] + "\"</i><br><br>-- <a href='" + tour.aQuote[tour.curQuote][2] + "' target=_blank>" + tour.aQuote[tour.curQuote][1] + "</a>"
	
		tour.curQuote++;
		if ( tour.curQuote > len( tour.aQuote ) - 1 ) {
			tour.curQuote = 0;
		}

		domInnerHTML_set( 'quoteId', s );
	}

};


function objCreate( id, title, action ) {
	w = xlib.objLookup( id );
	if ( w ) {
		if ( title != null ) {
			w.action = xlib.objPreprocess( w.action, "#TITLE#", title );
		}
		if ( action != null ) {
			w.eClick = xlib.objPreprocess( w.eClick, "#ACTION#", action );
		}
		w.setposition( parent.xlib.winDefPostion( ) );
		w.create( );
	}
}

