var iPlexPreloadImages=function (arr,dest){
	if(document.images){
    for(i=0; i<arr.length; i++){
      if (arr[i].indexOf("#")!=0){
    		document.getElementById(dest).innerHTML+='<img src='+arr[i]+' alt="" />';
		  }
    }
		//alert(document.getElementById("p0").innerHTML);
  }
}
 
var aPreloadImages1=new Array("pic/airport.jpg","pic/album.jpg","pic/batch3.jpg","pic/batch87.jpg","pic/batchMatrix87.jpg","pic/batchME87.jpg","pic/bmw.jpg","pic/books.jpg","pic/carousel.jpg","pic/carousel2d.jpg","pic/charts.jpg","pic/christmastrees.jpg","pic/christmastrees1.jpg","pic/cinema.jpg","pic/cube.jpg","pic/database.jpg","pic/engle.jpg","pic/facillities.jpg","pic/facillities1.jpg","pic/flip.jpg","pic/flowercube.jpg","pic/lcadv.jpg","pic/left_side_carousel.jpg","pic/mailform.jpg","pic/map.jpg","pic/memories.jpg","pic/mercedes.jpg","pic/nascar.jpg","pic/nature.jpg","pic/paradise.jpg","pic/particles.jpg","pic/right_side_carousel.jpg","pic/scbusa.png","pic/soulcalibour.jpg","pic/spectrum.jpg","pic/sphere.jpg","pic/surfaces.jpg","pic/surfaces1.jpg","pic/tetrahedrone.jpg","pic/videos.jpg","pic/wall.jpg","pic/WebsiteTabs.jpg","pic/zoom.jpg","img/Left.jpg","img/Center.jpg","img/Right.jpg");
var aPreloadImages2=new Array("show/book/milenio/sBook.jpg","show/book/fabel/sBook.jpg","show/book/petra/sBook.jpg","show/book/nina/sBook.jpg","show/book/fantasia/sBook.jpg","show/book/virginia/sBook.jpg","show/book/isabelle/sBook.jpg","show/book/diana/sBook.jpg","show/empty.jpg","show/empty.gif","show/book/milenio/BookFront.jpg","show/book/milenio/BookL.gif","show/book/milenio/BookTitleR.gif","show/book/nina/BookFront.jpg","show/book/nina/BookL.gif","show/book/nina/BookTitle.gif","show/book/petra/BookFront.jpg","show/book/petra/BookL.gif","show/book/petra/BookTitleR.gif","show/book/popeye/BookFront.jpg","show/book/popeye/BookL.gif","show/book/popeye/BookTitleR.gif","show/book/diana/BookFront.jpg","show/book/diana/BookL.png","show/book/diana/Title.png","show/book/fabel/BookFront.jpg","show/book/fabel/BookL.gif","show/book/fabel/BookTitleR.gif","show/book/fantasia/BookFront.jpg","show/book/fantasia/BookL.png","show/book/fantasia/BookTitleR.png","show/book/isabelle/BookFront.jpg","show/book/isabelle/BookL.gif","show/book/isabelle/titleR.png","show/book/chacara/BookFront.jpg","show/book/chacara/BookL.gif","show/book/chacara/BookTitleR.gif","show/book/virginia/BookFront.jpg","show/book/virginia/BookL.gif","show/book/virginia/BookTitleR.png","pof/1MediaLogosmall.jpg","pof/Aeon.jpg","pof/Alarm.jpg","pof/BangOlufsen.jpg","pof/Chocomel.jpg","pof/CollageReel.jpg","pof/Cruesli.jpg","pof/Curacao.jpg","pof/Foxy.jpg","pof/Fruitella.jpg","pof/Grolsch.jpg","pof/Hols.jpg","pof/jcpenny1.jpg","pof/Jive.jpg","pof/Klene.jpg","pof/Lanschot.jpg","pof/Lu.jpg","pof/MascotteDesert.jpg","pof/MascotteIsland.jpg","pof/Mitsubishi.jpg","pof/Moulinex.jpg","pof/Nefit.jpg","pof/Oranjeboom.jpg","pof/Philishave.jpg","pof/Prince.jpg","pof/PublixBoda.jpg","pof/PublixInvitada.jpg","pof/PublixPlaya.jpg","pof/Samson.jpg","pof/Schwarzkopf.jpg","pof/Sourcy.jpg","pof/Spaceshuttle.jpg","pof/Suzuki.jpg","pof/TenCate.jpg","pof/Toyota.jpg","pof/Volvo.jpg","pof/WestlandBusiness.jpg","pof/WestlandCouple.jpg","show/turn/006.jpg","show/turn/142.jpg","show/turn/2077.jpg","show/turn/40.jpg","show/shuffle/1.jpg","show/shuffle/2.jpg","show/shuffle/3.jpg","show/shuffle/4.jpg","show/carousel/111c.jpg","show/carousel/112c.jpg","show/carousel/113c.jpg","show/carousel/114c.jpg","show/carousel/115c.jpg","show/carousel/116c.jpg","show/carousel/117c.jpg","show/carousel/118c.jpg","show/carousel/119c.jpg","show/carousel/121c.jpg","show/carousel/122c.jpg","show/carousel/123c.jpg","show/carousel/124c.jpg","show/carousel/125c.jpg","show/carousel/126c.jpg","show/carousel/left_side_carousel.png","show/cell.gif","show/carousel/right_side_carousel.png");
for(var i=1; i<89; i++){
	aPreloadImages2[aPreloadImages2.length]='pic/'+i+'.jpg';
}

