//Begin client detection
var TICM_na = parseFloat(navigator.appVersion);	
var TICM_napN = navigator.appName.toLowerCase();
var TICM_nu = navigator.userAgent.toLowerCase();

var TICM_isIE=((document.all)&&(TICM_nu.indexOf('opera')==-1))?true:false;
var TICM_isNN4=((document.layers)&&(TICM_na >= 4.03))?true:false;
var TICM_isOpera5up=(TICM_nu.indexOf('opera 5')!=-1)?true:false;
var TICM_isGecko=(TICM_nu.indexOf('gecko')!=-1)?true:false;
var TICM_isDom = document.getElementById?true:false;
var TICM_isNS6 = (TICM_isGecko && TICM_nu.indexOf("/6.") != -1)? true: false;
var TICM_ieMajor=TICM_isIE?parseInt(TICM_nu.slice(TICM_nu.indexOf('msie')+4)):0;
var TICM_isIE4up=TICM_ieMajor >= 4;
var TICM_isIE5up=TICM_ieMajor >= 5;

var TICM_isWin=(TICM_nu.indexOf('win')!=-1)?true:false;
var TICM_isWin98=(TICM_nu.indexOf('windows nt')!=-1)?true:false;
var TICM_isWinNT=(TICM_nu.indexOf('windows 98')!=-1)?true:false;
var TICM_isMac=(TICM_nu.indexOf('mac')!=-1)?true:false;

var TICM_goodClient = (TICM_isIE5up || TICM_isOpera5up || TICM_isNS6 || TICM_isDom);

var TICM_rows=4;
var TICM_cols=16;
var TICM_inpWidthLg=13; 
var TICM_inpWidthSm=9; 

if (TICM_isWin){
	if (TICM_isIE4up||TICM_isOpera5up) {TICM_cols=16; TICM_rows=4; TICM_inpWidthLg=14;}
	if (TICM_isGecko){TICM_cols=16; TICM_inpWidthLg=13;}
	if (TICM_isNS6){TICM_cols=19; TICM_inpWidthLg=14;}
}
else if(TICM_isMac){
		if (TICM_isIE5up||TICM_isOpera5up) {TICM_cols=16; TICM_inpWidthLg=14; TICM_inpWidthSm=10; }
		if (TICM_isNN4){TICM_cols=12; TICM_inpWidthLg=14;}
		if (TICM_isGecko){TICM_cols=12; TICM_inpWidthLg=14; TICM_inpWidthSm=10;}
		if (TICM_isNS6){TICM_cols=11; TICM_inpWidthLg=13;}
	}


//this code is called on submit of form, and turns off popups for 
//24 hours.
function TICM_SetCookie (name,value,expires,path,domain,secure){
        document.cookie = name + escape (value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "; expires=Thu, 01-Jan-1970 00:00:01 GMT") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : ""); 
}
var TICM_day = 86400000; //one day in milliseconds
var TICM_date = new Date();
var TICM_popup2ON = new Date(TICM_date.getTime()+TICM_day);
//End of code for popups

function  TICM_submit(winName,f,h,w){
	if(TICM_check(f)){
       var features = "height=" + h + ",width=" + w + ",scrollbars=yes,location=no"
                   + ",menubar=no,resizable=no,status=yes,directories=no,toolbar=no";
        window.open("",winName,features);
		f.target = winName;
        TICM_SetCookie('popup2OFF','',TICM_popup2ON,'/');
		if(typeof P_isLoaded != "undefined")P_isLoaded = false;
        return true;
	}
    return false;
}

if(document.cookie.indexOf('popup2OFF')!=-1){
	if(typeof P_isLoaded != "undefined")P_isLoaded = false;
}


//Text area copy
var CM_copy = '';

var details = '<textarea readonly cols="'+TICM_cols+'" rows="'+TICM_rows+'" wrap class="input" onChange="this.value=CM_copy;">'+CM_copy+'</textarea>';

