
function envia(formul){

    document.getElementById(formul).submit();
}



function imageRotate(in_id,in_movie_name,in_domain,in_alwaysOn,width_,height_,cant)
    {
        var rotateInterval;
        var rotateFunction;
        var rotateImages=new Array();
        var rotatePosition;
        var ele;
        var id;
        var movie_name;
        var domain;
        var alwaysOn;
        var w;
        var h;
		var cantidad;
        this.id=in_id;
        this.movie_name=in_movie_name;
        this.domain=in_domain;
        this.alwaysOn=in_alwaysOn;
        this.w=width_;
        this.h=height_;
		this.cantidad=cant;
        this.init=function(){
                    this.rotateImages=new Array();
                    this.ele=document.getElementById(this.id);
                    this.rotateImages[0]=new Image;
                    this.rotateImages[0].src='http://www.bulldogpit.com/thumbs/'+this.id+''+this.w+''+this.h+'.jpg';//'http://www.bulldogpit.com/imagen.php?id='+this.id+'&w='+this.w+'&h='+this.h+'&type=video';
                    for(var i=1;i<=(this.cantidad);i++){
                        this.rotateImages[i]=new Image;
                        this.rotateImages[i].src='http://photos.bulldogpit.com/M_asig/contenido'+this.movie_name+'/'+i+'.jpg'
                     }
                    var ROT=this;
                    this.rotateFunction=function(){
                                             var pos=ROT.rotatePosition++%ROT.cantidad;
                                            // alert (pos);
                                             ROT.ele.src=ROT.rotateImages[pos].src;
                                          };
                   };
        this.start=function(){
                    if(rotateInterval>0)
                            return;
                    this.rotatePosition=0;
                    setTimeout(this.rotateFunction,150);
                    this.rotateInterval=setInterval(this.rotateFunction,700);
                  };
        this.stop=function(){
                    if(this.alwaysOn)
                        return;
                    clearInterval(this.rotateInterval);
                    this.ele.src=this.rotateImages[0].src;rotatePosition=0;
                 };
         this.init();
         if(this.alwaysOn)
            this.start();
    }
