function returnDocument() 
{
var file_name = document.location.href;
var end = (file_name.indexOf("?") == -1) ? file_name.length : file_name.indexOf("?");
return file_name.substring(file_name.lastIndexOf("/")+1, end);
}

function AddHypnosisLink()
{
var hyp1 = "<p align='right' class='text'><a href='http://www.hypnosisdownloads.com/#3466!NLPR' title='Hypnosis Downloads.com' target='_blank' rel='nofollow'><img src='http://www.hypnosisdownloads.com/images/48060bann_ani.gif' alt='Hypnosis Downloads' width='468' height='60' border='0'/></a></p>";

var hyp2 = "<p align='right' class='text'><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='468' height='60' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='http://www.hypnosisdirect.com/images/hypnosis_banner.swf' /><param name='flashvars' value='affcode=10791' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /><embed src='http://www.hypnosisdirect.com/images/hypnosis_banner.swf' flashvars='affcode=10791' quality='high' bgcolor='#ffffff' width='468' height='60' align='middle' allowscriptaccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.adobe.com/go/getflashplayer' /></embed></object><p/>";

var hyp3 = "<p align='right' class='text'><a href='http://www.hypnosisdirect.com?10791' rel='nofollow'><img border='0' src='http://www.hypnosisdirect.com/images/hypnosisbanner.gif' width='468' height='60'></p>";

var rand = Math.floor(Math.random()*3+1);

switch (rand)
{
case 1:
  document.write(hyp1);
  break;
case 2:
  document.write(hyp2);
  break;
case 3:
  document.write(hyp3);
  break;
}
}

function AddAmazonBox()
{
var CCode=geoip_country_code();

var usP="<table align='right' width='300' border='0'><tr><td><iframe src='http://rcm.amazon.com/e/cm?t=pl0f-20&o=1&p=12&l=st1&mode=books&search=NLP&fc1=000000&lt1=_blank&lc1=10117D&bg1=FFFFFF&f=ifr' marginwidth='0' marginheight='0' width='300' height='250' border='0' frameborder='0' style='border:none;' scrolling='no'></iframe></td></tr></table>";

var ukP="<table align='right' width='300' border='0'><tr><td><iframe src='http://rcm-uk.amazon.co.uk/e/cm?t=pl0d-21&o=2&p=12&l=st1&mode=books-uk&search=NLP&fc1=000000&lt1=&lc1=10117D&bg1=FFFFFF&f=ifr' marginwidth='0' marginheight='0' width='300' height='250' border='0' frameborder='0' style='border:none;' scrolling='no'></iframe></td></tr></table>";

var usH="<table align='right' width='300' border='0'><tr><td><iframe src='http://rcm.amazon.com/e/cm?t=pl0f-20&o=1&p=12&l=st1&mode=books&search=Hypnosis&fc1=000000&lt1=_blank&lc1=10117D&bg1=FFFFFF&f=ifr' marginwidth='0' marginheight='0' width='300' height='250' border='0' frameborder='0' style='border:none;' scrolling='no'></iframe></td></tr></table>";

var ukH="<table align='right' width='300' border='0'><tr><td><iframe src='http://rcm-uk.amazon.co.uk/e/cm?t=pl0d-21&o=2&p=12&l=st1&mode=books-uk&search=Hypnosis&fc1=000000&lt1=&lc1=10117D&bg1=FFFFFF&f=ifr' marginwidth='0' marginheight='0' width='300' height='250' border='0' frameborder='0' style='border:none;' scrolling='no'></iframe></td></tr></table>";

switch (CCode)
{
case"GB":
    if (SiteID=="P")
        document.writeln(ukP);
	else
        document.writeln(ukH);	
	break;
default:
    if (SiteID=="P")
        document.writeln(usP);
	else
        document.writeln(usH);
    break;
}
}

