
if (parent.frames.length > 0) 
{
parent.location.href = location.href;
}

function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else 
countfield.value = maxlimit - field.value.length;
}


function disableForm(theform) {
if (document.all || document.getElementById) {
for (i = 0; i < theform.length; i++) {
var tempobj = theform.elements[i];
if (tempobj.type.toLowerCase() == "submit" || tempobj.type.toLowerCase() == "reset")
tempobj.disabled = true;
}
return true;
}
}

function cmstartdate()
{
myDays=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
$try= document.form1.editend_day.options[document.form1.editend_day.options.selectedIndex].text + ' ' + document.form1.editend_month.options[document.form1.editend_month.options.selectedIndex].text + ', ' +document.form1.editend_year.options[document.form1.editend_year.options.selectedIndex].text
myDate=new Date(eval('"'+$try+'"'))
document.form1.startbox.value=myDays[myDate.getDay()]
}

function cmenddate()
{
myDays=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
$try= document.form1.editend_day.options[document.form1.editend_day.options.selectedIndex].text + ' ' + document.form1.editend_month.options[document.form1.editend_month.options.selectedIndex].text + ', ' +document.form1.editend_year.options[document.form1.editend_year.options.selectedIndex].text
myDate=new Date(eval('"'+$try+'"'))
document.form1.endbox.value=myDays[myDate.getDay()]
}

function skins($incoming)
{
$baseurl='http://www.abdulmalik.net/';
$baseurl1='http://www.abdulmalik.net';

$target=$baseurl1 + $incoming;
$url1=$baseurl + "setskin.html?newskin=silver&amp;return=" + $target;
$url2=$baseurl + "setskin.html?newskin=lightblue&amp;return=" + $target;
$url3=$baseurl + "setskin.html?newskin=green&amp;return=" + $target;
$url4=$baseurl + "setskin.html?newskin=red&amp;return=" + $target;
textout='<table id="fttable"><tr><td style="width:170px;text-align:right"><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-html401" height="27" width="76"></a></td><td id="foot"><div><table height=5 style="border:solid 1px black"><tr>';
textout=textout+ '<td onclick="location.href=\'' + $url1 + '\'" width=15 bgcolor="#cccccc">&nbsp;</td>';
textout=textout+ '<td onclick="location.href=\'' + $url2 + '\'" width=15 bgcolor="#b0c4de">&nbsp;</td>';
textout=textout+ '<td onclick="location.href=\'' + $url3 + '\'" width=15 bgcolor="#00cc00">&nbsp;</td>';
textout=textout+ '<td onclick="location.href=\'' + $url4 + '\'" width=15 bgcolor="#cc0000">&nbsp;</td>';
textout=textout+ '</tr></table></div>';
textout=textout+ '<div><a href="' + $baseurl + 'zip.html"><img src="' + $baseurl + 'img/zip.gif" height=25 width=27 alt="Download AbdulMalik.net as a ZIP file for offline viewing"></a></div>';
textout=textout+ '<div><a href="' + $target +'?printer=1"><img src="' + $baseurl + 'img/printer-friendly-version.gif" height=25 width=25 alt="View printer-friendly version"></a></div>';

textout=textout+'<div style="float:right"><form method="POST" action="http://www.abdulmalik.net/translate.html">';
textout=textout+'<select name="url">';
textout=textout+'<option value="http://babel.altavista.com/babelfish/trurl_pagecontent?url=' + $target + '&amp;lp=en_fr">Française</option>';
textout=textout+'<option value="http://babel.altavista.com/babelfish/trurl_pagecontent?url=' + $target + '&amp;lp=en_de">Deutch</option>';
textout=textout+'<option value="http://babel.altavista.com/babelfish/trurl_pagecontent?url=' + $target + '&amp;lp=en_it">Italiano</option>';
textout=textout+'<option value="http://babel.altavista.com/babelfish/trurl_pagecontent?url=' + $target + '&amp;lp=en_ru">Russian</option>';
textout=textout+'<option value="http://babel.altavista.com/babelfish/trurl_pagecontent?url=' + $target + '&amp;lp=en_es">Español</option>';
textout=textout+'<option value="http://babel.altavista.com/babelfish/trurl_pagecontent?url=' + $target + '&amp;lp=en_nl">Nederlands</option>';
textout=textout+'</select>';
textout=textout+'<input type="submit" value="Translate" class="button" name="translate">';
textout=textout+'</form></div>';

textout=textout+'&nbsp;<br>&nbsp;</td></tr></table>';
document.write(textout);
}

function nav()
{
textout='<div><a href="http://www.abdulmalik.net/index.html">Home</a></div>';
textout=textout+'<div><a href="http://www.abdulmalik.net/about.html">About this site</a></div>';
textout=textout+'<div><a href="http://www.abdulmalik.net/latest.html">Latest</a></div>';
textout=textout+'<div><a href="http://www.abdulmalik.net/contact.html">Contact</a></div>';
textout=textout+'<div><a href="http://www.abdulmalik.net/subscribe.html">Subscribe</a></div>';
document.write(textout);
}

function leftbar()
{
textout='<p><a type="application/rss+xml" href="http://www.abdulmalik.net/feed.xml"><img alt="rss" class="rss" src="http://www.abdulmalik.net/img/feed.gif"></a>';
textout=textout+'<strong>Recent articles on this site</strong>:<br><div id="leftlinks">';
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/islamic-belief.html\">The Islamic belief is the only correct solution to Man's fundamental problem</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/islam-solution-faq.html\">Frequently Asked Questions</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/weaker-reasons-belief.html\">Appendix - Weaker reasons for belief</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/islam-solution-summary.html\">Summary</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/islam-thinking-man.html\">Islam is the \"Thinking Man's Belief\"</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/war-against-islam.html\">The need for today's war against Islam</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/response-nonarabs.html\">The response of those who met the Muslims</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/response-arabs-2.html\">The response of the pagan Arabs (II)</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/response-arabs-1.html\">The response of the pagan Arabs (I)</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/cant-speak-arabic.html\">What if you can't speak Arabic?</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/miracle-quran.html\">The miracle of the Quran</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/lasting-sign-quran.html\">A lasting sign - The Quran</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/prophets-came-went.html\">Prophets came and went</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/criterion-prophethood.html\">The first step: a criterion for prophethood</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/waste-of-life.html\">A waste of a precious human life</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/people-believe-ignorance.html\">People believe in Ignorance</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/religions-have-failed.html\">Religions have failed</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/mans-greatest-problem.html\">Man's greatest problem</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/what-do-you-believe-in.html\">What do you believe in?</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/israeli-quotes.html\">Israeli Quotes</a>";
textout=textout+"<p><a href=\"http://www.abdulmalik.net/articles/hatemail.html\">Anti-Muslim hatemail</a>";
textout=textout+'</div>';
document.write(textout);
}


function ucn($fn)
{
textout='<div class="ucnmain"><p class="addnote"><a href="http://www.abdulmalik.net/add_note.html?filename='+ $fn +'" rel="nofollow"><img alt="+" src="http://www.abdulmalik.net/img/add.gif"> Add a note</a><p class="ucn">User-contributed notes</div>';
document.write(textout);
}
