/*
 * Ext JS Library 1.1.1
 * Copyright(c) 2006-2007, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://www.extjs.com/license
 */
 /* random elements for article */


var articleList1 = new Array(' <img src="img/temp1.jpg" width="171" height="86" /><div align="right" style="height:42px; padding-top:10px; padding-top:10px; font-size:10px; float:right;"><br><br><a href="compita.html"><img src="img/learnmore.gif" alt="Services" width="84" height="13" border="0" /></a></div>','<img src="img/temp2.jpg" width="171" height="86" /> <div align="right" style="height:42px; padding-top:10px; font-size:10px; float:right;"><br><br><a href="ezep.html"><img src="img/learnmore.gif" alt="Services" width="84" height="13" border="0" /></a></div>','<img src="img/temp3.jpg" width="171" height="86" /> <div align="right" style="height:42px; padding-top:10px; font-size:10px; float:right;"><br><br><a href="green.html"><img src="img/learnmore.gif" alt="Services" width="84" height="13" border="0" /></a></div>','<img src="img/temp4.jpg" width="171" height="86" /> <div align="right" style="height:42px; padding-top:10px; font-size:10px; float:right;"><br><br><a href="bowflex.html"><img src="img/learnmore.gif" alt="Services" width="84" height="13" border="0" /></a></div>','<img src="img/temp5.jpg" width="171" height="86" /> <div align="right" style="height:42px; padding-top:10px; font-size:10px; float:right;"><br><br><a href="dating.html"><img src="img/learnmore.gif" alt="Services" width="84" height="13" border="0" /></a></div>','<img src="img/temp6.jpg" width="171" height="86" /><div align="right" style="height:42px; padding-top:10px; padding-top:10px; font-size:10px; float:right;"><br><br><a href="bail.html"><img src="img/learnmore.gif" alt="Services" width="84" height="13" border="0" /></a></div>','<img src="img/temp7.jpg" width="171" height="86" /><div align="right" style="height:42px; padding-top:10px; padding-top:10px; font-size:10px; float:right;"><br><br><a href="cHouse.html"><img src="img/learnmore.gif" alt="Services" width="84" height="13" border="0" /></a></div>');

function getArticle(theList) {
	var index; // array index
	var imageName;
	index = Math.floor(Math.random() * theList.length); 
	imageName = theList[index]; 	
	document.write(imageName);
}

/* dialog box variables*/
var totalsites=20; var i=0;
extra_img=10;
totalsites+=extra_img;
var sites= new Array(totalsites)
sites[0]="portfolio/ajax-img/thumbs/1.jpg";
sites[1]="portfolio/ajax-img/thumbs/2.jpg";
sites[2]="portfolio/ajax-img/thumbs/3.jpg";
sites[3]="portfolio/ajax-img/thumbs/4.jpg";
sites[4]="portfolio/ajax-img/thumbs/5.jpg";
sites[5]="portfolio/ajax-img/thumbs/6.jpg";
sites[6]="portfolio/ajax-img/thumbs/7.jpg";
sites[7]="portfolio/ajax-img/thumbs/8.jpg";
sites[8]="portfolio/ajax-img/thumbs/9.jpg";
sites[9]="portfolio/ajax-img/thumbs/10.jpg";
sites[10]="portfolio/ajax-img/thumbs/11.jpg";
sites[11]="portfolio/ajax-img/thumbs/12.jpg";
sites[12]="portfolio/ajax-img/thumbs/13.jpg";
sites[13]="portfolio/ajax-img/thumbs/14.jpg";
sites[14]="portfolio/ajax-img/thumbs/15.jpg";
sites[15]="portfolio/ajax-img/thumbs/16.jpg";
sites[16]="portfolio/ajax-img/thumbs/17.jpg";
sites[17]="portfolio/ajax-img/thumbs/18.jpg";
sites[18]="portfolio/ajax-img/thumbs/19.jpg";
sites[19]="portfolio/ajax-img/thumbs/20.jpg";
sites[19]="portfolio/ajax-img/thumbs/21.jpg";

var site_len=sites.length-extra_img;
for(i=0;i<extra_img;i++){
sites[site_len]=sites[i];
site_len++;
}


