

function openImg(_file,_width,_height){
	url = "/large_photo/index.html?"+_file;
	window.open(url,"photoFrame","width="+_width+",height="+_height);
	}

function rollOver_gif(_obj){
	var newFile = _obj.src.substring(0,_obj.src.length-4);
	newFile = newFile+"_2.gif";
	_obj.src = newFile;
}

function rollOut_gif(_obj){
	var newFile = _obj.src.substring(0,_obj.src.length-6);
	newFile = newFile+".gif";
	_obj.src = newFile;
}

function rollOver_jpg(_obj){
	var newFile = _obj.src.substring(0,_obj.src.length-4);
	newFile = newFile+"_2.jpg";
	_obj.src = newFile;
}

function rollOut_jpg(_obj){
	var newFile = _obj.src.substring(0,_obj.src.length-6);
	newFile = newFile+".jpg";
	_obj.src = newFile;
}

function open_win(fname,win_name,opts){
  window.open(fname,win_name,opts);
}

function rollOver_photo(_obj){
	_obj.style.borderColor="#0099FF";
}

function rollOut_photo(_obj){
	_obj.style.borderColor="#666666";
}

function openCoupon(_url){
	window.open(_url,"coupon","width=700,height=500,scrollbars=yes,status=yes,menubar=yes,resizable=yes");
	}


/* 
function addFavorite(){
	window.external.AddFavorite('http://guam.viva-la.com/','ViVa la GUAM');
	}

function embedMain(){
document.write('');
	}
	
*/

function flash_shop1(sid){
	fname = '/image/shops/'+sid+'/1.swf';
	flash(fname,'550','285');
}

function flash_shop2(sid,fwidth,fheight){
	fname = '/image/shops/'+sid+'/2.swf';
	flash(fname,fwidth,fheight);
}

function flash_special(sid){
	fname = '/image/shops/'+sid+'/gallery.swf';
	flash(fname,'510','500');
}

function flash(fname,fwidth,fheight){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+fwidth+'" height="'+fheight+'">  <param name="movie" value="'+fname+'">  <param name="quality" value="high">  <embed src="'+fname+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+fwidth+'" height="'+fheight+'"></embed></object>');

}

function printCoupon(btnAlt){
	var v=0;
	if(navigator.userAgent.match(/msie (\d)/i)){
		v = (eval(RegExp.$1) >= 5) ? 1 : 0;
	}else if(self.innerWidth){
		v = (eval(navigator.appVersion.charAt(0)) >= 4) ? 1 : 0;
	}else{
		v = 0;
	}
	if(v){
		document.write('<form class="btn"><a href="javascript:print()"><img src="/image/coupon_print/btn.gif" ');
		document.write('alt="'+btnAlt+'" onmouseover="rollOver_gif(this)" onmouseout="rollOut_gif(this)"></a></form>');
	}
}
