

//  funcion para mostrar tv sorteos super9
function testtimeout()
{
          	var tiempo = new Date();
			var hora = tiempo.getHours();
			var minuto = tiempo.getMinutes();
			
			var fecha = new Date(); 
			var dia = fecha.getDay();
// SUPER9 LUNES A VIERNES -->
		  if ((dia>=1) && (dia<=5)) {
		    if (((hora==22) && (minuto>=50)) || ((hora==23) && ((minuto>=0) && (minuto<=30)))) {
				var so = new SWFObject('http://www.streamixmedia.com/livedemo/mediaplayer-3-16/mediaplayer.swf','mpl','230','230','8');
            	so.addParam('allowscriptaccess','always');
          		so.addParam('allowfullscreen','true');
            	so.addVariable('height','230');
            	so.addVariable('width','230');
            	so.addVariable('type','rtmp');
            	so.addVariable('wmode','transparent');
				so.addVariable('file','rtmp://71.6.203.96/live/canal12');
            	so.addVariable('id','canal12');
            	so.write('player');
				//setTimeout("testtimeout()",3000);
			}

//  SUPER9 SABADOS -->
		  if ((dia==6)) {
		    if (((hora==21) && (minuto>=50)) || ((hora==22) && ((minuto>=0) && (minuto<=30)))) {
				var so = new SWFObject('http://www.streamixmedia.com/livedemo/mediaplayer-3-16/mediaplayer.swf','mpl','230','230','8');
            	so.addParam('allowscriptaccess','always');
          		so.addParam('allowfullscreen','true');
            	so.addVariable('height','230');
            	so.addVariable('width','230');
            	so.addVariable('type','rtmp');
            	so.addVariable('wmode','transparen');
				so.addVariable('file','rtmp://71.6.203.96/live/canal12');
            	so.addVariable('id','canal12');
            	so.write('player');
				//setTimeout("testtimeout()",3000);
			}
		 }
		} 
}

// fin de la funcion para mostrar tv


function popUp(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=320,height=290');");

}



function popUpBrin(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=330,height=540,left = 230,top = 5');");

}



function popUpMBin(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=530,left = 230,top = 5');");

}



function popUpPoc(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=490,height=465,left = 150,top = 35');");

}



function popUpPrem(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=330,height=300,left = 230,top = 150');");

}



function popUpQuin(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=290,height=450,left = 230,top = 20');");

}



function popUpTeleK(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=420,height=460,left = 180,top = 15');");

}



function popUpAzar(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=710,height=400,left = 40,top = 80');");

}



function popUpNews(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=0,statusbar=1,menubar=1,resizable=1,width=530,height=545,left = 110,top = 10');");

}



function cerrar(){ 

window.close() 

} 



function imprimir() {

version = parseInt(navigator.appVersion);

if (version >= 4)

window.print();

}





// Pagina Azar //

function MM_callJS(jsStr) { 

  return eval(jsStr)

}



function mOvr(src,clrOver) {

if (!src.contains(event.fromElement)) {

src.style.cursor = 'hand';

src.bgColor = clrOver;

}}



function mOut(src,clrIn) {

if (!src.contains(event.toElement)) {

src.style.cursor = 'default';

src.bgColor = clrIn;

}}



function mClk(src) {

if(event.srcElement.tagName=='TD'){

src.children.tags('A')[0].click();

}}





function BuscoNumeros() {



Borro();

// Loto

 if (document.formNumeros.Juego[0].checked){numbers(0)};

// Quini6

 if (document.formNumeros.Juego[1].checked){numbers(1)};

// Brinco

 if (document.formNumeros.Juego[2].checked){numbers(2)};

// Poceada

 if (document.formNumeros.Juego[3].checked){numbers(3)};



}



function numbers(Tipo){

// Para LOTO es de 0 a 45(44). -1

// Para Quini6 es de 0 a 46(45). -1

// Para Brinco es de 0 a 40(39). -1

// Para Poceada es de 0 a 100(99). -1



var	maxnumbers;

if (Tipo==3) {

var nummenu = 8;

var numbercount = 8;

}



else {

var nummenu = 6;

var numbercount = 6;

}



if (Tipo==0) maxnumbers = 45;	

if (Tipo==1) maxnumbers = 46;	

if (Tipo==2) maxnumbers = 40;	

if (Tipo==3) maxnumbers = 100;



	var ok = 1;

	r = new Array (numbercount);

	for (var i = 1; i <= numbercount; i++) {

			r[i] = Math.round(Math.random() * (maxnumbers-1))+1;

	}



	for (var i = numbercount; i >= 1; i--) {

		for (var j = numbercount; j >= 1; j--) {

			if ((i != j) && (r[i] == r[j])) ok = 0; 

	   	}   

	}

	if (ok) {

	    		document.formNumeros.Ta1.value=r[1]-1

				document.formNumeros.Ta2.value=r[2]-1

				document.formNumeros.Ta3.value=r[3]-1

				document.formNumeros.Ta4.value=r[4]-1

				document.formNumeros.Ta5.value=r[5]-1

				document.formNumeros.Ta6.value=r[6]-1

				if (Tipo==3) {

				document.formNumeros.Ta7.value=r[7]-1

				document.formNumeros.Ta8.value=r[8]-1}

  		     }

	else numbers(Tipo);

}

