		/*
		Random Image Link Script- By Website Abstraction(http://www.wsabstract.com) 
		Modified by C. Young
		*/

		var rnum;
		var newnum;



		function update_random_img(div_id,array_name,mode,big_or_small,opt) {
			if (mode=='random')
			{
				newnum = rnum;
				while (newnum == rnum) {
					newnum=Math.floor(Math.random()*array_name.length)
				}
				rnum = newnum;
				if (rnum == array_name.length - 1) // do not use the last image
					rnum--;
			}
			else if (mode=='prev')
			{
				if (rnum > 0) rnum--;
				else          rnum = myarray.length - 1;
			}
			else if (mode=='next')
			{
				if (rnum == myarray.length - 1) rnum = 0;
				else                            rnum++;
			}
			else
			{
				rnum=0;
			}
			
			if (big_or_small == 'small')
				val=2;
			else
				val=0;

			new_html='<table border=0 cellspacing=1 cellpadding=1><tr><td align=center valign=top>';
			new_html+='<table cellspacing=0 cellpadding=0 border=0><tr><td align=center valign=center '+opt+' >'
			new_html+='<a href=\'portfolio.shtml?i='+rnum+'\'>';
			new_html+='<img title="'+ array_name[rnum][4] + '" src="'+array_name[rnum][val]+'" border=0 >';
			new_html+='</td></tr></table>';
			new_html+='</td></tr><tr><td align=center valign=top>';
			new_html+='<a href=\'portfolio.shtml?i='+rnum+'\'>';
			new_html+='<font class=font4>' + array_name[rnum][4] + '</font>';
			new_html+='</a>';
			new_html+='</td></tr></table>';

			div_id.innerHTML=new_html;

		}

		
		