//close pop-up box
function closePopup()
 {
   $('opaco').toggleClass('hidden').removeAttr('style');
   $('popup').toggleClass('hidden');
   return false;
 }
 function closePopup2()
 {
   $('opaco2').toggleClass('hidden').removeAttr('style');
   $('popup2').toggleClass('hidden');
   return false;
 }

//open pop-up
function showPopup(popup_type)
 {
   //when IE - fade immediately
   if(Prototype.Browser.IE)
   {
     $('opaco').height($(document).getDimensions().height).toggleClass('hidden');
   }
   else
   //in all the rest browsers - fade slowly
   {
     $('opaco').height($(document).getDimensions().height).toggleClass('hidden').fadeTo('slow', 0.7);
   }

   $('popup')
     .html($('popup_' + popup_type).html())
     .alignCenter()
     .toggleClass('hidden');

   return false;
 }
 function showPopup2(popup_type)
 {
   //when IE - fade immediately
   if(Prototype.Browser.IE)
   {
     $('opaco2').height($(document).getHeight()).toggleClass('hidden');
   }
   else
   //in all the rest browsers - fade slowly
   {
     $('opaco2').height($(document).getHeight()).toggleClass('hidden').fadeTo('slow', 0.7);
   }

   $('popup2')
     .html($('popup_' + popup_type).html())
     .alignCenter()
     .toggleClass('hidden');

   return false;
 }
function ifchecked(id){
	var a = document.getElementById(id).style.checked;
	if(a){closePopup();location.href ='index.php?option=com_videok4k&view=videok4k';}
	else{alert('You must check the checkbox in order to view  forKink.');}
}
function uncheck(id){
	var a = document.getElementById(id).style.checked;
	if(a){document.getElementById(id).style.checked = false;}
	else{document.getElementById(id).style.checked = true;}
}

