function createflash(){

var winWidth = document.body.clientWidth?document.body.clientWidth:window.innerWidth; 
var winHeight = document.body.clientHeight?document.body.clientHeight:window.innerHeight; 

//find size function start   
 if(winWidth<840){
 var newWidth = "840";
 } else {
 var newWidth = "100%";
 }
 
 if(winHeight<560){
 var newHeight = "560";
 } else {
 var newHeight = "100%";
 }

//html top start
document.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">');
document.write('<head>');
document.write('<title>Sydney Wedding Photographer - Emilio B - Award winning photography studio, Sydney Wedding Photography, Creative, Unique, Professional & Best Wedding Photographer</title>');
document.write('<meta name="description" content="Sydney Wedding Photography by Emilio B. Award Winning Sydney Wedding Photographer will capture stunning photos of your wedding day! Emilio B is a professional wedding photographer in Sydney. Contact Emilio B Creative, Unique, Professional & Best Wedding Photography for the best photos.">');
document.write('<meta name="keywords" content="sydney wedding photography, sydney wedding photographer, wedding photography, wedding photographer, award winning photographer, award winning photography, unique wedding photography, unique wedding photographer, professional wedding photography, professional wedding photographer, best wedding photography, best wedding photographer, creative wedding photography, creative wedding photographer">');
document.write('<meta name="author" content="Emilio B Photography">');
document.write('<style type="text/css"> body { margin: 0; width: '+newWidth+'; height: '+newHeight+'; } </style>');
document.write('<script language="JavaScript" type="text/JavaScript" src="main.js"> </script>');
document.write('</head>');
document.write('<body onLoad="createflash()" onResize="location.reload()">');
//html top end

//flash start
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="'+newWidth+'" height="'+newHeight+'">');
document.write('<param name="movie" value="index.swf" />');
document.write('<param name="quality" value="high" />');
document.write('<param name="BGCOLOR" value="#ffffff" />');
document.write('<PARAM NAME="SCALE" VALUE="exactfit">');
document.write('<embed width="'+newWidth+'" height="'+newHeight+'" SCALE="exactfit" src="index.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#ffffff"></embed>');
document.write('</object>');
//flash end

//html bottom start
document.write('</body>');
document.write('</html>');
//html bottom end
}