function AddRelatedArticles()
{
art = new Array (
/* 0*/ "",
/* 1*/ "<a href='what_is_nlp.html'>What is NLP?</a>",
/* 2*/ "<a href='nlp_books.html'>Can NLP books be a substitute for Training?</a>",
/* 3*/ "<a href='affirmations.html'>Can Affirmations be improved with NLP?</a>",
/* 4*/ "<a href='nlp_hypnosis.html'>Is NLP Hypnosis?</a>",
/* 5*/ "<a href='new_code_nlp.html'>What is New Code NLP?</a>",
/* 6*/ "<a href='free_nlp_training.html'>Free NLP - Can you learn NLP for free?</a>",
/* 7*/ "<a href='nlp_motivation.html'>Can I use NLP for Motivation?</a>",
/* 8*/ "<a href='nlp_practitioner_issues.html'>What kind of issues can an NLP Practitioner help with?</a>",
/* 9*/ "<a href='nlp_practitioner_titles.html'>What does an NLP Practitioners certification mean?</a>",
/*10*/ "<a href='nlp_practitioner_anygood.html'>How can I tell if an NLP Practitioner is any good?</a>",
/*11*/ "<a href='nlp_practitioner_mustilike.html'>Must I like my NLP Practitioner?</a>",
/*12*/ "<a href='nlp_practitioner_howmanysessions.html'>How many NLP sessions should I book?</a>",
/*13*/ "<a href='nlp_practitioner_whatisasessionlike.html'>What is an NLP session like?</a>",
/*14*/ "<a href='nlp_practitioner_hypnosis.html'>Do NLP Practitioners use Hypnosis?</a>",
/*15*/ "<a href='nlp_practitioners.html'>NLP Practitioners: The difference that makes the difference</a>",
/*16*/ "<a href='nlp_promises.html'>Has NLP lived up to its promises?</a>",
/*17*/ "<a href='nlp_business_benefits.html'>What are the NLP business benefits?</a>",
/*18*/ "<a href='nlp_in_education.html'>NLP in Education - Why is there so little?</a>",
/*19*/ "<a href='nlp_anchoring.html'>NLP Anchoring - what is it and how can it be used?</a>",
/*20*/ "<a href='nlp_submodalities.html'>NLP Submodalities - what are they, and how do you use them?</a>",
/*21*/ "<a href='nlp_time_lines.html'>NLP Time Lines - what are they how can they be used?</a>",
/*22*/ "<a href='nlp_manipulative.html'>Is NLP manipulative?</a>",
/*23*/ "<a href='nlp_sales_ethical.html'>Is it ethical to use NLP for Sales?</a>",
/*24*/ "<a href='nlp_seduction.html'>Is it ethical to use NLP for Seduction?</a>",
/*25*/ "<a href='nlp_time_line_therapy.html'>What is NLP Time Line Therapy?</a>",
/*26*/ "<a href='nlp_bores.html'>NLP Bores</a>"
);

if (RelatedLink1 > 0)
{
  document.write("<hr/><p class='relatedArticles'>");
  document.write(RelatedTitle);
  document.write("</p><ul>");
  document.write("<li align='left' class='textnocolour'>");
  document.write(art[RelatedLink1]);
  document.write("</li>");
  if (RelatedLink2 > 0)
  {
    document.write("</li><li align='left' class='textnocolour'>");
    document.write(art[RelatedLink2]);
  }
  if (RelatedLink3 > 0)
  {
    document.write("</li><li align='left' class='textnocolour'>");
    document.write(art[RelatedLink3]);
  }
  if (RelatedLink4 > 0)
  {
    document.write("</li><li align='left' class='textnocolour'>");
    document.write(art[RelatedLink4]);
  }
  if (RelatedLink5 > 0)
  {
    document.write("</li><li align='left' class='textnocolour'>");
    document.write(art[RelatedLink5]);
  }
  document.write("</li></ul>");
} 
}

