function x_swap( i_id, k, m) { if (pics_loaded) {
	document.images[i_id].src = pics[k][m].src;
} }

function get_viewport_size()
{ 
 var size = [0, 0]; 

 if (typeof window.innerWidth != 'undefined') 
 { 
   size = [ 
       window.innerWidth, 
       window.innerHeight 
   ]; 
 } 
 else if (typeof document.documentElement != 'undefined' 
     && typeof document.documentElement.clientWidth != 
     'undefined' && document.documentElement.clientWidth != 0) 
 { 
   size = [ 
       document.documentElement.clientWidth, 
       document.documentElement.clientHeight 
   ]; 
 } 
 else 
 { 
   size = [ 
       document.getElementsByTagName('body')[0].clientWidth, 
       document.getElementsByTagName('body')[0].clientHeight 
   ]; 
 } 

 return size; 
}

function ext_video( v, w, h, title) {
 win = window.open('','ishop_video_'+parseInt((Math.random()*1000000),10),'location=no,status=no,menubar=no,toolbar=no,resizable=no,width='+(w+2)+',height='+(h+62));
 win.document.write('<html><head><title>'+title+'</title></head>\
<body marginheight=0 topmargin=0 leftmargin=0 marginwidth=0>\
<object width='+w+' height='+(h+62)+'\
	CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"\
	type="application/x-oleobject">\
	<param name=url value="'+v+'">\
	<param name=autostart value=true>\
	<param name=uimode value=mini>\
	<param name=playcount value=1>\
	<embed src="'+v+'" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" width='+w+' height='+(h+45)+' autostart=true uimode=mini></embed>\
</object></body></html>\r\n\r\n');
}