function resizeVOD()
{
tmp1 = outerWidth - innerWidth;
tmp2 = outerHeight - innerHeight;
newWidth = tmp1+728;
newHeight = tmp2+498;
window.resizeTo(newWidth,newHeight);
}

function VODWindow(url)
{
	window.open(url,'VideoOnDemand_Player','scrolling=no,scrollbars=no,resizable=no,toolbar=no,width=728,height=494');
}
function ADWindow(url)
{
	window.open(url,'KABB_Advertisement','scrolling=1,scrollbars=1,resizable=1,toolbar=1');
}

function switchAd(zone) {
  var adwin = document.getElementById('vidad');
  while (adwin.hasChildNodes()) {
    adwin.removeChild(adwin.firstChild);
  }
	top.frames["hiddenadFrame"].location = "/vod/ad/vod_adzone" + zone + ".html";
}
function addisplaynewsInfoReturn(infoText)
{
    var addivDisplay = document.getElementById("vidad");
    if (addivDisplay.innerHTML == infoText) {
	    addivDisplay.style.display = "none";
	}
    addivDisplay.innerHTML = infoText;
    addivDisplay.style.display = "block";
}



function getcatagory(dataname)
{
	var divDisplay = document.getElementById("vidlist");
	divDisplay.innerHTML = '<br><br><br><br><br><br><center><img src="/vod/images/LoadingCircle_orange.gif"> Loading Video List....</center><br><br>';
	top.frames["hiddenlistFrame"].location = "/vod/flashpages/" + dataname + "flashvideo.shtml";
}

function displaynewsInfoReturn(infoText)
{
    var divDisplay = document.getElementById("vidlist");
    if (divDisplay.innerHTML == infoText) {
	    divDisplay.style.display = "none";
	}
    divDisplay.innerHTML = infoText;
    divDisplay.style.display = "block";
}



  function playFlashVideo(vidId) {
	vidPaneID = document.getElementById('vidPane');
      if (vidId=='CLEAR') {
         vidPaneID.style.display='none';
         vidPaneID.innerHTML=''; 
      } 
else
{
         vidPaneID.style.display='block';
         vidPaneID.innerHTML='';
	var vidstring ='<object type="application/x-shockwave-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" data="http://kabb.com//template/flashplayers/xmlstreamplayer.swf?xmlfile=http://kabb.com//vod/flash/'+vidId+'.xml&autostart=true" width="320" height="260" wmode="transparent">';
	vidstring +='<param name="movie" value="http://kabb.com//template/flashplayers/xmlstreamplayer.swf?xmlfile=http://kabb.com//vod/flash/'+vidId+'.xml&autostart=true" />';
	vidstring +='<embed src="http://kabb.com//template/flashplayers/xmlstreamplayer.swf?xmlfile=http://kabb.com//vod/flash/'+vidId+'.xml&autostart=true" width="320" height="260" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	vidstring +='</object>';
	vidPaneID.innerHTML+=vidstring;
}
}

function flip(flipme) {
 var flipmeID = document.getElementById(flipme)
 var hide = "hideMe"
 var show = "showMe"
   if (flipmeID.className == hide){
      flipmeID.className = show
   } else {
      flipmeID.className = hide
      }
	var openPicture ="http://kabb.com/vod/images/minus.gif";
	var closePicture ="http://kabb.com/vod/images/plus.gif";
      var img = flipme+'_img';
      var flipimg = document.getElementById(img);
    if (flipimg!=undefined || flipimg != 'null') {
      if (flipimg.src == closePicture){
         flipimg.src = openPicture; }
      else {
         flipimg.src = closePicture;
      }
    }
}

function fliper(flipme, flipme2) {
 var flipmeID = document.getElementById(flipme)
 var flipme2ID = document.getElementById(flipme2)
 var hide = "hideMe"
 var show = "showMe"
   if (flipmeID.className == hide){
      flipmeID.className = show
   } else {
      flipmeID.className = hide
      }
   if (flipme2ID.className == hide){
      flipme2ID.className = show
   } else {
      flipme2ID.className = hide
      }
}

function mature(flipme){
	var hide = "hideMe"
	var show = "showMe"
	var flipmeID = document.getElementById(flipme)
	if (flipmeID.className == hide){

		input_box=confirm("This video is intended only for mature audiences\nand may include content that is not suitable for children.\n\nIf you are 18 or older and are not bothered by such mature content\nclick OK to view it or CANCEL to skip it");

	if (input_box==true)

	{ 
		if (flipmeID.className == hide){
			flipmeID.className = show
		} 
	}
	}
	else {
	flipmeID.className = hide
	}


	var openPicture ="http://kabb.com/vod/images/minus.gif";
	var closePicture ="http://kabb.com/vod/images/plus.gif";
      var img = flipme+'_img';
      var flipimg = document.getElementById(img);
    if (flipimg!=undefined && flipimg != 'null') {
      if (flipimg.src == closePicture){
         flipimg.src = openPicture; }
      else {
         flipimg.src = closePicture;
      }
    }
}

