
//find query attached-------------------------------------------------------------------------------------
var pageLoc = String(document.location);
var queryPos = pageLoc.indexOf("?");
var queryString = (queryPos < 0) ? "" : pageLoc.substring(queryPos);

function getQueryVariable(variable) {
	var query = window.location.search.substring(1);
	var vars = query.split("&");
	for (var i=0;i<vars.length;i++) {
		var pair = vars[i].split("=");
		if (pair[0] == variable) {
			return pair[1];
		}
	}
}



//popup-------------------------------------------------------------------------------------
function openWindow(url)
{
    win=window.open(url,"new","directories=yes,location=yes,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes");
	win.focus();
}

function popWindow1( url, width, height, windowName )
{
	//get center coords
	var left = (screen.width - width) / 2;
    var top = (screen.height - height) / 2;
    
    win=window.open(url, windowName, 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);
	win.focus();
}


//exit links-------------------------------------------------------------------------------------
//exitLink = new Array();
//exitLink[0] = escape("Exit_Dinosaurs_sell+movies_television_order");//





//movies define functions-------------------------------------------------------------------------------------
//order now seasons 1&2
function popBuy()
{
	
	openWindow("http://go-disneyshopping.com/DinosaursTheCompleteFirstandSecondSeasons4DiscDVD");
}

//order now seasons 3&4
function popBuy2()
{
	
	openWindow("http://go-disneyshopping.com/DinosaursCompleteThirdandFourthSeasons4DiscDVD");
}


//contest
function popContest()
{
	popWindow1("contest.html",455,580,"contest");
}


//buddy icon
function popBuddy()
{
	popWindow1("buddy_icon.html",455,580,"buddy");
}


//trailer
function popTrailer()
{
	popWindow1("GetYourOwnTrailer.html",610,530,"Trailer");
}


//1
function popWall1small()
{
	openWindow("wall1small.html");
}

function popWall1med()
{
	openWindow("wall1med.html");
}
function popWall1lrg()
{
	openWindow("wall1lrg.html");
}


//2
function popWall2small()
{
	openWindow("wall2small.html");
}

function popWall2med()
{
	openWindow("wall2med.html");
}
function popWall2lrg()
{
	openWindow("wall2lrg.html");
}


//3
function popWall3small()
{
	openWindow("wall3small.html");
}

function popWall3med()
{
	openWindow("wall3med.html");
}
function popWall3lrg()
{
	openWindow("wall3lrg.html");
}


//4
function popWall4small()
{
	openWindow("wall4small.html");
}

function popWall4med()
{
	openWindow("wall4med.html");
}
function popWall4lrg()
{
	openWindow("wall4lrg.html");
}


//Character clips
function popEarl()
{
	popWindow1("http://www.totaleclips.com/player/splash.aspx?clipid=e32275&custid=3&playerid=2",340,480,"character");
}

function popGrandma()
{
	popWindow1("http://www.totaleclips.com/player/splash.aspx?clipid=e32274&custid=3&playerid=2",340,480,"character");
}

function popFran()
{
	popWindow1("http://www.totaleclips.com/player/splash.aspx?clipid=e32276&custid=3&playerid=2",340,480,"character");
}

function popChar()
{
	popWindow1("http://www.totaleclips.com/player/splash.aspx?clipid=e32285&custid=3&playerid=2",340,480,"character");
}
function popRobbie()
{
	popWindow1("http://www.totaleclips.com/player/splash.aspx?clipid=e32278&custid=3&playerid=2",340,480,"character");
}

function popBaby()
{
	popWindow1("http://www.totaleclips.com/player/splash.aspx?clipid=e32282&custid=3&playerid=2",340,480,"character");
}

function popClipsSE1()
{
	popWindow1("http://www.totaleclips.com/player/splash.aspx?clipid=e26607&custid=3&playerid=2",340,480,"character");
}

function popClipTrailer()
{
	popWindow1("http://www.totaleclips.com/player/splash.aspx?clipid=e31499&custid=3&playerid=2",340,480,"character");
}

//clips
function popClips1()
{
	popWindow1("http://www.totaleclips.com/player/splash.aspx?clipid=e32292&custid=3&playerid=2",340,480,"character");
}

function popClips2()
{
	popWindow1("http://www.totaleclips.com/player/splash.aspx?clipid=e32294&custid=3&playerid=2",340,480,"character");
}
function popClips3()
{
	popWindow1("http://www.totaleclips.com/player/splash.aspx?clipid=e32295&custid=3&playerid=2",340,480,"character");
}

function popClips4()
{
	popWindow1("http://www.totaleclips.com/player/splash.aspx?clipid=e32297&custid=3&playerid=2",340,480,"character");
}

//Bonus
function popBonus1()
{
	popWindow1("http://www.totaleclips.com/player/splash.aspx?clipid=e32289&custid=3&playerid=2",340,480,"character");
}

function popBonus2()
{
	popWindow1("http://www.totaleclips.com/player/splash.aspx?clipid=e32287&custid=3&playerid=2",340,480,"character");
}
function popBonus3()
{
	popWindow1("http://www.totaleclips.com/player/splash.aspx?clipid=e26880&custid=3&playerid=2",340,480,"character");
}
function popBonus4()
{
	popWindow1("http://www.totaleclips.com/player/splash.aspx?clipid=e26881&custid=3&playerid=2",340,480,"character");
}