var iPlexStart=function(){
	//iPlexPreloadImages(aPreloadImages1);
	//alert(document.getElementById("p0").innerHTML);
	//var tiPreLoadImg=setTimeout('iPlexPreloadImages(aPreloadImages2)',3000);
	//alert("iPlexStart Function iPlexOS");
}

var flashvars1={};
var params1={};
	params1.scale="showall"; 
	params1.bgcolor="#000000"; 
	params1.allowFullScreen="true"; 
	params1.menu="false";
var attributes1={};
	
var flashvars2={};
var params2={};
	params2.scale="showall"; 
	params2.bgcolor="#000000"; 
	params2.allowFullScreen="true"; 
	params2.menu="false";
var attributes2={};

var flashvars3={};
var params3={};
	params3.scale="showall"; 
	params3.bgcolor="#000000"; 
	params3.allowFullScreen="true"; 
	params3.menu="false";
var attributes3={};

var flashvars4={};
var params4={};
	params4.scale="showall"; 
	params4.bgcolor="#000000"; 
	params4.allowFullScreen="true"; 
	params4.menu="false";
var attributes4={};

/*
function call3dCa(ph){
	flashvars.sXML="localXML/FS3dCarouselData.xml";
	swfobject.embedSWF("FS3dCa.swf", ph, "800", "680", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
}

function call3dWa(ph){
	flashvars.sXML="localXML/FS3dWallData.xml";
	swfobject.embedSWF("FS3dWa.swf?sXML=3dWallData2.xml", ph, "800", "680", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
}

function call3dCu(ph){
	flashvars.sXML="localXML/FS3dCubeData.xml";
	swfobject.embedSWF("FS3dCu.swf", ph, "800", "680", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
}

function call3dSp(ph){
	flashvars.sXML="localXML/FS3dSphereData.xml";
	swfobject.embedSWF("FS3dSp.swf", ph, "800", "800", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
}
*/

function call3dCa(){
	swfobject.embedSWF("3dCa.swf", "swf0", "800", "600", "9.0.0", "expressInstall.swf");
}

function call3dWa(){
	swfobject.embedSWF("3dWa.swf?sXML=3dWallData2.xml", "swf0", "800", "600", "9.0.0", "expressInstall.swf");
}

function call3dCu(){
	swfobject.embedSWF("3dCu.swf", "swf0", "800", "600", "9.0.0", "expressInstall.swf");
}

function call3dSp(){
	swfobject.embedSWF("3dSp.swf", "swf0", "800", "800", "9.0.0", "expressInstall.swf");
}

function Videos(){
	swfobject.embedSWF("FlashVideoGallery.swf", "swf0", "723", "540", "9.0.0", "expressInstall.swf");
}

function callSpectrum(){
	swfobject.embedSWF("pv3d-spectrum.swf", "swf0", "640", "480", "9.0.0", "expressInstall.swf");
}

function call3dAlbum(){
	swfobject.embedSWF("album.swf", "swf0", "800", "600", "9.0.0", "expressInstall.swf");
}

function call3dParticles(){
	swfobject.embedSWF("ParticlesExample.swf", "swf0", "550", "400", "9.0.0", "expressInstall.swf");
}

function call3dSurfaces(){
	swfobject.embedSWF("surfaces_start.swf", "swf0", "400", "410", "9.0.0", "expressInstall.swf");
}

function callCardFlip(){
	swfobject.embedSWF("card_take1_b.swf", "swf0", "520", "300", "9.0.0", "expressInstall.swf");
}

function CallTetrahedron(){
	swfobject.embedSWF("tetrahedron.swf", "swf0", "600", "400", "9.0.0", "expressInstall.swf");
}

function CallCubeFlower(){
	swfobject.embedSWF("menu3d.swf", "swf0", "640", "450", "9.0.0", "expressInstall.swf");
}

/*
function fTO(){
	if (typeof(ti) == "undefined" && !getID("chart1div")){// && r.stat!="completed"){
		setTimeout('fTO()',500);
	}
	else{
		//alert("TI() executing!");
		ti();
	}
}
*/

