Chrome DLL Help

<script type='text/javascript'>
var youurl=']] .. url .. [[';
var newurl=youurl.split('v=');
var convertedurl = newurl[1]

document.write("<object width='100%' height='100%'><param name='movie' value='"+ convertedurl +"&hl=en&fs=1&autoplay=1'></param><param name='allowFullScreen' value='true'><param name='autoplay' value='true'></param></param><param name='allowscriptaccess' value='always'></param><embed src='"+ convertedurl + "&hl=en&fs=1&autoplay=1' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='100%' height='100%'></embed></object>"); 
// -->

This will return “The webpage is trying to access” (something like that)
I need the script to not return any errors like it is now. I know that if i use JW player it will stop (as long as its hosted on the localhost/server) Can i do this in gmod?