var myWidth = 0, myHeight = 0;
var scrOfX = 0, scrOfY = 0;
var offsetX = 0, offsetY = 0;
function alertSize() {
	if( typeof( window.innerWidth ) == 'number' ) {
		myWidth = window.innerWidth; myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth ||document.documentElement.clientHeight ) ) {
		myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		myWidth = document.body.clientWidth; myHeight = document.body.clientHeight;
	}
}
function getScrollXY() {
	if( typeof( window.pageYOffset ) == 'number' ) {
		scrOfY = window.pageYOffset; scrOfX = window.pageXOffset;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		scrOfY = document.body.scrollTop; scrOfX = document.body.scrollLeft;
	} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		scrOfY = document.documentElement.scrollTop; scrOfX = document.documentElement.scrollLeft;
	}
}
function offsetXY() {
	alertSize();
	getScrollXY();
         offsetX = Math.round(myWidth / 2)  - (scrOfX + 220);
         offsetY = scrOfY + (Math.round(myHeight / 2)  - 230);
}
function spawnPopup(){
	offsetXY();
	new popUp(offsetX, offsetY, 440, 460, "Div2", "<center><form method=\"post\" action=\"http://app.icontact.com/icp/signup.php\" id=\"icpsignup\" accept-charset=\"UTF-8\" onsubmit=\"return verifyRequired(); \"><input type=\"hidden\" name=\"listid\" value=\"6457\" /><input type=\"hidden\" name=\"specialid:6457\" value=\"JMT5\" /><input type=\"hidden\" name=\"clientid\" value=\"145812\" /><input type=\"hidden\" name=\"formid\" value=\"655\" /><input type=\"hidden\" name=\"reallistid\" value=\"1\" /><input type=\"hidden\" name=\"doubleopt\" value=\"0\" /><input type=\"hidden\" name=\"redirect\" value=\"http://www.theglassslipper.co.uk/blog/styling/newsletter/thank-you/\" /><input type=\"hidden\" name=\"errorredirect\" value=\"http://www.icontact.com/www/signup/error.html\" /><table id=\"staticbox\"><tr><td colspan=\"2\"><center><div align=\"center\"><font color=\"#0000ff\" size=\"5\" face=\"Verdana\"><strong>WAIT!</strong></font> <br /></font><div align=\"center\"><font color=\"#000000\" size=\"2\" face=\"Verdana\"><strong>Before you read any further, let me send you fortnightly styling newsletters to show you how to look and feel fabulous every day</strong></font></div><p><font color=\"#0000ff\" size=\"2\" face=\"Verdana\"><strong>It's yours FREE...</strong></font><br /><br /><font size=\"2\" face=\"Verdana\"><span>Enter Your Name &amp; Email To Get Your Free <br /><font color=\"#0000ff\" size=\"2\" face=\"Verdana\"><strong>Styling Newsletter</strong> </font>sent to you every fortnight.</span></font></p><p><font size=\"2\" face=\"Verdana\" color=\"#0000ff\"><strong><font size=\"1\">Special Bonus!</font></strong> </font><font size=\"1\" face=\"Verdana\">Receive 22 FREE Hair, Beauty <br />and Styling Top Tips when you join now!<br /><br /></font></p></div></center></td></tr><tr><td width=\"307\"><div align=\"right\">Name:</div></td><td width=\"466\"><input type=\"text\" id=\"fields_fname\" name=\"fields_fname\" onfocus=\"ClearFields('fields_fname');\" /></td></tr><tr><td><div align=\"right\">Email:</div></td><td><input type=\"text\" id=\"fields_emailshort\" name=\"fields_email\" onfocus=\"ClearFields('fields_email');\" /></td></tr><tr><td height=\"20\">&nbsp;</td><td height=\"20\">&nbsp;</td></tr><tr><td colspan=\"2\"><center><div align=\"center\"><img src=\"http://www.theglassslipper.co.uk/_images/newsletters/I-hate-spam.png\" alt=\"\" width=\"190\" height=\"61\" /><br /></div></center></td></tr><tr><td align=\"center\" colspan=\"2\"><input name=\"submit\" type=\"submit\" class=\"button\" value=\"Send\" /></td></tr></table></form></center>", "white", "black", "10pt sans-serif", "Wait! Read this first!", "#866F5B", "white", "E9D1CF", "#FAE2CF", "black", true, false, false, true, false, false,'/_images/popup/min.gif','/_images/popup/max.gif','/_images/popup/close.gif','/_images/popup/resize.gif');
}
setTimeout('spawnPopup();', 15 * 1000);