var sitestxt= new Array(totalsites)
sitestxt[0]="<b><font style='font-size:15px;'>Moon Nurseries</font></b><br>Welcome to Moon Nurseries use our new online catalog - <a href='http://dev.muchlove.tv/moon/' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[1]="<b><font style='font-size:15px;'>Compita Shop</font></b><br>The best sports Betting sites providing news, - <a href='http://www.compitashop.com' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[2]="<b><font style='font-size:15px;'>2b4 the world</font></b><br>2b4theworld.com is site built for you. On this site you will find resources.. - <a href='http://dev.muchlove.tv/2b4' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[3]="<b><font style='font-size:15px;'>Behavior Discription Technologies</font></b><br>committed to developing cost-efficient and scientifically supported Human Resource systems. - <a href='http://bdt.qclnet.com' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[4]="<b><font style='font-size:15px;'>BailFish.com</font></b><br>FREE Nationwide Directory of Bail Bond Agent, Criminal Lawyers, Investigators, Jails. - <a href='http://www.bailfish.com' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[5]="<b><font style='font-size:15px;'>Applyu</font></b><br>helps students search for colleges, organize the application process. - <a href='http://www.applyu.com' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[6]="<b><font style='font-size:15px;'>Green Beanery</font></b><br>Hot products! Cool prices! Canada's leading coffee (and tea) site. - <a href='http://www.greenbeanery.ca' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[7]="<b><font style='font-size:15px;'>Blue Vinny Restaurant</font></b><br>Blue Vinny Restaurant is located in the beautiful Kent village of Elham. - <a href='http://www.websitepreview.co.uk/staging/bluevinny/index.php' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[8]="<b><font style='font-size:15px;'>Party2nite</font></b><br>Throw the Ultimate Disco Party. - <a href='#'  style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[9]="<b><font style='font-size:15px;'>Bail Help Bail Bonds</font></b><br>affordable nationwide bail services to all jails and courts. - <a href='http://www.bailhelp.com' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[10]="<b><font style='font-size:15px;'>Coach House</font></b><br>We now offer both on premise and off-site catering. - <a href='http://coachhousenorthbergen.com/index.php.' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[11]="<b><font style='font-size:15px;'>Health and Wellbeing </font></b><br>The 'Gurus' of Health and Wellbeing in the UK. - <a href='http://www.hwbuk.com' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[12]="<b><font style='font-size:15px;'>Trace Destroyer </font></b><br>The Traces on your Computer can result in. - <a href='#'  style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[13]="<b><font style='font-size:15px;'>Team Global net </font></b><br>GlobalNet is a visionary organization focused on adding value to people's lives. - <a href='http://teamglobalnet.com' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[14]="<b><font style='font-size:15px;'>Caesar Bucks </font></b><br>Caesarbucks Affiliates making huge commissions today!. - <a href='#' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[15]="<b><font style='font-size:15px;'>Creom </font></b><br>Creom is a quick acting, non-toxic, environmentally friendly moisture. - <a href='http://www.creom.co.uk' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[16]="<b><font style='font-size:15px;'>Radisson </font></b><br>Get in the festive spirit. - <a href='http://www.radissonsas.com' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[17]="<b><font style='font-size:15px;'>Trucost </font></b><br>Trucost is an environmental research organisation working with companies. - <a href='http://www.trucost.com' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[18]="<b><font style='font-size:15px;'>Ezpze Mail </font></b><br>Safe email and instant messaging/chat system for children. - <a href='http://www.ezpzemail.com' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[19]="<b><font style='font-size:15px;'>Dating Disciples </font></b><br>Christian Dating Service Christian Single Dating Online Free Christian. - <a href='http://www.datingdisciples.com' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";
sitestxt[20]="<b><font style='font-size:15px;'>Re Aqua</font></b><br>well-being and beauty therapy salons and spas owned by Serve Health & Beauty Limited. - <a href='http://www.re-aqua.co.uk' target='_blank' style='color:#ff0000; text-decoration:none'>View site</a>";

var sitestxt_len=sitestxt.length-extra_img;
for(i=0;i<extra_img;i++){
sitestxt[sitestxt_len]=sitestxt[i];
sitestxt_len++;
}

