if (document.body.offsetHeight > document.body.scrollHeight) {
	var scrollH = "100%";
} else {
	var scrollH = document.body.scrollHeight;
}

if (location.href.lastIndexOf('/') !=-1) {
	firstpos = location.href.lastIndexOf('/')+1;
	lastpos = location.href.length;
	pageName = location.href.substring(firstpos,lastpos);
	pageURL = location.href;
}

if (photoName == null | photoName == "") {
	var photoName = "";	
}

if (navigator.appName=="Netscape") {
	winW = window.innerWidth;
	winWidth = winW - 17;
}
if (navigator.appName.indexOf("Microsoft")!=-1) {
	winW = document.body.offsetWidth;
	winWidth = winW - 17;
}

var tempLeft02;

if (winWidth >= maxScreen) {
	tempLeft02 = (maxScreen-minScreen) + bgLeft;
} else {
	tempLeft02 = bgLeft;
}

document.write('<div id="bg" style="position:absolute; left:' + tempLeft02 + 'px; top:0px; width:100%; height:' + scrollH + '; z-index:1">');
document.write('<table border="0" cellspacing="0" cellpadding="0" width="100%" height="' + scrollH + '" id="flashBg">');
document.write('<tr>');
document.write('<td height="50" align="top" colspan="2">');
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="100%" height="50">');
document.write('  <param name="movie" value="' + path + 'images/swf/bg.swf">');
document.write('  <param name="quality" value="high">');
document.write('  <param name="scale" value="noscale">');
document.write('  <param name="salign" VALUE="TL" >');
document.write('  <param name="menu" value="false">');
document.write('  <param name="wmode" value="transparent">');
document.write('  <param name="flashVars" value="pageName=' + pageName + '&pageURL=' + pageURL +  '&template=' + template + '&mainPath=' + path + '">');
document.write('  <embed src="' + path + 'images/swf/bg.swf" flashVars="pageName=' + pageName + '&pageURL=' + pageURL +  '&template=' + template +  '&mainPath=' + path + '" width="100%" height="50" wmode="transparent" salign="TL" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" scale="noscale"></embed>');
document.write('</object>');
document.write('</td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td width="4"><img src="' + path + 'images/common/spacer.gif" width="4" height="10"></td>');
document.write('<td bgcolor="#FFFFFF"><img src="' + path + 'images/common/spacer.gif" width="10" height="10"></td>');
document.write('</tr>');
document.write('</table>');
document.write('</div>');

//alert(document.body.scrollHeight);

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="100%" height="' + scrollH + '" id="flashMovie">');
document.write('  <param name="movie" value="' + path + 'images/swf/main.swf">');
document.write('  <param name="quality" value="high">');
document.write('  <param name="swLiveConnect" value="ture">');
document.write('  <param name="scale" value="noscale">');
document.write('  <param name="salign" VALUE="TL" >');
document.write('  <param name="menu" value="false">');
document.write('  <param name="wmode" value="transparent">');
document.write('  <param name="flashVars" value="pageName=' + pageName + '&pageURL=' + pageURL +  '&template=' + template + '&photoName=' + photoName + '&mainPath=' + path + '">');
document.write('  <embed src="' + path + 'images/swf/main.swf" flashVars="pageName=' + pageName + '&pageURL=' + pageURL +  '&template=' + template + '&photoName=' + photoName + '&mainPath=' + path + '" width="100%" height="' + scrollH + '" wmode="transparent" salign="TL" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" scale="noscale" name="flashMovie" swLiveConnect="true"></embed>');
document.write('  </object>');