//  End -->

function Borro(){

document.formNumeros.Ta1.value=""

document.formNumeros.Ta2.value=""

document.formNumeros.Ta3.value=""

document.formNumeros.Ta4.value=""

document.formNumeros.Ta5.value=""

document.formNumeros.Ta6.value=""

document.formNumeros.Ta7.value=""

document.formNumeros.Ta8.value=""

}


//Chrome Drop Down Menu- Author: Dynamic Drive (http://www.dynamicdrive.com)
//Last updated: June 14th, 06' v2.0

var cssdropdown={
disappeardelay: 500, //set delay in miliseconds before menu disappears onmouseout
disablemenuclick: false, //when user clicks on a menu item with a drop down menu, disable menu item's link?
enableswipe: 1, //enable swipe effect? 1 for yes, 0 for no

//No need to edit beyond here////////////////////////
dropmenuobj: null, ie: document.all, firefox: document.getElementById&&!document.all, swipetimer: undefined, bottomclip:0,

getposOffset:function(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
},

swipeeffect:function(){
if (this.bottomclip<parseInt(this.dropmenuobj.offsetHeight)){
this.bottomclip+=10+(this.bottomclip/10) //unclip drop down menu visibility gradually
this.dropmenuobj.style.clip="rect(0 auto "+this.bottomclip+"px 0)"
}
else
return
this.swipetimer=setTimeout("cssdropdown.swipeeffect()", 10)
},

showhide:function(obj, e){
if (this.ie || this.firefox)
this.dropmenuobj.style.left=this.dropmenuobj.style.top="-500px"
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover"){
if (this.enableswipe==1){
if (typeof this.swipetimer!="undefined")
clearTimeout(this.swipetimer)
obj.clip="rect(0 auto 0 0)" //hide menu via clipping
this.bottomclip=0
this.swipeeffect()
}
obj.visibility="visible"
}
else if (e.type=="click")
obj.visibility="hidden"
},

iecompattest:function(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
},

clearbrowseredge:function(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=this.ie && !window.opera? this.iecompattest().scrollLeft+this.iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth
if (windowedge-this.dropmenuobj.x < this.dropmenuobj.contentmeasure)  //move menu to the left?
edgeoffset=this.dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=this.ie && !window.opera? this.iecompattest().scrollTop : window.pageYOffset
var windowedge=this.ie && !window.opera? this.iecompattest().scrollTop+this.iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight
if (windowedge-this.dropmenuobj.y < this.dropmenuobj.contentmeasure){ //move up?
edgeoffset=this.dropmenuobj.contentmeasure+obj.offsetHeight
if ((this.dropmenuobj.y-topedge)<this.dropmenuobj.contentmeasure) //up no good either?
edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
},

dropit:function(obj, e, dropmenuID){
if (this.dropmenuobj!=null) //hide previous menu
this.dropmenuobj.style.visibility="hidden" //hide menu
this.clearhidemenu()
if (this.ie||this.firefox){
obj.onmouseout=function(){cssdropdown.delayhidemenu()}
obj.onclick=function(){return !cssdropdown.disablemenuclick} //disable main menu item link onclick?
this.dropmenuobj=document.getElementById(dropmenuID)
this.dropmenuobj.onmouseover=function(){cssdropdown.clearhidemenu()}
this.dropmenuobj.onmouseout=function(e){cssdropdown.dynamichide(e)}
this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}
this.showhide(this.dropmenuobj.style, e)
this.dropmenuobj.x=this.getposOffset(obj, "left")
this.dropmenuobj.y=this.getposOffset(obj, "top")
this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
}
},

contains_firefox:function(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
},

dynamichide:function(e){
var evtobj=window.event? window.event : e
if (this.ie&&!this.dropmenuobj.contains(evtobj.toElement))
this.delayhidemenu()
else if (this.firefox&&e.currentTarget!= evtobj.relatedTarget&& !this.contains_firefox(evtobj.currentTarget, evtobj.relatedTarget))
this.delayhidemenu()
},

delayhidemenu:function(){
this.delayhide=setTimeout("cssdropdown.dropmenuobj.style.visibility='hidden'",this.disappeardelay) //hide menu
},

clearhidemenu:function(){
if (this.delayhide!="undefined")
clearTimeout(this.delayhide)
},

startchrome:function(){
for (var ids=0; ids<arguments.length; ids++){
var menuitems=document.getElementById(arguments[ids]).getElementsByTagName("a")
for (var i=0; i<menuitems.length; i++){
if (menuitems[i].getAttribute("rel")){
var relvalue=menuitems[i].getAttribute("rel")
menuitems[i].onmouseover=function(e){
var event=typeof e!="undefined"? e : window.event
cssdropdown.dropit(this,event,this.getAttribute("rel"))
}
}
}
}
}

}



