current_date = new Date();
current_year = current_date.getYear();
if (current_year < 1000)
current_year+=1900;

function writeMiniFooter2()
{	
  document.write('<tr align="center" valign="top">');
  document.write('<td colspan="2" class="footer"><br>');
  document.write('<span class="footer">Forex trading involves significant risk of loss and is not suitable for all investors. <a href="risk-warning.html">Read full disclosure</a><br>Spot Gold and Silver contracts are not subject to regulation under the U.S. Commodity Exchange Act.<br>');
  document.write('44 Wall Street, 7th Floor, New York, New York 10005<br>');
  document.write('Tel: 1.877.FOREXGO (367.3946) or 1.908.731.0750 | Email: <a href="mailto:info@forex.com">info@forex.com</a><br>&copy;' + current_year + ' FOREX.com</span></td>');
  document.write('</tr>');
  document.write('</table></td>');
  document.write('</tr>');
}

function Querystring(qs) { // optionally pass a querystring to parse
	this.params = new Object()
	this.get=Querystring_get
	
	if (qs == null)
		qs=location.search.substring(1,location.search.length)

	if (qs.length == 0) return

// Turn <plus> back to <space>
// See: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1
	qs = qs.replace(/\+/g, ' ')
	var args = qs.split('&') // parse out name/value pairs separated via &
	
// split out each name=value pair
	for (var i=0;i<args.length;i++) {
		var value;
		var pair = args[i].split('=')
		var name = unescape(pair[0])

		if (pair.length == 2)
			value = unescape(pair[1])
		else
			value = name
		
		this.params[name] = value
	}
}

function Querystring_get(key, default_) {
	// This silly looking line changes UNDEFINED to NULL
	if (default_ == null) default_ = null;
	
	var value=this.params[key]
	if (value==null) value=default_;
	
	return value
}


var qs = new Querystring();
  
var v = qs.get("v");

if (v != null)
{
	v = v.toLowerCase();
}

//displayepik is default

function writeHeaderText()
{	
	switch (v)
	{		
    case 'displayepikor' : document.write('<img src="resources/images/landing/dummiesgen/trade_strategy2.gif" width="277" height="18" alt="GET INTO CURRENCY TRADING" /></td></tr><tr><td><p><span style="font-family:Arial, Verdana, Helvetica, sans-serif; font-size:12px; color:#666666; line-height:18px"><b>Currency Trading for Dummies - Getting Started Edition</b>, will help you get the most out of your practice account. Learn how to set up a practical step by step action plan. Get to know the mechanics of forex trading. Learn the fundamental factors that drive currency markets, and how to develop a risk aware trading plan.</span>'); break;
    case 'displayepikbl' : document.write('<img src="resources/images/landing/dummiesgen/trade_strategy2.gif" width="277" height="18" alt="GET INTO CURRENCY TRADING" /></td></tr><tr><td><p><span style="font-family:Arial, Verdana, Helvetica, sans-serif; font-size:12px; color:#666666; line-height:18px"><b>Currency Trading for Dummies - Getting Started Edition</b>, will help you get the most out of your practice account. Learn how to set up a practical step by step action plan. Get to know the mechanics of forex trading. Learn the fundamental factors that drive currency markets, and how to develop a risk aware trading plan.</span>'); break;
    case 'searchepik' : document.write('<img src="resources/images/landing/dummiesgen/trade_strategy2.gif" width="277" height="18" alt="GET INTO CURRENCY TRADING" /></td></tr><tr><td><p><span style="font-family:Arial, Verdana, Helvetica, sans-serif; font-size:12px; color:#666666; line-height:18px"><b>Currency Trading for Dummies - Getting Started Edition</b>, will help you get the most out of your practice account. Learn how to set up a practical step by step action plan. Get to know the mechanics of forex trading. Learn the fundamental factors that drive currency markets, and how to develop a risk aware trading plan.</span>'); break;
		default :  document.write('<img src="resources/images/landing/dummiesgen/trade_strategy2.gif" width="277" height="18" alt="GET INTO CURRENCY TRADING" /></td></tr><tr><td><p><span style="font-family:Arial, Verdana, Helvetica, sans-serif; font-size:12px; color:#666666; line-height:18px"><b>Currency Trading for Dummies - Getting Started Edition</b>, will help you get the most out of your practice account. Learn how to set up a practical step by step action plan. Get to know the mechanics of forex trading. Learn the fundamental factors that drive currency markets, and how to develop a risk aware trading plan.</span>'); break;
	}
}	

function writeSideText()
{	
	switch (v)
	{		
    case 'displayepikor' : document.write('<img src="resources/images/landing/dummiesgen/hdr_forex_advantage_copy2.gif" width="318" height="18"  alt="THE FOREX.COM ADVANTAGE" /><br /><p><font color="#666666"><b>Learn why forex traders choose FOREX.com.</b></font></p><ul class="listStyler"><li>Easy to use trading platform</li><li>Our powerful tools and research</li><li>24 hour support during trading hours</li><li>Forex training & education</li></ul><br>'); break;
    case 'displayepikbl' : document.write('<img src="resources/images/landing/dummiesgen/hdr_forex_advantage_copy2.gif" width="318" height="18"  alt="THE FOREX.COM ADVANTAGE" /><br /><p><font color="#666666"><b>Learn why forex traders choose FOREX.com.</b></font></p><ul class="listStyler"><li>Easy to use trading platform</li><li>Our powerful tools and research</li><li>24 hour support during trading hours</li><li>Forex training & education</li></ul><br>'); break;
    case 'searchepik' : document.write('<img src="resources/images/landing/dummiesgen/hdr_forex_advantage_copy2.gif" width="318" height="18"  alt="THE FOREX.COM ADVANTAGE" /><br /><p><font color="#666666"><b>Learn why forex traders choose FOREX.com.</b></font></p><ul class="listStyler"><li>Easy to use trading platform</li><li>Our powerful tools and research</li><li>24 hour support during trading hours</li><li>Forex training & education</li></ul><br>'); break;
		default :  document.write('<img src="resources/images/landing/dummiesgen/hdr_forex_advantage_copy2.gif" width="318" height="18"  alt="THE FOREX.COM ADVANTAGE" /><br /><p><font color="#666666"><b>Learn why forex traders choose FOREX.com.</b></font></p><ul class="listStyler"><li>Easy to use trading platform</li><li>Our powerful tools and research</li><li>24 hour support during trading hours</li><li>Forex training & education</li></ul><br>'); break;
	}
}	

function writeAdBox()
{	
	switch (v)
	{		
    case 'displayepikor' : document.write('<img src="/resources/images/landing/dummiesgen/graphic_arrow.jpg" width="270" height="142" alt="Get a FREE eBook and practice account - Sign up and start trading today!" />'); break;
    case 'displayepikbl' : document.write('<img src="/resources/images/landing/dummiesgen/graphic_arrow.jpg" width="270" height="142" alt="Get a FREE eBook and practice account - Sign up and start trading today!" />'); break;
    case 'searchepik' : document.write('<img src="/resources/images/landing/dummiesgen/graphic_arrow.jpg" width="270" height="142" alt="Get a FREE eBook and practice account - Sign up and start trading today!" />'); break;
		default :  document.write('<img src="/resources/images/landing/dummiesgen/graphic_arrow.jpg" width="270" height="142" alt="Get a FREE eBook and practice account - Sign up and start trading today!" />'); break;
	}
}	
