/* preload png images for IE6 */
function preloadImage(){
	pngImage1 = new Image();
	pngImage1.src = "http://st.sand.msn-int.com/br/DD/IceAge3/images/homeBtn_0.png";

	pngImage2 = new Image();
	pngImage2.src = "http://st.sand.msn-int.com/br/DD/IceAge3/images/homeBtn_1.png";

	pngImage3 = new Image();
	pngImage3.src = "http://st.sand.msn-int.com/br/DD/IceAge3/images/synopsisBtn_0.png";

	pngImage4 = new Image();
	pngImage4.src = "http://st.sand.msn-int.com/br/DD/IceAge3/images/synopsisBtn_1.png";

	pngImage5 = new Image();
	pngImage5.src = "http://st.sand.msn-int.com/br/DD/IceAge3/images/officialBtn_0.png";

	pngImage6 = new Image();
	pngImage6.src = "http://st.sand.msn-int.com/br/DD/IceAge3/images/officialBtn_1.png";

	pngImage7 = new Image();
	pngImage7.src = "http://st.sand.msn-int.com/br/DD/IceAge3/images/messengerBtn_0.png";

	pngImage8 = new Image();
	pngImage8.src = "http://st.sand.msn-int.com/br/DD/IceAge3/images/messengerBtn_1.png";

	pngImage9 = new Image();
	pngImage9.src = "http://st.sand.msn-int.com/br/DD/IceAge3/images/characterBtn_0.png";

	pngImage10 = new Image();
	pngImage10.src = "http://st.sand.msn-int.com/br/DD/IceAge3/images/characterBtn_1.png";

}

function openNewWindow(){
	var tango =	document.getElementById('officialsite');
	tango.setAttribute('target', '_blank');
	var compLink = document.getElementById('competition');
	compLink.setAttribute('target', '_blank');
}

function mailTo(){

	var daReferrer = document.referrer; 
	var email = " "; 
	var subject = "ICE AGE 3 - trailers, downloads, character fun and more"; 

	var defaultUrl = "http://www.iceage3.com/";

	var body_message = "Hi,%0D%0D"; 
	body_message += "Ice Age 3 is released on July 1 2009. Ahead of its release, visit ";
	body_message += defaultUrl;
	body_message += " for trailers, interviews and guest editor spots from the characters, cool downloads and much more!";
	var mailto_link = 'mailto:'+email+'?subject='+subject+'&body='+body_message; 

	var objAnchor = document.getElementById("sendtofriend");
	objAnchor.setAttribute("href",mailto_link);

}

function startFunction(){
	preloadImage();
	
	openNewWindow();

	mailTo();

}

startFunction();