var sitesleft= new Array(totalsites)
sitesleft[0]="portfolio/ajax-img/big_img/1.jpg";
sitesleft[1]="portfolio/ajax-img/big_img/2.jpg";
sitesleft[2]="portfolio/ajax-img/big_img/3.jpg";
sitesleft[3]="portfolio/ajax-img/big_img/4.jpg";
sitesleft[4]="portfolio/ajax-img/big_img/5.jpg";
sitesleft[5]="portfolio/ajax-img/big_img/6.jpg";
sitesleft[6]="portfolio/ajax-img/big_img/7.jpg";
sitesleft[7]="portfolio/ajax-img/big_img/8.jpg";
sitesleft[8]="portfolio/ajax-img/big_img/9.jpg";
sitesleft[9]="portfolio/ajax-img/big_img/10.jpg";
sitesleft[10]="portfolio/ajax-img/big_img/11.jpg";
sitesleft[11]="portfolio/ajax-img/big_img/12.jpg";
sitesleft[12]="portfolio/ajax-img/big_img/13.jpg";
sitesleft[13]="portfolio/ajax-img/big_img/14.jpg";
sitesleft[14]="portfolio/ajax-img/big_img/15.jpg";
sitesleft[15]="portfolio/ajax-img/big_img/16.jpg";
sitesleft[16]="portfolio/ajax-img/big_img/17.jpg";
sitesleft[17]="portfolio/ajax-img/big_img/18.jpg";
sitesleft[18]="portfolio/ajax-img/big_img/19.jpg";
sitesleft[19]="portfolio/ajax-img/big_img/20.jpg";
sitesleft[19]="portfolio/ajax-img/big_img/21.jpg";

var sitesleft_len=sitesleft.length-extra_img;
for(i=0;i<extra_img;i++){
sitesleft[sitesleft_len]=sitesleft[i];
sitesleft_len++;
}

/*var sitesrighttop= new Array(totalsites)
sitesrighttop[0]="portfolio/ajax-img/small_img/1.jpg";
sitesrighttop[1]="portfolio/ajax-img/small_img/2.jpg";
sitesrighttop[2]="portfolio/ajax-img/small_img/3.jpg";
sitesrighttop[3]="portfolio/ajax-img/small_img/4.jpg";
sitesrighttop[4]="portfolio/ajax-img/small_img/5.jpg";
sitesrighttop[5]="portfolio/ajax-img/small_img/6.jpg";
sitesrighttop[6]="portfolio/ajax-img/small_img/7.jpg";
sitesrighttop[7]="portfolio/ajax-img/small_img/8.jpg";
sitesrighttop[8]="portfolio/ajax-img/small_img/9.jpg";
sitesrighttop[9]="portfolio/ajax-img/small_img/10.jpg";
sitesrighttop[10]="portfolio/ajax-img/small_img/11.jpg";
sitesrighttop[11]="portfolio/ajax-img/small_img/12.jpg";
sitesrighttop[12]="portfolio/ajax-img/small_img/13.jpg";
sitesrighttop[13]="portfolio/ajax-img/small_img/14.jpg";
sitesrighttop[14]="portfolio/ajax-img/small_img/15.jpg";
sitesrighttop[15]="portfolio/ajax-img/small_img/16.jpg";
sitesrighttop[16]="portfolio/ajax-img/small_img/17.jpg";
sitesrighttop[17]="portfolio/ajax-img/small_img/18.jpg";
sitesrighttop[18]="portfolio/ajax-img/small_img/19.jpg";
sitesrighttop[19]="portfolio/ajax-img/small_img/20.jpg";


var sitesrighttop_len=sitesrighttop.length-extra_img;
for(i=0;i<extra_img;i++){
sitesrighttop[sitesrighttop_len]=sitesrighttop[i];
sitesrighttop_len++;
}


var sitesRightBot= new Array(totalsites)
sitesRightBot[0]="portfolio/ajax-img/medium_img/1.jpg";
sitesRightBot[1]="portfolio/ajax-img/medium_img/2.jpg";
sitesRightBot[2]="portfolio/ajax-img/medium_img/3.jpg";
sitesRightBot[3]="portfolio/ajax-img/medium_img/4.jpg";
sitesRightBot[4]="portfolio/ajax-img/medium_img/5.jpg";
sitesRightBot[5]="portfolio/ajax-img/medium_img/6.jpg";
sitesRightBot[6]="portfolio/ajax-img/medium_img/7.jpg";
sitesRightBot[7]="portfolio/ajax-img/medium_img/8.jpg";
sitesRightBot[8]="portfolio/ajax-img/medium_img/9.jpg";
sitesRightBot[9]="portfolio/ajax-img/medium_img/10.jpg";
sitesRightBot[10]="portfolio/ajax-img/medium_img/11.jpg";
sitesRightBot[11]="portfolio/ajax-img/medium_img/12.jpg";
sitesRightBot[12]="portfolio/ajax-img/medium_img/13.jpg";
sitesRightBot[13]="portfolio/ajax-img/medium_img/14.jpg";
sitesRightBot[14]="portfolio/ajax-img/medium_img/15.jpg";
sitesRightBot[15]="portfolio/ajax-img/medium_img/16.jpg";
sitesRightBot[16]="portfolio/ajax-img/medium_img/17.jpg";
sitesRightBot[17]="portfolio/ajax-img/medium_img/18.jpg";
sitesRightBot[18]="portfolio/ajax-img/medium_img/19.jpg";
sitesRightBot[19]="portfolio/ajax-img/medium_img/20.jpg";


var sitesRightBot_len=sitesRightBot.length;
for(i=0;i<extra_img;i++){
sitesRightBot[sitesRightBot_len]=sitesRightBot[i];
sitesRightBot_len++;
}*/

