
//////////////////////////////////////////////////////////////////////////////////////////////////////

// LOAD IMAGES
var vote_out = new Image();
vote_out.src = "images/vote_out.gif";
var vote_over = new Image();
vote_over.src = "images/vote_over.gif";

var suggestion_out = new Image();
suggestion_out.src = "images/suggestion_out.gif";
var suggestion_over = new Image();
suggestion_over.src = "images/suggestion_over.gif";

////////////////////////////////////////////////////////////////////////////////////////////////////////////////


// THE POLL FUNCTIONS

var vote_param = -1;
function SetVote(theparam)
{
	vote_param = theparam;
}

function SubmitQuiz()
{
	if(vote_param > 0)
	{
		var id_param = 154;
		var subject_param = "FashionCenter07";
		var voteFormParam = "id=" + id_param + "&subject=" + subject_param + "&vote=" + vote_param + "&viewer_mode=CenterPoll";
		var voteFormLink = "http://www.girlsense.com/kiddonet/polls/saveVotePoll.pl?" + voteFormParam;

		// replace the bg of poll
		document.all.item("quizDiv").innerHTML = "<table border=0 width='100%' height='100%' bgcolor=white><tr><td align=center valign=middle><img border=0 src='images/thanks4voting.gif'></tr></td></table>";

		//submit the poll
		window.open(voteFormLink, "votepopup", "width=397,height=280,resizable=yes");
	}
	else
	{
		alert("Please choose an answer.");
	}
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function UsersSuggestion()
{
	/*  The old Form
	theLink = '/tools/feedback/index.pl?project=FashionCenter';
	activityWinHandler = window.open(theLink,'premiumActivityWinFeedback','scrollbars=auto,toolbar=no,resizable=yes,left=10,top=10,width=480,height=500'); 
	*/
	theLink = 'http://www.girlsense.com/tools/feedback/index_CenterTemplate.pl?project=FashionCenter';
	activityWinHandler = window.open(theLink,'pollsWin','toolbar=no,menubar=no,scrollbar=no,resizable=yes'); 
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function ResizeToInner(innerWidth, innerHeight)
{
	var frameWidth,frameHeight;
	if (self.innerHeight) // all except Explorer
	{
		frameWidth = self.innerWidth;
		frameHeight = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode
	{
		frameWidth = document.documentElement.clientWidth;
		frameHeight = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		frameWidth = document.body.clientWidth;
		frameHeight = document.body.clientHeight;
	}

	var innerWidth = ( innerWidth!=null ? innerWidth : frameWidth );
	var innerHeight = ( innerHeight!=null ? innerHeight : frameHeight );

	difWidth = 0 + innerWidth - frameWidth;
	difHeight = 0 + innerHeight - frameHeight;

	/*
	alert("frameWidth = " + frameWidth + "\n" + "frameHeight = " + frameHeight);
	alert("difWidth = " + difWidth + "\n" + "difHeight = " + difHeight);
	*/

	if (difWidth != 0 )
	{
		window.resizeBy(difWidth,0);
	}
	if (difHeight != 0)
	{
		window.resizeBy(0,difHeight);
	}

	// scroll down
	window.scrollBy(0,120);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function SetNewBgDivsHeight()
{
	var page_height = document.body.scrollHeight;

	// set the centerDiv height
	document.getElementById('centerDiv').style.height = page_height;	

	// set the backgroundDivRepeat height (page height - (top bar + top ad + title image))
	document.getElementById('backgroundDivRepeat').style.height = 10 + (page_height - parseInt(document.getElementById('backgroundDivRepeat').style.top));	
}

function SetFooterTopStyle()
{
	var page_height = document.body.scrollHeight;
	document.getElementById('bottomBarDiv').style.visibility = "visible";
	document.getElementById('bottomBarDiv').style.top = page_height;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////


