/* measures against flicker */

try {
	document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}

/* form reset */
function clear() {
	this.form.reset(); return false;
}

function openwin(url, target, option){
op = "scrollbars=no," + option;
subwin=window.open(url, target, op);
if(subwin.opener==null)subwin.opener=window;
subwin.focus();
}


var windowwidth = screen.availWidth;
var windowheight = screen.availHeight;
if ((navigator.userAgent.match(/Win(dows )?(NT 5\.0|2000)/)) && (navigator.userAgent.match(/MSIE (\d\.\d+)/))) {
windowwidth = 1024;
windowheight = 662;
}

else if ((navigator.userAgent.match(/Win(dows )?(NT 5\.1|XP)/)) && (navigator.userAgent.match(/MSIE (\d\.\d+)/))) {
windowwidth = 1024;
windowheight = 686;
}
else if ((navigator.userAgent.match(/Win(dows )?(NT 6\.0)/)) && (navigator.userAgent.match(/MSIE (\d\.\d+)/))) {
windowwidth = 1024;
windowheight = 696;
}
else{
windowwidth = 1024;
windowheight = 662;
}
function openFullscreenJp(){
if((windowwidth < 1000) || (windowheight < 700) || ((windowheight < 769)&&(navigator.userAgent.match(/Win(dows )?(NT 6\.0)/))&&(navigator.userAgent.match(/MSIE (\d\.\d+)/)))) {
window.open("http://www.agc-group.com/campaign/index.html?auto&lng=jp","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=0,top=0,width="+windowwidth+",height="+windowheight);
}
else if((windowwidth < 1000) || (windowheight < 700) || ((windowheight < 769)&&(navigator.userAgent.match(/Win(dows )?(NT 5\.0|2000)/)) && (navigator.userAgent.match(/MSIE (\d\.\d+)/)))) {
window.open("http://www.agc-group.com/campaign/index.html?auto&lng=jp","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=0,top=0,width="+windowwidth+",height="+(windowheight-28));
}

else {
window.open("http://www.agc-group.com/campaign/index.html?hidden&lng=jp","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=0,top=0,width=1024,height="+windowheight);
}
}

/*   2008/08/05 // */
function openFullscreenJp02(){
if((windowwidth < 1000) || (windowheight < 700) || ((windowheight < 769)&&(navigator.userAgent.match(/Win(dows )?(NT 6\.0)/))&&(navigator.userAgent.match(/MSIE (\d\.\d+)/)))) {
window.open("http://www.agc-group.com/campaign/tvcm/index.html","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=0,top=0,width=760,height="+windowheight);
}
else if((windowwidth < 1000) || (windowheight < 700) || ((windowheight < 769)&&(navigator.userAgent.match(/Win(dows )?(NT 5\.0|2000)/)) && (navigator.userAgent.match(/MSIE (\d\.\d+)/)))) {
window.open("http://www.agc-group.com/campaign/tvcm/index.html","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=0,top=0,width=760,height="+(windowheight-28));
}

else {
window.open("http://www.agc-group.com/campaign/tvcm/index.html?hidden&lng=jp","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=0,top=0,width=760,height="+windowheight);
}
}
/* // 2008/08/05  */

function openFullscreenEn(){
if((windowwidth < 1000) || (windowheight < 700) || ((windowheight < 769)&&(navigator.userAgent.match(/Win(dows )?(NT 6\.0)/))&&(navigator.userAgent.match(/MSIE (\d\.\d+)/)))) {
window.open("http://www.agc-group.com/campaign/index.html?auto&lng=en","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=0,top=0,width="+windowwidth+",height="+windowheight);
}
else if((windowwidth < 1000) || (windowheight < 700) || ((windowheight < 769)&&(navigator.userAgent.match(/Win(dows )?(NT 5\.0|2000)/)) && (navigator.userAgent.match(/MSIE (\d\.\d+)/)))) {
window.open("http://www.agc-group.com/campaign/index.html?auto&lng=en","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=0,top=0,width="+windowwidth+",height="+(windowheight-28));
}
else {
window.open("http://www.agc-group.com/campaign/index.html?hidden&lng=en","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=0,top=0,width=1024,height="+windowheight);
}
}