function AddHypnosisLinks()
{
document.writeln("<table align='center' width='300' border='0' bordercolor='#CECECE'><tr><td height='19' bgcolor='#F57F20'><div align='left'><a rel='nofollow' href='http://www.hypnosisdownloads.com/?3466!NLPT' class='whitebold'>Top 10 Hypnosis MP3s</a></div></td></tr><tr><td><div align='left' class='downloadslinks'><a rel='nofollow' href='http://www.hypnosisdownloads.com/downloads/health/exercise.html?3466!NLPT' class='downloadslinks'>More Motivation to Exercise</a><br/><span class='tinytext'>Gain more motivation to exercise.</span><br/><a rel='nofollow' href='http://www.hypnosisdownloads.com/downloads/personal_development/public_speaking.html?3466!NLPT' class='downloadslinks'>Fear of Public Speaking</a><br /><span class='tinytext'>Destroy your fear of public speaking forever.</span><br /><a rel='nofollow' href='http://www.hypnosisdownloads.com/downloads/self_improvement/overcoming_shyness.html?3466!NLPT' class='downloadslinks'>Ease Shyness</a><br /><span class='tinytext'>Gently ease away shyness.</span><br/><a rel='nofollow' href='http://www.hypnosisdownloads.com/downloads/personal_development/improving_concentration.html?3466!NLPT' class='downloadslinks'>Boost Concentration</a><br /><span class='tinytext'>Gain a massive boost in concentration.</span><br /><a rel='nofollow' href='http://www.hypnosisdownloads.com/downloads/weight-loss/think-thin.html?3466!NLPT' class='downloadslinks'>ThinThink</a><br /><span class='tinytext'>Learn how to think like thin people.</span><br /><a rel='nofollow' href='http://www.hypnosisdownloads.com/downloads/weight-loss/super-slim.html?3466!NLPT' class='downloadslinks'>Super Weight Loss</a><br /><span class='tinytext'>Learn how to lose weight fast!</span><br /><a rel='nofollow' href='http://www.hypnosisdownloads.com/downloads/health/weight_loss.html?3466!NLPT' class='downloadslinks'>Dieting Motivation</a><br /><span class='tinytext'>Motivate yourself to go on that special diet.</span><br/><a rel='nofollow' href='http://www.hypnosisdownloads.com/downloads/self_improvement/negative-thinking.html?3466!NLPT' class='downloadslinks'>End Negative Thoughts</a><br/><span class='tinytext'>Put an end to those negative thoughts.</span><br /><a rel='nofollow' href='http://www.hypnosisdownloads.com/downloads/self_improvement/self_esteem.html?3466!NLPT' class='downloadslinks'>Increase Self Esteem</a><br /><span class='tinytext'>Increase your self esteem in minutes.</span><br/><a rel='nofollow' href='http://www.hypnosisdownloads.com/downloads/self_improvement/confidence-builder.html?3466!NLPT' class='downloadslinks'>Get More Confidence</a><br/><span class='tinytext'>Get more confidence now!</span><br /></div></td></tr><tr><td height='1' bgcolor='#F57F20'></tr></table>");
}
	
