//-------------- select css --------------

if (navigator.appVersion.indexOf('Mac') != -1){
document.write('<LINK REL=stylesheet HREF="/css/mac.css" TYPE="text/css">');
}else{
document.write('<LINK REL=stylesheet HREF="/css/win.css" TYPE="text/css">');
}

//-------------- jump menu --------------

function MM_jumpMenu(targ,selObj,restore){ //v3.0
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}

//-------------- open win --------------

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//-------------- change imgs --------------

/*
var theImages = new Array() // do not change this

theImages[0] = '/images/top/top_photo2.jpg'
theImages[1] = '/images/top/top_photo3.jpg'

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'" width="260" height="255" alt="ウエディングドレス　タイプ別診断" border="0">');
}
*/

function resizeImage(objImg, width, height) {
	crx = objImg.width / width;
	cry = objImg.height / height;
	if( crx > 1 || cry > 1 ) {
		if( crx > cry ) {
			objImg.width = width;
		} else {
			objImg.height = height;
		}
	}
}

function resizeImg(objImg, width, height) {
	crx = objImg.width / width;
	cry = objImg.height / height;
	if( crx > 1 || cry > 1 ) {
		if( crx > cry ) {
			objImg.width = width;
		} else {
			objImg.height = height;
		}
	}
}
