// Get Random Images Script

// size parameter is used to determine size of image to display
// image should have attribute ' name="people" ' in IMG tag

//functions shows a random memberphoto	
	function writeImg(size,protocol)
	{
        if (!protocol) protocol = "http";
        switch (size) {
            case "large":
        		var inum = Math.round(Math.random() * 15) + 1;
        		var i = (eval(inum<100))?(eval(inum<10)?"00"+inum:"0"+inum):""+inum;
        		//if(document.location.hostname!="home.peoplepc.com") {
        			document.images['people'].src = protocol + "://home.peoplepc.com/i/templates/lg/photo_member_"+i+".jpg";
        		/*} else {
        			document.images['people'].src = document.location.protocol+"//"+document.location.hostname+"/i/templates/lg/photo_member_"+i+".jpg"; }*/
                break;
            case "small":
        		var inum = Math.round(Math.random() * 15) + 1;
        		var i = (eval(inum<100))?(eval(inum<10)?"00"+inum:"0"+inum):""+inum;
        		//if(document.location.hostname!="home.peoplepc.com") {
        			document.images['people'].src = protocol + "://home.peoplepc.com/i/templates/photo_member_"+i+".jpg";
        		/*} else {
        			document.images['people'].src = document.location.protocol+"//"+document.location.hostname+"/i/templates/photo_member_"+i+".jpg"; }*/
                break;
            case "168x98":
        		var inum = Math.round(Math.random() * 15) + 1;
        		var i = (eval(inum<100))?(eval(inum<10)?"00"+inum:"0"+inum):""+inum;
        		//if(document.location.hostname!="home.peoplepc.com") {
        			document.images['people'].src = protocol + "://home.peoplepc.com/i/people/168x98/photo_member_"+i+".jpg";
        		/*} else {
        			document.images['people'].src = document.location.protocol+"//"+document.location.hostname+"/i/people/168x98/photo_member_"+i+".jpg"; }*/
                break;
            case "154x126":
        		var inum = Math.round(Math.random() * 9) + 1;
        		var i = (eval(inum<100))?(eval(inum<10)?"00"+inum:"0"+inum):""+inum;
        		//if(document.location.hostname!="home.peoplepc.com") {
        			document.images['people'].src = protocol + "://home.peoplepc.com/i/people/154x126/ppc_people_"+i+".jpg";
        		/*} else {
        			document.images['people'].src = document.location.protocol+"//"+document.location.hostname+"/i/people/154x126/ppc_people_"+i+".jpg"; }*/
                break;
            case "vfw":
        		var inum = Math.round(Math.random() * 7) + 1;
        		var i = (eval(inum<100))?(eval(inum<10)?"00"+inum:"0"+inum):""+inum;
       			document.images['people'].src = protocol + "://home.peoplepc.com/i/people/vfw/ppc_people_"+i+".jpg";
                break;
            default:
        		var inum = Math.round(Math.random() * 15) + 1;
        		var i = (eval(inum<100))?(eval(inum<10)?"00"+inum:"0"+inum):""+inum;
        		//if(document.location.hostname!="home.peoplepc.com") {
        			document.images['people'].src = protocol + "://home.peoplepc.com/i/templates/lg/photo_member_"+i+".jpg";
        		/*} else {
        			document.images['people'].src = document.location.protocol+"//"+document.location.hostname+"/i/templates/lg/photo_member_"+i+".jpg"; }*/
                break;
         }
  }
