can i use a script in global footer content


i tried to place the following code into the admin ad plugin and also in the global footer content and it did not work

<script type='text/javascript'>
var url = (location.protocol=='https:'?'':'');
document.write ("<scr"+"ipt type='text/javascript' src='"+ url +"?advplaces=2'><\/scr"+"ipt>");

it is a banner rotation script

is Javascript not allowed?

take care