$(document).ready(function() { init_js(); });

function init_js()
{
  jQuery.prettyLoader();
  init_events();
  if (self.dispCO) { dispCO(); }
  window.onresize = dispCO;
}

function init_events()
{
  $('.ajax_form').submit(function (e) { e.preventDefault(); });
  $('.ajax_link').submit(function (e) { e.preventDefault(); });
}

function dispCO()
{
	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
	  winW = window.innerWidth;
	  winH = window.innerHeight;
	 }
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
	  winW = document.body.offsetWidth;
	  winH = document.body.offsetHeight;
	 }
	}
	if (winW<1020 || winH<640) hideContent('comocean');
	else displayContent('comocean');
}

function preloadImages() {
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function hideContent(id) {
  if(document.getElementById(id)) document.getElementById(id).style.display='none'; return null;
}

function displayContent(id) {
  if(document.getElementById(id)) document.getElementById(id).style.display='block'; return null;
}
