					function shuffle_v2(inputArr){
						var valArr = [];
						var k = '', i = 0;
					
						for (k in inputArr) {
							valArr.push(inputArr[k]);
							delete inputArr[k];
						}
						valArr.sort(function() {return 0.5 - Math.random();});
					
						for (i = 0; i < valArr.length; i++) {
							inputArr[i] = valArr[i];
						}
					
						return true;
					}
					
					
					shuffle = function(o){
						for(var j, x, i = o.length; i > 0; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
						return o;
					};
					
			
					Object.prototype.clone = MM_clone;
					
					function MM_clone(){
						var objectClone = new this.constructor();
					
						for(var property in this)
							if(typeof this[property] == 'object' && this[property])
								objectClone[property] = this[property].clone();
							else
								objectClone[property] = this[property];
						
						return objectClone;
					}
					
					function getProperties(){
						tmp = document.getElementById('wt1').getCurrentItem();
						for (var prop in tmp) {
						   alert(prop + '==' + tmp[prop]);
						   }
					}	
					
					function viewVideoDivs(){													
						document.getElementById("lineUpTable").style.visibility = "visible";
						document.getElementById("videoData_1").style.visibility = "visible";
						document.getElementById("videoData_1").style.display = "block";												
					}
		
					//	ratings
					
					function heartSelect(heartNro){
						var voteNro = parseInt(heartNro);
						for (i=1;i<=5;i++){
								var heartId = 'votingHeart'+i;
								var iterationHeart = document.getElementById(heartId);
								if (i<=voteNro){
									iterationHeart.className = 'starOn';
								}else{
									iterationHeart.className = 'starOff';
								}
						}						
						document.getElementById('voteHappyLevel').innerHTML = happyLevelsMessages[voteNro-1];						
						return true;
					}
					
					function heartClear(heartNro){
						var voteNro = parseInt(heartNro);
						for (i=1;i<=5;i++){
							var heartId = 'votingHeart'+i;
							var iterationHeart = document.getElementById(heartId);
							if (i>=voteNro){
								iterationHeart.className = 'starOff';
							}else{
								iterationHeart.className = 'starOn';
							}
						}
						document.getElementById('voteHappyLevel').innerHTML = "";
						return true;
					}

					function heartVote(starNro, firstVideo){
						document.getElementById('votingHeart1').style.visibility = "hidden";
						document.getElementById('votingHeart2').style.visibility = "hidden";
						document.getElementById('votingHeart3').style.visibility = "hidden";
						document.getElementById('votingHeart4').style.visibility = "hidden";
						document.getElementById('votingHeart5').style.visibility = "hidden";
						loadcontent('http://www.latination.tv/actions/ooyalavideos_ops.php?v=' + starNro + '&fv=' + firstVideo, 'initVotes');
						return true;		
					}
					
					function initVotes(firstVideo){
						loadcontent('http://www.latination.tv/actions/ooyalavideos_ops.php?initr=true&fv=' + firstVideo, 'initVotes');
						return true;		
					}

					//	comments
					
					function ViewOrHide(div1, div2, div3, opt){
						// opt = view OR hide

						if(opt == 'view'){
							   document.getElementById(div1).style.display = "block";
							   document.getElementById(div1).style.visibility = "visible";
								
							   document.getElementById(div2).style.display = "none";
							   document.getElementById(div2).style.visibility = "hidden";
				
							   document.getElementById(div3).style.display = "block";
							   document.getElementById(div3).style.visibility = "visible";							   
						}else{				
							  document.getElementById(div1).style.display = "none";
							  document.getElementById(div1).style.visibility = "hidden";
							   			
							  document.getElementById(div2).style.display = "block";
							  document.getElementById(div2).style.visibility = "visible";
				
							  document.getElementById(div3).style.display = "none";
							  document.getElementById(div3).style.visibility = "hidden";
						}						
					}
	
					function commentVideo(option){
						ViewOrHide('comment', 'comment_view', 'comment_hide', option);
						return true;
					}
					
					function viewAllComments(option){
						ViewOrHide('allComments', 'viewAllComments_view', 'viewAllComments_hide', option);
						return true;
					}
					
					function AddComment(){
						var name = document.getElementById("name").value;
						var email = document.getElementById("email").value;
						var comment =  document.getElementById("comment_text").value;

						/*
						if(!validateName(name)){
							alert('Debes ingresar tu nombre.');
							cform.name.focus();
							return false;
						}
						*/
						
						if(!validateEmail(email)){
							alert('Debes ingresar tu email.');
							cform.email.focus();
							return false;
						}
						
						if(!validateComment(comment, false, 10, 100)){
							alert('Debes ingresar tu comentario; al menos ' + 10 + ' caracteres.');
							cform.comment.focus();
							return false;
						}
						
						loadcontent('http://www.latination.tv/actions/ooyalavideos_ops.php?c=true&fv=' + firstVideo + '&cmt=' + comment + '&e=' + email+ '&n=' + name, 'comments');
						document.getElementById('comment').style.display = 'none';
						return false;
					}
					
					function validateEmail(val){
						var reg=/(^[a-zA-Z0-9._-]{1,30})@([a-zA-Z0-9.-]{1,30}$)/;
						if(reg.test(val)){
							return true;
						}else{
							return false;
						}
					}
					
					function validateName(val){
						if(val == '' || !val){
							return false;
						}else{
							return true;
						}
					}
					
					function validateComment(comment, enabledNull, minLong, maxLong){
						var cantCar = comment.length;
						if(comment == ""){
							if(enabledNull){
								return true;
							}else{
								return false;
							}
						}else{
							if(cantCar >= minLong && cantCar <= maxLong) return true;
							else return false;
						}
					}
			
					function trim(s){
						s = s.replace(/\s+/gi,' '); //sacar espacios repetidos dejando solo uno
						s = s.replace(/^\s+|\s+$/gi,''); //sacar espacios blanco principio y final				
						return s;
					}

					function initComments(firstVideo, userEmail){
						cform = document.getElementById('cform');
						cform.name.value = "";
						cform.email.value = userEmail;
						cform.comment_text.value = "";
						loadcontent('http://www.latination.tv/actions/ooyalavideos_ops.php?initc=true&fv=' + firstVideo, 'initComments');
						return true;		
					}
					
					//  ajax
					
					function loadcontent(url, id_contenedor){    
						var pagina_requerida = false;    
						if(window.XMLHttpRequest){       
							pagina_requerida = new XMLHttpRequest();    
						}else 
							if(window.ActiveXObject){       
								try{            
									pagina_requerida = new ActiveXObject("Msxml2.XMLHTTP");        
								}catch(e){           
									try{                
										pagina_requerida = new ActiveXObject("Microsoft.XMLHTTP");            
									}catch(e){            
									}        
								}    
							}else    
								return false; 
				
							pagina_requerida.onreadystatechange = function(){        
								cargarpagina(pagina_requerida, id_contenedor);    
							}    
							
							pagina_requerida.open('GET', url, true);
							pagina_requerida.send(null);
					}		

					function cargarpagina (pagina_requerida, id_contenedor){ 
						var preloadHTML = '<img width="16" height="11" src="img/siteElements/loading_mini.gif" alt="Please wait...">&nbsp;<small style="color:#75D513;">Please wait...</small>';						
						document.getElementById(id_contenedor).innerHTML = preloadHTML;
						if(pagina_requerida.readyState == 4 && (pagina_requerida.status == 200 || window.location.href.indexOf ("http") == - 1))    
							document.getElementById (id_contenedor).innerHTML = pagina_requerida.responseText;
					}