// Form Validation Script
function TICM_check(f){
var countries = f.country;
var country;
var canstates = ['AB','BC','MB','NB','NF','NS','NT','ON','PE','QC','SK','YT']

	//t:temporary field value, msg:concatenated error message, good: boolean error tracker	
	var t, msg, good;
   	country = countries.options[countries.selectedIndex].value;  
	msg = "";
	if (!f["salutation"][0].checked && !f["salutation"][1].checked && !f["salutation"][2].checked && !f["salutation"][3].checked){msg+='Please enter your Salutation.\n';}
	if ((f.fullName.value.search(/[A-Za-z]\s[A-Za-z]/) == -1) || (f.fullName.value == null) || (f.fullName.value == '') || isblank(f.fullName.value)) {msg += 'Please enter your Name.\n';}
	if ((f.address1.value == null) || (f.address1.value == '') || isblank(f.address1.value)) msg += "Please enter your Address.\n";	
	if ((f.city.value == null) || (f.city.value == '') || isblank(f.city.value)) msg += "Please enter your City.\n";	
	if (country=='')msg+="Please enter your Country.\n"
		
    good=0; t=f.email.value;
    if (t != null && t != '' && !isblank(t)){
        good=(t.search(/^(\w|-)+(\.(\w|-)+)?@((\w|-)+\.){1,}[a-zA-Z]{2,3}$/)==-1)?0:1;
    }
    
	if(!good)msg+="Please enter a valid E-Mail Address.\n";
   
	if (!f.consent.checked){
    msg+='Please confirm that you have read and accept the Offer Terms.\n';
	}
	if (msg.length) {
		alert ("The form was not submitted because of the following error(s):\n\n" + msg +
			"\n\nPlease correct these error(s) and resubmit your form.\n\nThank you,\nTime Inc. Consumer Services");
		return false;
	}
	return true;
}
// End Form Validation Script

// Utility function to check for blanknocity
function isblank(s){
	for(var i = 0; i < s.length; i++){
		var c = s.charAt(i);
		if ((c != ' ') && (c != '\n') && (c != '\t')) return false;
	}
return true;
}

// Country data and copy
var objPrice=new Object();

			objPrice["ANDORRA"]="&#8364;49.95";
            objPrice["AUSTRIA"]="&#8364;49.95";
            objPrice["AZORES"]="&#8364;34.95";
            objPrice["BELGIUM"]="&#8364;49.95";
            objPrice["BOTSWANA"]="R229";
            objPrice["CANARY_ISLANDS"]="&#8364;34.95";
            objPrice["DENMARK"]="DKr399";
            objPrice["ENGLAND"]="&#163;34.99";
            objPrice["FAROE_ISLANDS"]="DKr399";
            objPrice["FINLAND"]="&#8364;49.95";
            objPrice["FRANCE"]="&#8364;49.95";
            objPrice["GERMANY"]="&#8364;49.95";
            objPrice["GREECE"]="&#8364;34.95";
            objPrice["GREENLAND"]="DKr399";
            objPrice["ICELAND"]="IKR4200";
            objPrice["IRELAND"]="&#8364;49.95";
            objPrice["ISRAEL"]="NIS249";
            objPrice["ITALY"]="&#8364;34.95";
            objPrice["LESOTHO"]="R229";
            objPrice["LIECHTENSTEIN"]="SFR115";
            objPrice["LUXEMBOURG"]="&#8364;49.95";
            objPrice["MADEIRA"]="&#8364;34.95";
            objPrice["MONACO"]="&#8364;49.95";
            objPrice["NAMIBIA"]="R229";
            objPrice["NETHERLANDS"]="&#8364;49.95";
            objPrice["NORTHERN_IRELAND"]="&#163;34.99";
            objPrice["NORWAY"]="NKR399";
            objPrice["PORTUGAL"]="&#8364;34.95";
            objPrice["REP_OF_S_AFRICA"]="R229";
            objPrice["SCOTLAND"]="&#163;34.99";
            objPrice["SPAIN"]="&#8364;34.95";
            objPrice["SWAZILAND"]="R229";
            objPrice["SWEDEN"]="SKR399";
            objPrice["SWITZERLAND"]="SFR115";
            objPrice["WALES"]="&#163;34.99";

