// Get random numbers
function shuffle(size, max){
    arr = new Array(size);
    for(var i = 0; i < size; i++) {
        var n;
        do{
            arr[i] = Math.floor(max*Math.random());
            for( n = 0; n < i; n++) if (arr[n] == arr[i]) break;
        }
        while(n!=i);
    }
    return arr;
}

// Stes display:block for two random LI elements of Featured Camgirls
$(function(){
    ch = shuffle(2,8);
    $('#featct li').each(function(i){
        for (var j = 0; j < 2; j++) {
            var a="ch"+ch[j];
            if (this.id == a){
                document.getElementById(a).style.display="block";
            }
        }
    });
    // Flash movie
    if($('#fla')){
        var dn = Math.floor(4*Math.random())+1;
        $('#fla').html('<object type="application/x-shockwave-flash" data="/misc/demo'+dn+'.swf" width="191" height="257">'+
                        '<param name="movie" value="/misc/demo'+dn+'.swf" />'+
                        '<param name="quality" value="high" />'+
                        '<param name="wmode" value="transparent">'+
                        '<img src="img/noflash.gif" width="191" height="8" alt="No FLASH Player installed" vspace="10" /></object>');
  }
});
