var susieSelectionTitle = "For The Summer";

var rand_no = Math.ceil(2*Math.random());
if (rand_no > 2){
    rand_no = 2;
}
else if (rand_no == 0){
    rand_no = 1;
}

//rand_no = 2; // Remove this once NWD deliveries back online

var flashvars = {};
var params = {wmode:"transparent",AllowScriptAccess:"always",allowNetworking:"all"};
var gameparams = {wmode:"transparent",AllowScriptAccess:"always",allowNetworking:"all",scale:"exactfit"};
var attributes = {};
var thisPage = window.location + "";
var pageException = false;
var box1 = "";
var box2 = "";
var box1width = "136";
var box1height = "224";
var box2width = "136";
var box2height = "224";
if (thisPage.indexOf("Waterproofs") > 0){
	box1="http://www.muddypuddles.com/swf/Green_Wellies.swf";
    //box1="";
    box2="http://www.muddypuddles.com/swf/testimonials.swf";		
}
else if (thisPage.indexOf("Coats/Ski-Jacket") > 0){
	//box1width = "136";
	//box1height = "290";
	box1height = "314";
    box1="http://www.muddypuddles.com/swf/summer2010.swf?heading="+susieSelectionTitle;
    box2="http://www.muddypuddles.com/swf/testimonials.swf";		
}
else if (thisPage.indexOf("Ski") > 0){
	//box1width = "136";
	//box1height = "290";
	box1height = "314";
    box1="http://www.muddypuddles.com/swf/summer2010.swf?heading="+susieSelectionTitle;
    box2="http://www.muddypuddles.com/swf/testimonials.swf";		
}
else if (thisPage.indexOf("schools") > 0 || thisPage.indexOf("Schools") > 0){
    box1width = "0";
	box1height = "0";
    box1="";
    box2="http://www.muddypuddles.com/swf/testimonials.swf";		
}
else if (thisPage.indexOf("Winter") > 0){
	//box1width = "136";
	//box1height = "290";
	box1height = "314";
    box1="http://www.muddypuddles.com/swf/summer2010.swf?heading="+susieSelectionTitle;
    box2="http://www.muddypuddles.com/swf/testimonials.swf";		
}
else if (thisPage.indexOf("Adventure") > 0){
	//box1width = "136";
	//box1height = "290";
	box1height = "314";
    box1="http://www.muddypuddles.com/swf/summer2010.swf?heading="+susieSelectionTitle;
    box2="http://www.muddypuddles.com/swf/testimonials.swf";		
}
else if (thisPage.indexOf("Sun") > 0){
	//box1width = "136";
	//box1height = "290";
	box1height = "314";
    box1="http://www.muddypuddles.com/swf/summer2010.swf?heading="+susieSelectionTitle;
    box2="http://www.muddypuddles.com/swf/testimonials.swf";		
}
else if (thisPage.indexOf("Special-Offers") > 0){
	//box1width = "136";
	//box1height = "290";
	box1height = "314";
    box1="http://www.muddypuddles.com/swf/summer2010.swf?heading="+susieSelectionTitle;
    box2="http://www.muddypuddles.com/swf/testimonials.swf";		
}
else if (thisPage.indexOf("cart") > 0){
    box1="http://www.muddypuddles.com/swf/cart"+rand_no+".swf";
	//box1="http://www.muddypuddles.com/swf/Add-Hobby-Horse.swf";	
    box2="http://www.muddypuddles.com/swf/testimonials.swf";		
}
else if (thisPage.indexOf("receipt") > 0){
    box1="https://www.muddypuddles.com/swf/receipt.swf";
    box2="https://www.muddypuddles.com/swf/testimonials.swf";		
}
else if (thisPage.indexOf("checkout") > 0){
    box1="https://www.muddypuddles.com/swf/cart"+rand_no+".swf";
    box2="https://www.muddypuddles.com/swf/testimonials.swf";	
}
else if (thisPage.indexOf("product.aspx?node_id") > 0){
    //box1="http://www.muddypuddles.com/swf/Express_Delivery.swf";
	box1="http://www.muddypuddles.com/swf/summer2010.swf";
    box2="http://www.muddypuddles.com/swf/testimonials.swf";		
}
else if (thisPage.indexOf("lapland.aspx") > 0){
    box1height = "314";
    box1="http://www.muddypuddles.com/swf/summer2010.swf?heading="+susieSelectionTitle;
    box2="http://www.muddypuddles.com/swf/testimonials.swf";		
}
else if (thisPage.indexOf("warmdry.aspx") > 0){
    box1height = "314";
    box1="http://www.muddypuddles.com/swf/summer2010.swf?heading="+susieSelectionTitle;
    box2="http://www.muddypuddles.com/swf/testimonials.swf";		
}
else if (thisPage.indexOf("default_SALE2009.aspx") > 0){
	box1width = "136";
	box1height = "290";
    box1="";
    box2="http://www.muddypuddles.com/swf/testimonials.swf";		
}
else if (thisPage.indexOf("customer-info.aspx") > 0){
    box1="http://www.muddypuddles.com/swf/cart"+rand_no+".swf";
    box2="http://www.muddypuddles.com/swf/testimonials.swf";		
}
else if (thisPage.indexOf("default-promotab.aspx") > 0){
	//box1width = "136";
	//box1height = "290";
	box1height = "314";
    box1="http://www.muddypuddles.com/swf/summer2010.swf?heading="+susieSelectionTitle;
	//box1="";
    box2="http://www.muddypuddles.com/swf/testimonials.swf";		
}
else if (thisPage.indexOf("mind-reading-game.aspx") > 0){
	//box1width = "136";
	//box1height = "290";
	box1height = "314";
    box1="http://www.muddypuddles.com/swf/summer2010.swf?heading="+susieSelectionTitle;
    box2="http://www.muddypuddles.com/swf/testimonials.swf";
	swfobject.embedSWF("http://www.muddypuddles.com/swf/Mind_Reader.swf", "GameHolder", "570", "600", "9.0.0",false, flashvars, gameparams, attributes);
}
else {
	//box1width = "136";
	//box1height = "290";
	box1height = "314";
    box1="http://www.muddypuddles.com/swf/summer2010.swf?heading="+susieSelectionTitle;
	//box1="";
    box2="http://www.muddypuddles.com/swf/testimonials.swf";
}

swfobject.embedSWF(box1, "SidePromoBox", box1width, box1height, "9.0.0",false, flashvars, params, attributes);
swfobject.embedSWF(box2, "SidePromoBox2", box2width, box2height, "9.0.0",false, flashvars, params, attributes);