var objSavings=new Object();	
			objSavings["ANDORRA"]="76%";
            objSavings["AUSTRIA"]="76%";
            objSavings["AZORES"]="83%";
            objSavings["BELGIUM"]="76%";
            objSavings["BOTSWANA"]="80%";
            objSavings["CANARY_ISLANDS"]="83%";
            objSavings["DENMARK"]="78%";
            objSavings["ENGLAND"]="73%";
            objSavings["FAROE_ISLANDS"]="78%";
            objSavings["FINLAND"]="76%";
            objSavings["FRANCE"]="76%";
            objSavings["GERMANY"]="76%";
            objSavings["GREECE"]="81%";
            objSavings["GREENLAND"]="78%";
            objSavings["ICELAND"]="78%";
            objSavings["IRELAND"]="76%";
            objSavings["ISRAEL"]="75%";
            objSavings["ITALY"]="83%";
            objSavings["LESOTHO"]="80%";
            objSavings["LIECHTENSTEIN"]="67%";
            objSavings["LUXEMBOURG"]="76%";
            objSavings["MADEIRA"]="83%";
            objSavings["MONACO"]="76%";
            objSavings["NAMIBIA"]="80%";
            objSavings["NETHERLANDS"]="76%";
            objSavings["NORTHERN_IRELAND"]="73%";
            objSavings["NORWAY"]="80%";
            objSavings["PORTUGAL"]="83%";
            objSavings["REP_OF_S_AFRICA"]="80%";
            objSavings["SCOTLAND"]="73%";
            objSavings["SPAIN"]="83%";
            objSavings["SWAZILAND"]="80%";
            objSavings["SWEDEN"]="76%";
            objSavings["SWITZERLAND"]="67%";
            objSavings["WALES"]="73%";	

			var objCountryName=new Object();
                  objCountryName["025"]="ANDORRA";
                  objCountryName["047"]="AUSTRIA";
                  objCountryName["053"]="AZORES";
                  objCountryName["019"]="BELGIUM";
                  objCountryName["168"]="BOTSWANA";
                  objCountryName["051"]="CANARY_ISLANDS";
                  objCountryName["035"]="DENMARK";
                  objCountryName["001"]="ENGLAND";
                  objCountryName["036"]="FAROE_ISLANDS";
                  objCountryName["041"]="FINLAND";
                  objCountryName["021"]="FRANCE";
                  objCountryName["015"]="GERMANY";
                  objCountryName["049"]="GREECE";
                  objCountryName["037"]="GREENLAND";
                  objCountryName["038"]="ICELAND";
                  objCountryName["005"]="IRELAND";
                  objCountryName["048"]="ISRAEL";
                  objCountryName["026"]="ITALY";
                  objCountryName["169"]="LESOTHO";
                  objCountryName["045"]="LIECHTENSTEIN";
                  objCountryName["016"]="LUXEMBOURG";
                  objCountryName["054"]="MADEIRA";
                  objCountryName["024"]="MONACO";
                  objCountryName["171"]="NAMIBIA";
                  objCountryName["020"]="NETHERLANDS";
                  objCountryName["002"]="NORTHERN_IRELAND";
                  objCountryName["039"]="NORWAY";
                  objCountryName["052"]="PORTUGAL";
                  objCountryName["167"]="REP_OF_S_AFRICA";
                  objCountryName["004"]="SCOTLAND";
                  objCountryName["050"]="SPAIN";
                  objCountryName["170"]="SWAZILAND";
                  objCountryName["040"]="SWEDEN";
                  objCountryName["046"]="SWITZERLAND";
                  objCountryName["003"]="WALES";

function writePrice(country) {
	if (document.getElementById) {
		if (country != "") document.getElementById("divPrice").innerHTML = "";
		else document.getElementById("divPrice").innerHTML = "";
    }
}