function test(num){
	//alert(num);
var tdialogbtn='show-dialog-btn'+num;
var tdlg="hello-dlg"+num;
	//alert(tdialogbtn+tdlg);
//alert(document.getElementById(tdlg).innerHTML);
var HelloWorld = function(){
    // everything in this space is private and only accessible in the HelloWorld block
    
    // define some private variables
    var dialog, showBtn;
    
    // return a public interface
    return {
        init : function(){
             showBtn = Ext.get(tdialogbtn);
             // attach to click event
             showBtn.on('click', this.showDialog, this);
        },
//                        height:480,
      
        showDialog : function(){
            if(!dialog){ // lazy initialize the dialog and only create it once
			loadDiv(num);
                dialog = new Ext.BasicDialog(tdlg, { 
                        autoTabs:false,
						shim:false,
						closable:false,
						collapsible:false,
						resizable:false,								
                        width:620,
                        height:480,
                        shadow:true,
						shadowOffset:10,
                        minWidth:300,
                        minHeight:250,
                        proxyDrag: true
                });
                dialog.addKeyListener(27, dialog.hide, dialog);
               // dialog.addButton('Submit', dialog.hide, dialog).disable();
                dialog.addButton('Close', dialog.hide, dialog);	
				dialog.addListener('beforeHide',this.hideDialog,dialog);
            }
			showDim();
            dialog.show(showBtn.dom);
        },
	 hideDialog : function(){
	  var objOverlay = document.getElementById('overlay');
	  objOverlay.style.display = 'none';
	 }
    };
}();

// using onDocumentReady instead of window.onload initializes the application
// when the DOM is ready, without waiting for images and other resources to load
Ext.onReady(HelloWorld.init, HelloWorld, true);
}
function loadDiv(x){
var tdlg="hello-dlg"+x;
x=x-1;
document.getElementById(tdlg).innerHTML='<div class="x-dlg-hd" style="background-color:#fff456">&nbsp;</div>	<div class="x-dlg-bd" style="background-color:#ffffff">	<!-- Nested "inner-tab" to safely add padding --><div class="inner-tab" style="background-color:#ffffff"><table width="570" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td width="570" height="350" valign="top"><img src="'+sitesleft[x]+'" width="570" height="350" /></td></tr></table></div></div><div class="x-dlg-ft">'+sitestxt[x]+'</div>';
	}
function showDim(){
	var objOverlayBody = document.getElementById('outerContainerHold');
	var objOverlay = document.createElement("div");
	objOverlay.setAttribute('id','overlay');
var theight=0; 
if(navigator.appName!='Microsoft Internet Explorer'){
theight=400;
}

	objOverlay.style.position = 'absolute';
	objOverlay.style.textAlign = 'center';
	objOverlay.style.verticalAlign = 'middle';
//	objOverlay.style.width = objOverlayBody.offsetWidth+theight;
//	objOverlay.style.height = objOverlayBody.offsetHeight;
	objOverlay.style.width = screen.width;
	objOverlay.style.height = screen.height;

	objOverlay.style.zIndex = 5;
	objOverlay.style.left=0;
	objOverlay.style.top=0;
		objOverlay.style.filter = 'alpha(opacity=50)';
		objOverlay.style.opacity = 0.5;
		objOverlay.style.backgroundColor="#cccccc";
	objOverlayBody.insertBefore(objOverlay, objOverlayBody.firstChild);
	objOverlay.style.display = 'block';

if(navigator.appName!='Microsoft Internet Explorer'){
	objOverlay.innerHTML='<img src="img/blank.gif" width="'+screen.width+'" height="'+screen.height+'">';
}
}