function setCk_popup() {
  var date = new Date();
  date.setTime(date.getTime()+1800000); // 30min * 60sec * 1000millisec
  // document.cookie = 'pop=ok; expires='+date.toGMTString()+'; path=/';
  document.cookie = 'pop=ok;'
}

function getCk(name) {
  var nameEQ = name + '=';
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

function check_ch() {
	// checkframe();
	if (window != window.top) {
		top.location.href = this.location.href;
		return;
	}
	if(getCk('pop')!="ok"){
		setCk_popup();
		document.getElementById('cover').style.display='block';
		document.getElementById('index').style.display='none';
	}
	else
		make_visible()
}

function make_visible() {
	document.getElementById('cover').style.display='none';
	document.getElementById('index').style.display='block';
}

var t=setTimeout("make_visible()",10000);

function initslider() {
	document.write('<div id="slider1" class="sliderwrapper">');
	for (var x = 0; x < 7; x++) {
		var s = '<div class="contentdiv"><img src="img_slider/img0' + (x + 1) + '.JPG"  alt="slider"></div>';
		// document.write('<div class="contentdiv"><img src="img_slider/img0' + (x + 1) + '.JPG"  alt="slider"></div>');
		document.write(s);
	}
	document.write('</div>');

	featuredcontentslider.init({
		id: "slider1",
		enablefade: [true, 0.02],
		autorotate: [true, 4000],
		onChange: function(previndex, curindex){ }
})
}

function checkframe() {
	if (window != window.top)
		top.location.href = this.location.href;
}

