// JavaScript Document

function getClassName(id) {
	return (document.getElementById(id)) ? document.getElementById(id).className : "contact_us";	
}

function resizeFlash(){
	var container = document.getElementById("copy_wrapper");
	var copy_bottom = document.getElementById("copy_bottom");
	var inpageFlash_copy = document.getElementById("inpageFlash_copy");
	container.style.top = findPosY(inpageFlash_copy)+"px";
	container.style.left = findPosX(inpageFlash_copy)+"px";
	var swfHeight = findPosY(copy_bottom) - findPosY(container);
	
	inpageFlash_copy.style.height = swfHeight + "px";
	document.getElementById("copySWF").height = swfHeight;	
	return swfHeight;
}

function getFlashWidth(){
	return document.getElementById("inpageFlash_copy").style.width.replace("px","");
}


function findPosX(obj){
	var curleft = 0;
	if(obj.offsetParent) {
		while(1){
			curleft += obj.offsetLeft;
			if(!obj.offsetParent) {
				break;
			}
			obj = obj.offsetParent;
		}
	} else if(obj.x) {
		curleft += obj.x;
	}
	return curleft;
}

function findPosY(obj){
	var curtop = 0;
	if(obj.offsetParent) {
		while(1){
			curtop += obj.offsetTop;
			if(!obj.offsetParent) {
				break;
			}
			obj = obj.offsetParent;
		}
	} else if(obj.y) {
		curtop += obj.y;
	}
	return curtop;
}

var params = {
	menu: "false",
	bgcolor: "#000000",
	scale: "noscale",
	wmode: "opaque"
}
var copy_attributes = {
	id: "copySWF",
	name: "copySWF"
}

var nav_attributes = {
	id: "navSWF",
	name: "navSWF"
}

swfobject.embedSWF("flash/DWH21003_donwhyte_copy_1-0jg.swf", "replace_swf", "100%", "100%", "8.0.0", null, null, params, copy_attributes);
swfobject.embedSWF("flash/DWH21003_donwhyte_nav_1-0jg.swf", "inpageFlash_nav", "245", "350", "8.0.0", null, null, params, nav_attributes);