function writeSavings(country) {
	if (document.getElementById) {	
		if (country != "") {
        document.getElementById("divSavings").innerHTML = '<div class="my_div" align="center"><table width="160" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td><p align="left"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">After the free trial period, you&#8217;ll receive 50 more issues - 54 in all - for just ' + objPrice[objCountryName[country]] + '. <b>That&#8217;s a ' + objSavings[objCountryName[country]] + ' saving off the newsstand price!</b> You&#8217;ll also receive the TIME Hand Held Organiser. If you don&#8217;t want to continue with TIME after your trial period, simply return your bill marked "cancel" and owe nothing. Time Europe publishes four double issues a year.  Each counts as two of 54 issues in an annual subscription.  Time Europe may also publish occasional extra issues. Allow 2-3 weeks for delivery of your first issue.</font></td></tr></table></div>';
		}
		else document.getElementById("divSavings").innerHTML = "";
			  
    }
document.images.swap.src = "https://a248.e.akamai.net/f/1016/606/1d/image.timeinc.net/subs2/images/ta/ta_ofie0525bm_cover_premium.gif";
}	    

// begin html for subscription form 


var styles = '<style type="text/css">.my_div {overflow: auto; width: 160px;	height: 85px; background-color: rgb(255,255,255); border-style: solid; border-top-width: 2px; border-top-color: #666666; border-bottom-width: 2px; border-bottom-color: #AAAAAA; border-left-width: 2px; border-left-color: #666666; border-right-width: 2px; border-right-color: #AAAAAA;}</style>';

