/*
function simpleTrack (sID) {
	
	// example of warners tracking code
	_hbPageView(sID,"/uk/Lady+in+the+Water/Look+in+the+Water");
	
	// disney tracking code
	_hbflash(sID,'n','n','n');

}
*/
function simpleTrack(_folder, _tag){
	var googletrack = "/" +_folder + "/" + _tag;
	
	//_hbPageView(_tag, "/" +_folder);
	
	
	if(_tag == 'trailer+01+percent'){
		setTimeout("changeIframe('video_01.html')",500);
	}
	
	if(_tag == 'trailer+25+percent'){
		setTimeout("changeIframe('video_25.html')",500);
	}
	
	if(_tag == 'trailer+50+percent'){
		setTimeout("changeIframe('video_50.html')",500);
	}
	
	if(_tag == 'trailer+95+percent'){
		setTimeout("changeIframe('video_95.html')",500);
	}
	//
	
	_hbflash(_tag,'n','n','n');
	setTimeout("urchinTracker('" + googletrack + "')", 1000);	
}

function changeIframe(ns){
	document.getElementById('convtrackingiframe').src = "conv_tracking/"+ns;
}

function popUpAndTrack (sID, sUrl, nWidth, nHeight, sType) {

	// and the opening of the link
	if(sType == "self"){
		
		document.location = sUrl;
		
	}else{
	
		window.open(sUrl,sID,'width=' + nWidth + ',height=' + nHeight + '');
	}
	
	simpleTrack(sID);
}

	

function mailtoAndTrack (sID, sBody, sSubject) {
	
	// and the opening of the mail window
	document.location = "mailto:?body=" + sBody + "&subject=" + sSubject;
	
	simpleTrack(sID);
	
}
