﻿(function(){
var key = '';
(function(){        
       var metas = document.getElementsByTagName( 'meta' );
       var match;

       for( var i = 0; i < metas.length; ++i ) {
          match = /gmapkey:?(.*)/.exec( metas[ i ].name );
          if( match ) {
            if( ! match[ 1 ] ) {
              key = metas[ i ].content;
            }
            else if( (new RegExp( match[ 1 ] )).exec( window.location.href ) ) {
              key = metas[ i ].content;
              break;
            }
          }         
       }                     
 })();


//document.write(key); 		
//document.write('key'); 		
document.write(['<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=' + key + '" type="text/javascript"></script>'].join('\n'));
})();