I'm trying to write a <script> tag with a script inside it, from another script.
But I can't seem to get it to work.

This is what I have at the moment

Code:
	function redirectFrame() {

		parent.main.write('<script language="JavaScript">');
		parent.main.write('document.write('alert("testing")');		
		parent.main.write('</script>');

	}

Basically, the reason for all this is that our other branch has a website, and im going to ask them to link to a particular page.
Now that page itself is a frameset, and once the page has loaded a piece of JS makes the bottom page navigate to another page.

The problem with that approach was that the piece of javascript, which I have in the frameset page itself, was executing each time the user has browesed to a new page, and then it would make them go back to a different page.
So I was thinking I would have to put a piece of JS into the created page myself.

... so um yeah.
I think I've probably confused anyone reading ?