


function add_form_values(email,day,month,year,thetitle,description,day_marks,youtube){
	
		//
		atlasTracking("thankyou");
		
		document.getElementById('email').value = theBigReplace(email);
		document.getElementById('day').value = theBigReplace(day);
		document.getElementById('month').value = theBigReplace(month);
		document.getElementById('year').value = theBigReplace(year);
		document.getElementById('title').value = theBigReplace(thetitle);
		document.getElementById('description').value = theBigReplace(description);
		document.getElementById('day_marks').value = theBigReplace(day_marks);
		document.getElementById('youtube').value = theBigReplace(youtube);
		//alert("Your form has been submitted.")
		document.thefrm.submit();
		
		
	}

function theBigReplace(str){
	str = str.split("'").join("\'");
	str = str.split("[sq]").join("\'");
	str = str.split("[dq]").join('"');
	return str
}
function showframe(){
	document.getElementById('youtube').style.display="block";
}
function cancel_upload(){
	initOpenAux();
}
function playYouTubeVideo(embedCode, theDate){
	trackDetail("/showYouTube/"+theDate)
	initYouTubeSlide()
	initSplatterSlide_Right()
	initSplatterSlide_Left()
	
	var theEmbedCode = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="475" height="381"><param name="movie" value="http://www.youtube.com/v/' + embedCode + '&hl=en&fs=1"></param><param name="allowFullScreen" value="false"></param><embed src="http://www.youtube.com/v/' + embedCode + '&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="false" width="475" height="381"></embed></object>'
	
	
	var	Path = document.getElementById('dom_wrapper').style.display="block";
	var	Path2 = document.getElementById('dom_holder').style.display="block";
	var youTubeDiv = document.getElementById('youtube')
	var flashDiv = document.getElementById('content_wrapper')
	
	flashDiv.style.height = "1px"
	flashDiv.style.width = "1px"
	youTubeDiv.innerHTML = theEmbedCode
	//load_dom('1')
	
}
function atlasTracking(page){
	//alert("Thank you")
	var actionTag = ""
	switch(page){
		case "thankyou":
			//trackDetail('/thankyou');
			actionTag = "catcid_ThankyoupageSubmissionofmoment_1"
			break;
		case "banner":
			actionTag = "catcid_CessationBannerLink_1"
			break;
		case "fixnixer":
			actionTag = "catcid_Fixnixer_1"
			break;
		case "quitdoingit":
			actionTag = "catcid_QuitDoingItLabs_1"
			break;
	}
	var imgObject = new Image();
	imgObject.src = 'http://switch.atdmt.com/action/' + actionTag
}
function close_YouTube(){
	
	initYouTubeSlide_Close()
	
	
	
	initSplatterSlide_Right_close()
	initSplatterSlide_Left_close()
	setTimeout(closedoms,1000);
	
	var flashDiv = document.getElementById('content_wrapper')
	flashDiv.style.height = "100%"
	flashDiv.style.width = "100%"
	//document.title = "The Cigarette is Dead - Mark Your Moment"
	//load_dom('0')
}
function closedoms(){
	var	Path = document.getElementById('dom_wrapper').style.display="none";
	var	Path2 = document.getElementById('dom_holder').style.display="none";
	var youTubeDiv = document.getElementById('youtube')
	youTubeDiv.innerHTML = ''

}
function testOnLoad(){
	//alert("onload called")
	//playYouTubeVideo("dd")
	
}