var form_body = '<table width="470" height="283" border="1" cellpadding="0" cellspacing="0" bordercolor="#333333">'+
'<form name="order" method="post" action="https://subs.timeinc.net/ProcessorServlet.jhtml" onsubmit="return TICM_submit(\'ta_ofie0525bm\',this,\'480\',\'330\');"><input type="hidden" name="per_name" value="ta_ofie0525_lgl"><input type="hidden" name="forward" value="/TA/ta_ofie0525cc.jhtml"><input type="hidden" name="processorName" value="/net/timeinc/subs/user/controller/handler/BasicValetFirstPageOFIE"><input type="hidden" name="error_page" value="/TA/ta_ofie0525bm.jhtml">'+
'<input type="hidden" name="subs_form_id" value="prod/js/ta/ta_ofie0525bm.js" />'+
'<tr><td width="470" height="281" align="left" valign="top">'+
'<table width="470" height="279" border="0" cellpadding="0" cellspacing="0" bordercolor="#000000">'+
'<tr><td height="19" align="left" valign="top"><div align="left"><img src="https://a248.e.akamai.net/f/1016/606/1d/image.timeinc.net/subs2/images/ta/ta_ofie0525bm_redhead.gif" width="85" height="19"></div></td><td bgcolor="#990000">&nbsp;</td></tr>'+
'<tr><td align="left" valign="top" colspan="2"><div align="left"><img src="https://a248.e.akamai.net/f/1016/606/1d/image.timeinc.net/subs2/images/ta/spacer.gif" width="470" height="1"></div></td></tr>'+
'<tr><td align="center" valign="top"> <div align="center"><img src="https://a248.e.akamai.net/f/1016/606/1d/image.timeinc.net/subs2/images/ta/ta_ofie0525bm_cover.gif" width="85" height="264" name="swap"></div></td><td align="left" valign="top">'+
'<table width="385" border="0" cellpadding="0" cellspacing="0">'+
'<tr><td width="209" height="215"><p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Title:<br><input type="hidden" name="salutationEC" value="CHECK_ON_REQUIRED_ON"><input type="radio" value="Mr" name="salutation">Mr.<input type="radio" value="Mrs" name="salutation">Mrs.<input type="radio" value="Ms" name="salutation">Ms.<input type="radio" value="Dr" name="salutation">Dr.<input type="hidden" value="" name="salutation"><br></font>'+
'<font size="1" face="Verdana, Arial, Helvetica, sans-serif">'+
'Name:<br><input type="text" size="28" maxlength="26" name="fullName" class="field"><br>'+
'Address:<br><input type="text" size="28" maxlength="30" name="address1" class="field"><br>'+
'<input type="text" size="28" maxlength="30" name="address2" class="field"><br>'+
'City:<br><input type="text" size="28" maxlength="30" name="city" class="field"><br>'+
'Postcode:<br><input type="hidden" name="zipCodeEC" value="CHECK_ON_REQUIRED_OFF"><input maxlength="9" size="28" name="zipCode" class="field"><br>'+
'Country:<br><select style="font-family: Verdana, Arial, Helvetica; font-size: 11px; color: #000000" name="country" size="1" onchange="writePrice(this.options[this.selectedIndex].value);writeSavings(this.options[this.selectedIndex].value)"><option value="">Select Country</option><option value="025">ANDORRA</option><option value="047">AUSTRIA</option><option value="053">AZORES</option><option value="019">BELGIUM</option><option value="168">BOTSWANA</option><option value="051">CANARY ISLANDS</option><option value="035">DENMARK</option><option value="001">ENGLAND</option><option value="036">FAROE ISLANDS</option><option value="041">FINLAND</option><option value="021">FRANCE</option><option value="015">GERMANY</option><option value="049">GREECE</option><option value="037">GREENLAND</option><option value="038">ICELAND</option><option value="005">IRELAND</option><option value="048">ISRAEL</option><option value="026">ITALY</option><option value="169">LESOTHO</option><option value="045">LIECHTENSTEIN</option><option value="016">LUXEMBOURG</option><option value="054">MADEIRA</option><option value="024">MONACO</option><option value="171">NAMIBIA</option><option value="020">NETHERLANDS</option><option value="002">NORTHERN IRELAND</option><option value="039">NORWAY</option><option value="052">PORTUGAL</option><option value="167">REPUBLIC OF SOUTH AFRICA</option><option value="004">SCOTLAND</option><option value="050">SPAIN</option><option value="170">SWAZILAND</option><option value="040">SWEDEN</option><option value="046">SWITZERLAND</option><option value="003">WALES</option></select><br>'+
'Email:<br><input type="hidden" name="emailEC" value="CHECK_ON_REQUIRED_ON"><input type="text" size="28" maxlength="40" name="email" class="field"><br>'+
'</font></p>'+
'</td><td width="176" align="left" valign="top"><div align="left"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Offer Terms:</font><br>'+
'<span id="divPrice"><div class="my_div" align="center"><table width="160" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td><p align="left"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">TIME magazine gives you more than just a weekly news summary. It provides insightful analysis of important events - from politics to scientific breakthroughs to human endeavour. Plus, it keeps you up to date with the arts, business and society.</font></td></tr></table></div></span><span id="divSavings">&nbsp;</span>'+
'<br><br><br><input type="checkbox" name="consent"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">I agree with the terms<br>and conditions listed above.<br><br><font size="-5"> We will not pass your email<br>address to third parties.</font></font></div></td></tr>'+
'<tr align="left" valign="top"><td colspan="2"><hr align="left" width="385" size="0" noshade></td></tr>'+
'</table>'+
'<table width="385" border="0" cellspacing="0" cellpadding="0">'+
'<tr><td width="190" align="left" valign="top"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">For other countries <a href="http://www.time.com/time/europe/custserv/ofie_jump.html" target="_blank">click here</a>.<br><a href="http://cgi.pathfinder.com/cgi-bin/privacy.pl/time_europe" target="_blank">Privacy Policy</a> and<br><a href="http://cgi.pathfinder.com/cgi-bin/privacy.pl/time_europe2" target="_blank">Terms &amp; Conditions</a>.</font></td><td width="190" align="left" valign="top"><input type="image" src="https://a248.e.akamai.net/f/1016/606/1d/image.timeinc.net/subs2/images/ta/ta_ofie0525bm_submit.gif" width="190" height="20" border="0"></td></tr>'+
'<tr><td colspan="2">&nbsp;</td></tr>'+
'</table>'+
'</td></tr>'+
'</table>'+
'</td></tr>'+
'</table>';

if (TICM_goodClient) {document.write(styles); document.write(form_body);}


//<!--CLD ignore=06-28-06-15:53 ignore-last-modified=06-29-06-11:23 -->