function testAll(j, bShowAllWebPages){
	for (var i=0; i<3; i++){
		//Total Jobs are 4 x i
		//additional Jobs with high Priority & preLoad Mode
		//Jobs with high Priority & Preload Mode
		if(i==0){
			if(bShowAllWebPages){
				r=iPlex(tit,"batch"+(j*3+i+1), url,"ext.asp", dat,"img="+(j*3+i+1), dest,"p"+(j*3+i+100), mode,"0");
			}
			else{
				r=iPlex(tit,"batch"+(j*3+i+1), url,"ext.asp", dat,"img="+(j*3+i+1), dest,"p100", mode,"0");
			}
		}
		//Jobs with low Priority & Realtime Mode
		if(i==2){
			if(bShowAllWebPages){
				r=iPlex(tit,"batch"+(j*3+i+1), url,"ext.asp", dat,"img="+(j*3+i+1), dest,"d"+(j*3+i), keep,1, prio,"0", jsfn,"iKillAllSWF(); iKillAllifr();");
			}
			else{
				r=iPlex(tit,"batch"+(j*3+i+1), url,"ext.asp", dat,"img="+(j*3+i+1), dest,"d0", prio,"0", keep,1);
			}
		}
		//Jobs with high Priority & Realtime Mode
		else{
			if(bShowAllWebPages){
				if(j==0 && i==0){
					r=iPlex(tit,"batch"+(j*3+i+1), url,"ext.asp", dat,"img="+(j*3+i+1), dest,"d"+(j*3+i));
				}
				else{
					r=iPlex(tit,"batch"+(j*3+i+1), url,"ext.asp", dat,"img="+(j*3+i+1), dest,"d"+(j*3+i), keep,1);
				}
			}
			else{
				if(j==0 && i==0){
					r=iPlex(tit,"batch"+(j*3+i+1), url,"ext.asp", dat,"img="+(j*3+i+1), dest,"d0");
				}
				else{
					r=iPlex(tit,"batch"+(j*3+i+1), url,"ext.asp", dat,"img="+(j*3+i+1), dest,"d0", keep,1);
				}
			}
		}
	}
}

function testMatrix(){
	for (var i=100; i<184; i++){
		//Total Jobs are 84
		//Jobs with high Priority & Realtime Mode
		if(i==100){
			r=iPlex(tit,"batchMatrix"+(i+1-100), url,"extMatrix.asp", dat,"img="+(i+1-100), dspl,"tblMatrix84", dest,"d"+i);
			//getID('tblMatrix84').style.display='block';
		}
		else{
			if(i==183){
				r=iPlex(tit,"batchMatrix"+(i+1-100), url,"extMatrix.asp", dat,"img="+(i+1-100), dest,"d"+i, dspl,"tblMatrix84", keep,1, jsfn,"iKillAllSWF(); iKillAllifr();");
			}
			else{
				r=iPlex(tit,"batchMatrix"+(i+1-100), url,"extMatrix.asp", dat,"img="+(i+1-100), dest,"d"+i, dspl,"tblMatrix84", keep,1);
			}
		}
	}
}

function PreLoadMatrix(){
	for (var i=100; i<184; i++){
		//Total Jobs are 84
		//Jobs with high Priority & Preload Mode
		r=iPlex(tit,"batchMatrix"+(i+1-100), url,"extMatrix.asp", dat,"img="+(i+1-100), dest,"p"+i, mode,0, trac,0);//, jsfn,"iHideFromTo(0,99); iKillAllSWF(); iKillAllifr();"
	}
}

function testBatch(k, bShowAllWebPages){
	for (j=0; j<k; j++){
		testAll(j, bShowAllWebPages);
	}
}

function Column2D(){
	updateChart('FusionChartsFree/Charts/FCF_Column2D.swf','');
}
function Column3D(){
	updateChart('FusionChartsFree/Charts/FCF_Column3D.swf','');
}
function Line(){
	updateChart('FusionChartsFree/Charts/FCF_Line.swf','');
}
function Pie2D(){
	updateChart('FusionChartsFree/Charts/FCF_Pie2D.swf','');
}
function Pie3D(){
	updateChart('FusionChartsFree/Charts/FCF_Pie3D.swf','');
}
function Area(){
	updateChart('FusionChartsFree/Charts/FCF_Area2D.swf','');
}
function Bar(){
	updateChart('FusionChartsFree/Charts/FCF_Bar2D.swf','FusionChartsFree/Data/Bar2D.xml');
}
function Doughnut(){
	updateChart('FusionChartsFree/Charts/FCF_Doughnut2D.swf','');
}
function Funnel3D(){
	updateChart('FusionChartsFree/Charts/FCF_Funnel.swf','');
}
function Candle(){
	updateChart('FusionChartsFree/Charts/FCF_Candlestick.swf','FusionChartsFree/Data/Candlestick.xml');
}

