/* 
Methods for resizing the flash stage at runtime.

setFlashWidth(divid, newW)
divid: id of the div containing the flash movie.
newW: new width for flash movie

setFlashWidth(divid, newH)
divid: id of the div containing the flash movie.
newH: new height for flash movie

setFlashSize(divid, newW, newH)
divid: id of the div containing the flash movie.
newW: new width for flash movie
newH: new height for flash movie

canResizeFlash()
returns true if browser supports resizing flash, false if not. 
*/
var iidpp;

function setFlashWidth(divid, newW){
	document.getElementById(divid).style.width = newW+"px";
}
function setFlashHeight(divid, newH){	
	document.getElementById(divid).style.height = newH+"px";		
}
function setFlashSize(divid, newW, newH){
	setFlashWidth(divid, newW);
	setFlashHeight(divid, newH);
}
function canResizeFlash(){
	var ua = navigator.userAgent.toLowerCase();
	var opera = ua.indexOf("opera");
	if( document.getElementById ){
		if(opera == -1) return true;
		else if(parseInt(ua.substr(opera+6, 1)) >= 7) return true;
	}
	return false;
}

function EmbedPartyPix(iidpp,iidpub,iidpic,iidbiz,swfname)
{ 
	/*
	if ( top != self ){
		if (iidpub == 1){
			var turl = "tigerweekly";
		} else if (iidpub == 3) {
			var turl = "uweekly";
		}
	   if (navigator.userAgent.indexOf('Safari') != -1){
	   	top.location.href='http://'+turl+'.com/partypix/'+iidbiz+'/'+iidpp;
		return;
	   } else {
	   	top.location.replace('http://'+turl+'.com/partypix/'+iidbiz+'/'+iidpp);
		return;
	   }
	}
	*/
	e = canResizeFlash();
      document.write('<object data="http://614columbus.com/staging/photo4/'+swfname+'.swf" width="100%" height="100%" type="application/x-shockwave-flash" ID='+swfname+'>');
      document.write('  <param name="movie" value="http://614columbus.com/staging/photo4/'+swfname+'.swf" />');
      document.write('  <param name="FlashVars" value="allowResize='+e+'&iidpp='+eval(iidpp)+'&iidpub='+eval(iidpub)+'&iidpic='+eval(iidpic)+'&dName='+(location.href)+'&swfname='+swfname+'" />');
	  document.write('  <param name="wmode" value="window" />');
      document.write('  Flash Movie With Resizing Content');
      document.write('</object>'); 
}

function resetFocus()
{
	var toFocus = document.getElementById("partypix");
	toFocus.focus();
}

function goTop()
{
	 window.location.hash = 'top_of_page';
}