function AddGoogleAd(type)
{
	
if (/*(type == 1) ||*/ (type == 8)) 
    return;
	
var channels = "google_ad_channel = '";

var color="FF0000";

if (SiteID=="P")
{
    channels = channels + "0937198521+"; // PlanetNLP
    color="121580";
}
else
{
    channels = channels + "2623546129+"; // HypnoticPlanet
	color="000060";
}

switch (type)
{
case 1: /* Banner */
    channels = channels + "0751706756+";
    break;
case 2: /*& Box 1 */
    channels = channels + "2649502086+";
    break;
case 3: /* Box 2 */
    channels = channels + "8692773370+";
    break;
case 4: /* Links */
    channels = channels + "7640690962+";
    break;
case 5: /* Left*/
    channels = channels + "9927787428+";
    break;
case 6: /* Top Banner */
    channels = channels + "1617820409+"; 
    break;
case 7: /* Box 3 */
    channels = channels + "8876673356+"; 
    break;
case 8: /* Banner */
    channels = channels + "4439725314+";
    break;
case 9: /* Banner */
    channels = channels + "3912682947+";
    break;
}

channels = channels + GoogleCode;
channels = channels + "';";

document.writeln("<script type='text/javascript'><!--");
document.writeln("google_ad_client = 'pub-8347880708761868';");
switch (type)
{
case 1: /* Banner */
case 6: /* Top Right Google Banner */   
case 8: /* Google Banner */   
case 9: /* Google Banner */      
    document.writeln("google_ad_width = 468;");
    document.writeln("google_ad_height = 60;");
    document.writeln("google_ad_format = '468x60_as';");
    document.writeln("google_ad_type = 'text';");
    document.writeln(channels);
    document.writeln("google_color_border = 'FFFFFF';");
    document.writeln("google_color_bg = 'FFFFFF';");
    document.write("google_color_link = '");document.write(color);document.writeln("';");
    document.writeln("google_color_text = '000000';");
    document.writeln("google_color_url = '666666';");
    break;
case 2: /*& Box 1 */
case 3: /* Box 2 */
case 7: /* Box 3 */
    document.writeln("google_ad_width = 300;");
    document.writeln("google_ad_height = 250;");
    document.writeln("google_ad_format = '300x250_as';");
    document.writeln("google_ad_type = 'text';");
    document.writeln(channels);
    document.writeln("google_color_border = 'FFFFFF';");
    document.writeln("google_color_bg = 'FFFFFF';");
    document.write("google_color_link = '");document.write(color);document.writeln("';");
    document.writeln("google_color_text = '000000';");
    document.writeln("google_color_url = '666666';");
    break;
case 4: /* Bottom Links */
    document.writeln("google_ad_width = 468;");
    document.writeln("google_ad_height = 15;");
    document.writeln("google_ad_format = '468x15_0ads_al_s';");
    document.writeln(channels);
    document.writeln("google_color_border = 'FFFFFF';");
    document.writeln("google_color_bg = 'FFFFFF';");
    document.write("google_color_link = '");document.write(color);document.writeln("';");
    document.writeln("google_color_text = '000000';");
    document.writeln("google_color_url = '666666';");
    break;
case 5: /* Left hand skyscrapper */    
    document.writeln("google_ad_width = 120;");
    document.writeln("google_ad_height = 600;");
    document.writeln("google_ad_format = '120x600_as';");
    document.writeln("google_ad_type = 'text';");
    document.writeln(channels);
    document.writeln("google_color_border = '8D8D8D';");
    document.writeln("google_color_bg = 'FFFFFF';");
    document.write("google_color_link = '");document.write(color);document.writeln("';");
    document.writeln("google_color_text = '000000';");
    document.writeln("google_color_url = '666666';");
	break;
case 666: /* Top Right Google Banner */    
    document.writeln("google_ad_width = 728;");
    document.writeln("google_ad_height = 90;");
    document.writeln("google_ad_format = '728x90_as';");
    document.writeln("google_ad_type = 'text';");
    document.writeln(channels);
    document.writeln("google_color_border = 'FFFFFF';");
    document.writeln("google_color_bg = 'FFFFFF';");
    document.write("google_color_link = '");document.write(color);document.writeln("';");
    document.writeln("google_color_text = '000000';");
    document.writeln("google_color_url = '666666';");
	break
}
document.writeln("//-->");
document.writeln("</script>");
document.writeln("<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'>");
document.writeln("</script>");
}

function AddRightBlock(row)
{
	switch (RightBlock.charAt(row-1))
    {
    case 'H':
        AddHypnosisLinks();
		break;
    case 'G':
        AddGoogleAd(8);
		break;
	case 'A':
        AddAmazonBox();
	    break;
	case 'O':
		AddGlossary();
		break;
	}
} 

function AddTopBlock(row)
{
	switch (TopBlock.charAt(row-1))
    {
    case 'H':
	    AddHypnosisLink(); 
        break;
	case 'G':
    	AddGoogleAd(6);
        break;
    case 'L':
	    if (SiteID=="P")
	        AddPlanetNLPEmailLink();
		else
    	    AddHypnoticPlanetEmailLink();
        break;
	}	 
}

function AddRightBlocks()
{
document.writeln("<table width='320' bgcolor='#FFFFFF' border=0 cellpadding=0><tr><td height='12'></td></tr><tr><td>");
AddRightBlock(1);
document.writeln("</td></tr><tr><td height='2' align='center'></td></tr><tr><td>");
AddRightBlock(2);
document.writeln("</td></tr><tr><td height='2' align='center'></td></tr><tr><td>");
AddRightBlock(3);
document.writeln("</td></tr><tr><td height='2' align='center'></td></tr><tr><td>");
AddRightBlock(4);
document.writeln("</td></tr></table>");
}