
function getURL(){
		var ret="spanish";
		var domainName=window.location.hostname.toString();
		if (domainName.indexOf('raisesmokefreekids.com')>-1){
			ret="english";
		}
		
	return ret
}
function initHomePage(){

	//ignore english homepage
	
	if (getURL().toString()=="spanish"){
		document.location = "http://www.raisesmokefreekids.com/interiors.aspx?pid=smoking_around_kids_pages&language=spanish&pop=true";
		return;
	}else{
	
		var homeSWF = "parentingLoader.swf"
		FlashControl.createSWFObject(
			homeSWF,
			{
				width:"1017",
				height:"672",
				bgcolor:"#D5E9FB",
				quality:"high",
				align:"middle",
				salign:"tl",
				allowScriptAccess:"sameDomain",
				id:"theswf",		
				wmode:"transparent"				
			},
			"flashWrapper",
			{
				detectFlash:true,
				flashVersion:8,
				detectResolution:false,
				onError:errorHandler
			}
		)
	}
	
	
}
function errorHandler2(err,erros){
}
function errorHandler(err,erros){
	
	var flashWrap = document.getElementById("flashWrapper")
	var htmlWrap = document.getElementById("htmlWrapper")
	
	flashWrap.style.display = "none"
	htmlWrap.style.display = "block"
}
function initPage(){
	if(previewmode == "flash"){		
		//alert(swfname + "?flvpath=" + flvpath);
		FlashControl.createSWFObject(
			swfname + "?flvpath=" + flvpath,
			{
				width:"365",
				height:"206",
				bgcolor:"#000000",
				quality:"high",
				align:"middle",
				salign:"tl",
				allowScriptAccess:"sameDomain",
				id:"theswf"				
			},
			"flv_wrapper",
			{
				detectFlash:true,
				flashVersion:8,
				detectResolution:false,
				onError:errorHandler2
			}
		)
		
	}else{
		window.close
	}
	
}
function load_mov(loc) {
			var leftVal = (screen.availWidth-300)/2;
			var topVal = (screen.availHeight-300)/2;
			var thedest=window.open(loc,null,"height=250,width=410,status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,left=" +leftVal+",top="+topVal);
	}
function close_dom(){
	var	Path = document.getElementById('flv_dom');
	var thestyle = Path.style.display;

	if(thestyle=="none"){
		Path.style.display="block";
	}else{
		Path.style.display="none";
		var	Path2 = document.getElementById('flv_wrapper');
		Path2.innerHTML = "";
	}
	
}

function togglelanguage(it)
{
		location.href = current_location + '&language=' +it	
}


var CornerStyle1 = new CornerController(
			"corners",
			"./data/htmlimages/cornertopleft.gif",
			"./data/htmlimages/cornertopright.gif",
			"./data/htmlimages/cornerbottomright.gif",
			"./data/htmlimages/cornerbottomleft.gif"
		)
		
		var CornerStyle2 = new CornerController(
			"navwrapper",
			"./data/htmlimages/cornertopleft.gif",
			"./data/htmlimages/cornertopright.gif",
			"./data/htmlimages/cornerbottomright.gif",
			"./data/htmlimages/cornerbottomleft.gif"
		)
		
		var CornerStyle3 = new CornerController(
			"auxdatawrapper",
			"./data/htmlimages/cornertopleft.gif",
			"./data/htmlimages/cornertopright.gif",
			"./data/htmlimages/cornerbottomright.gif",
			"./data/htmlimages/cornerbottomleft.gif"
		)