function loadCookie(arg){ 
  if(arg){
    cookieData = document.cookie + ";"; 
    startPoint1 = cookieData.indexOf(arg);
    startPoint2 = cookieData.indexOf("=",startPoint1)+1;
    endPoint = cookieData.indexOf(";",startPoint1);
    if(startPoint2 < endPoint && startPoint1 > -1){
      cookieData = cookieData.substring(startPoint2,endPoint);
      cookieData = cookieData;
      return cookieData;
    }
  }
  return false;
}

function openPlayer(){

var os, ua = navigator.userAgent;
x=(screen.width -400);


if(ua.match(/Win/)) {
	wo=window.open("http://www.j-wavemusic.com/Player/","nowonair","width=400,height=380,left="+ x +",top=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,favorites=no,resizable=no");
	wo.focus();
} else if (ua.match(/Mac|PPC/)) {
	wo=window.open("http://www.j-wavemusic.com/Player/index2mac.html","nowonair","width=400,height=380,left="+ x +",top=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,favorites=no,resizable=no");
	wo.focus();
}else{
	wo=window.open("http://www.j-wavemusic.com/Player/","nowonair","width=400,height=380,left="+ x +",top=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,favorites=no,resizable=no");
	wo.focus();
}


}

window.onerror = function () {
	return true;
}