function demoShadowBox(){
	var w0={ player:'iframe', content:'iframe-test-sb.htm', title:'9 Websites' };
	//var w1={ player:'iframe', content:'http://scbusa-server/__SCBUSA_net/___NewWebSite/index.htm', title:'SCB USA, Inc.' };
	var w2={ player:'iframe', content:'http://www.1mediaproduction.com/', title:'1MediaProduction' };
	var w3={ player:'iframe', content:'http://www.engleimplantdentistry.com/', title:'Dr. Engle - Periodontal and Implant Dentistry & Cosmetic and Sedation Dentistry - Naples & Marco Island, Florida' };
	var w4={ player:'iframe', content:'http://www.dentaledu.tv/course_catalogue.php', title:'DentalEDU.TV - Video on Demand and Live Event System in HD and Fullscreen' };
	var w5={ player:'iframe', content:'http://www.paradiseplantation.net/', title:'Paradise Plantation - Paso Fino Horse Ranch, Nature Preserve, Wild Life Refuge, Oak, Pine, Pecan & Christmas Tree Farm' };
	//var w6={ player:'iframe', content:'http://www.fhtmus.com/touchton', title:'FHTM - Fortune Hi-tech Marketing' };
	
	//var f3={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=10Newsmed&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	
	//var videoSWF={ player:'swf', content:'shadowbox/demo/resumeGHS.swf', height:540, width:800, title:'ResumeTest' };

	var ws1={ player:'iframe', content:'http://www.adobe.com/', title:'Adobe' };
	var ws2={ player:'iframe', content:'http://www.mozilla.com/', title:'Firefox' };
	var ws3={ player:'iframe', content:'http://www.opera.com/', title:'Opera' };
	var ws4={ player:'iframe', content:'http://www.microsoft.com/', title:'Microsoft' };
	var ws5={ player:'iframe', content:'http://www.akamai.com/', title:'Akamai' };
	var ws6={ player:'iframe', content:'http://www.ibm.com/', title:'IBM' };
	var ws7={ player:'iframe', content:'http://www.hp.com/', title:'HP' };

	Shadowbox.open([w0,w2,w3,w4,w5,ws1,ws2,ws3,ws4,ws5,ws6,ws7],{ continuous:true });
	
	/*
	var fx={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=foxnewspresentation&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var fy={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=introductionpresentation&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	
	var planb={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=planb&w=478&h=245&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	
	var f1={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=leverageintro&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var f2={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=potential&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var f4={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=LiveYourDreams&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var f5={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=joelBP&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var f6={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=bettymiles&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var f7={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=MIKEBP&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var f8={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=ruelclose&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var f9={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=jerrybrown&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var f10={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=bobbjoanne&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var f11={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=chrisd&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var f12={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=SteveBP&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var f13={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=ToddBP&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var t1={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=TestJoelM&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var t2={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=TestToddR&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var t3={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=TestJerryB&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var t4={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=TestMikeM&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var t5={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=TestBobD&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var t6={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=TestChrisD&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	var t7={ player:'iframe', content:'shadowbox/demo/showFLV.htm?r=&v=TestSteveJordan&w=960&h=720&s=960&f=true&n=CloseFLV', height:880, width:980, title:'videoFLV' };
	*/
	
	//var img={ player:'img', content:'http://mjijackson.com/shadowbox/gallery/aston_martin/vanquish.jpg' };
	//var videoYT={ player:'iframe', content:'http://www.youtube.com/v/sOUchd7lf94&color1=0xb1b1b1&color2=0xcfcfcf&hl=en&feature=player_embedded&fs=1', height:344, width:425, title:'What is your Plan B?' };

	//Shadowbox.open([w0,w1,w2,w3,w4,w5,w6,videoSWF,ws1,ws2,ws3,ws4,ws5,ws6,ws7,Joel,planb,img,videoYT],{ continuous:true });
	//Shadowbox.open([planb,fx,fy,f5,f1,f2,f4,f6,f7,f8,f9,f10,f11,f12,f13,t1,t2,t3,t4,t5,t6,t7,w0,w1,w2,w3,w4,w5,ws1,ws2,ws3,ws4,ws5,ws6,ws7,f3],{ continuous:true });
};

function sb1mp(){
	var w2x={ player:'iframe', content:'http://www.1mediaproduction.com/', title:'1MediaProduction' };
	Shadowbox.open([w2x],{ continuous:true });
};

function sbscbusa(){
	var w2x={ player:'iframe', content:'http://www.scbusa.net/', title:'SCB USA' };
	Shadowbox.open([w2x],{ continuous:true });
};
