//
//
//
function writeMainSWF(){
	//
	getRand = Math.floor(Math.random()*10000);
	//
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" height="100%" id="mainFlash" align="middle">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
	document.write('<param name="movie" value="wedding.swf" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="scale" value="noscale" />\n');
	document.write('<param name="bgcolor" value="#011330" />\n');
	document.write('<embed src="wedding.swf" quality="high" scale="noscale" bgcolor="#011330" width="100%" height="100%" id="embeddedFlash" name="mainFlash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
	document.write('</object>\n');
	}//  function writeMainSWF()
//
//
//
function doNW(grabURL){
	var screenWidth = 800;
	var screenHeight = 600;
	//
	if (parseInt(navigator.appVersion)>3) {
		screenWidth = screen.width;
		screenHeight = screen.height;
		}
	if(screenWidth > 1000){
		grabWidth = 990;
		grabHeight = 680;
	}else{
		grabWidth = 760;
		grabHeight = 460;
		};
	var nw = window.open(grabURL,"gallery","toolbar=no, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=yes, width=" + grabWidth + ", height=" + grabHeight + ", top=0, left=0");
	nw.focus();
	};
//
//
//
function checkSize(){
	//
	var flashWidth = 960;
	var flashHeight = 708;
	//alert("in checkSize()");
  //alert("checking height and width\noffsetWidth = " + document.body.offsetWidth + "\noffsetHeight = " + document.body.offsetHeight + "\ngetElementById.width = " + document.getElementById('mainFlash').width + "\ngetElementById.height = " + document.getElementById('mainFlash').height);
	//
	if (document.body.offsetWidth < flashWidth){
  	document.getElementById('mainFlash').width = flashWidth + 'px';
		if (document.getElementById('embeddedFlash')){
   		document.getElementById('embeddedFlash').width = flashWidth + 'px';
  		}//  if
	} else {
  		document.getElementById('mainFlash').width = '100%';
  		if (document.getElementById('embeddedFlash')){
   			document.getElementById('embeddedFlash').width = '100%';
   			}//  if
	}//  if
	//
 	if (document.body.offsetHeight < flashHeight){
  	document.getElementById('mainFlash').height = flashHeight + 'px';
  	if (document.getElementById('embeddedFlash')){
   		document.getElementById('embeddedFlash').height = flashHeight + 'px';
  	}//  if
  //
   } else {
  	document.getElementById('mainFlash').height = '100%';
 		if (document.getElementById('embeddedFlash')){
   		document.getElementById('embeddedFlash').height = '100%';
   		}//  if
  	}//  if
}//  function checkSize()
//
//
//window.onresize = checkSize;
//window.onload = checkSize;
//
//