//Random iframes content - © Dynamic Drive (www.dynamicdrive.com)
//For full source code, and Terms Of use, visit http://dynamicdrive.com
//This credit MUST stay intact for legal use
//Updated in http://dynamicdrive.com/forums for multiple use by:
//John Davenport Scheuer (username:jscheuer1)


//Specify random URLs to display inside iframe - Left Top.
var randomcontent=new Array()
randomcontent[0]="http://www.yosweets.co.uk/random/random_01.htm"
randomcontent[1]="http://www.yosweets.co.uk/random/random_05.htm"
randomcontent[2]="http://www.yosweets.co.uk/random/random_09.htm"
randomcontent[3]="http://www.yosweets.co.uk/random/random_15.htm"
randomcontent[4]="http://www.yosweets.co.uk/random/random_30.htm"
randomcontent[5]="http://www.yosweets.co.uk/random/random_31.htm"

//Specify this IFRAME's display attributes
randomcontent.iframeprops='width=180 height=300 marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"'

//Specify random URLs to display inside another iframe (add as many of these as you want) - Left Middle
var randomcontent2=new Array()
randomcontent2[0]="http://www.yosweets.co.uk/random/random_02.htm"
randomcontent2[1]="http://www.yosweets.co.uk/random/random_06.htm"
randomcontent2[2]="http://www.yosweets.co.uk/random/random_16.htm"
randomcontent2[3]="http://www.yosweets.co.uk/random/random_18.htm"
randomcontent2[4]="http://www.yosweets.co.uk/random/random_26.htm"
//Specify this IFRAME's display attributes
randomcontent2.iframeprops='width=180 height=300 marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"'

//Specify random URLs to display inside another iframe (add as many of these as you want) - Left Bottom
var randomcontent3=new Array()
randomcontent3[0]="http://www.yosweets.co.uk/random/random_04.htm"
randomcontent3[1]="http://www.yosweets.co.uk/random/random_08.htm"
randomcontent3[2]="http://www.yosweets.co.uk/random/random_17.htm"
randomcontent3[3]="http://www.yosweets.co.uk/random/random_21.htm"
randomcontent3[4]="http://www.yosweets.co.uk/random/random_27.htm"
//Specify this IFRAME's display attributes
randomcontent3.iframeprops='width=180 height=300 marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"'

//Specify random URLs to display inside another iframe (add as many of these as you want) - Right Top
var randomcontent4=new Array()
randomcontent4[0]="http://www.yosweets.co.uk/random/random_19.htm"
randomcontent4[1]="http://www.yosweets.co.uk/random/random_20.htm"
randomcontent4[2]="http://www.yosweets.co.uk/random/random_22.htm"
randomcontent4[3]="http://www.yosweets.co.uk/random/random_28.htm"
randomcontent4[4]="http://www.yosweets.co.uk/random/random_29.htm"
//Specify this IFRAME's display attributes
randomcontent4.iframeprops='width=180 height=300 marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"'

//Specify random URLs to display inside another iframe (add as many of these as you want) - Right Middle
var randomcontent5=new Array()
randomcontent5[0]="http://www.yosweets.co.uk/random/random_11.htm"
randomcontent5[1]="http://www.yosweets.co.uk/random/random_12.htm"
randomcontent5[2]="http://www.yosweets.co.uk/random/random_13.htm"
randomcontent5[3]="http://www.yosweets.co.uk/random/random_14.htm"
randomcontent5[4]="http://www.yosweets.co.uk/random/random_24.htm"
//Specify this IFRAME's display attributes
randomcontent5.iframeprops='width=180 height=300 marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"'

//Specify random URLs to display inside another iframe (add as many of these as you want) - Right Bottom
var randomcontent6=new Array()
randomcontent6[0]="http://www.yosweets.co.uk/random/random_03.htm"
randomcontent6[1]="http://www.yosweets.co.uk/random/random_07.htm"
randomcontent6[2]="http://www.yosweets.co.uk/random/random_10.htm"
randomcontent6[3]="http://www.yosweets.co.uk/random/random_23.htm"
randomcontent6[3]="http://www.yosweets.co.uk/random/random_25.htm"
//Specify this IFRAME's display attributes
randomcontent6.iframeprops='width=180 height=300 marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"'




//No need to edit after here
function random_iframe(){
if (!document.all&&!document.getElementById)
return;
this.content=arguments[0];
random_iframe.num=random_iframe.num? random_iframe.num+1 : 1;
this.frame_id='dynstuff'+random_iframe.num;
document.write('<iframe id="'+this.frame_id+'" src="" '+this.content.iframeprops+'></iframe>');
this.frame=document.getElementById? document.getElementById(this.frame_id) : document.all[this.frame_id];
var cacheobj=this;
this.onloadfunc=function(){
cacheobj.frame.src=cacheobj.content[Math.floor(Math.random()*cacheobj.content.length)]
};
if ( typeof window.addEventListener != "undefined" )
    window.addEventListener( "load", this.onloadfunc, false );
else if ( typeof window.attachEvent != "undefined" )
    window.attachEvent( "onload", this.onloadfunc );
else {
    if ( window.onload != null ) {
        var oldOnload = window.onload;
        window.onload = function ( e ) {
            oldOnload( e );
            cacheobj.onloadfunc();
        };
    }
    else
        window.onload = this.onloadfunc;
}
}

