// JavaScript Document
function blockError(){return true;}
window.onerror = blockError;
function nrcIE(){
if (document.all){return false;}}
function nrcNS(e){
if(document.layers||(document.getElementById&&!document.all)){ 
if (e.which==2||e.which==3){
return false;}}} 
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=nrcNS;
}else{document.onmouseup=nrcNS;document.oncontextmenu=nrcIE;}
document.oncontextmenu=new Function("return false");

var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
win.focus();}

$( function(){
    $.Tooltip.defaults = $.extend( $.Tooltip.defaults, {
        delay      : 10,
        showURL    : false,
        showBody   : " - ",
        track      : true
    });
    $( 'a' ).Tooltip();

});


Shadowbox.init();


$(function() {
    $('#slidetitle').cycle({ 
    fx:    'fade', 
    speed:    600, 
    timeout:  4000, 
	cleartype:  1,
	pause:  1   
});
});


$(function() {
    $('#slideshow1').cycle({ 
    fx:     'fade', 
	timeout:  9000, 
    random:  1 
});
});


function get_tracklist(){
$.get("/playtop.php",function(data){
jQuery('#123').html(data);});
}
$(document).ready(function(){
setInterval("get_tracklist()",60000);
});

//function laatstgespeeld(){
//$.get("last6.php?&random=<?php echo date('sU');?>",function(data){
//jQuery('#lastplayed').html(data);});
//}
//$(document).ready(function(){
//setInterval("laatstgespeeld()",20000);
//});


function time(){
$.get("/time.php",function(data){
jQuery('#time').html(data);});
}
$(document).ready(function(){
setInterval("time()",90000);
});


/* <![CDATA[ */
$(function() {
    $('#slides').cycle({
        fx:     'fade',
        speed:   400,
        timeout: 6000,
        next:   '#next',
        prev:   '#prev',
			cleartype:  1,
	pause:  1,
	random:  1   
    });
});
/* ]]> */

function breakout_of_frame()
{
  if (top.location != location) {
    top.location.href = document.location.href ;
  }
}
