// JavaScript Document
chrome.extension.sendRequest({greeting: "rrq"}, function(response) {  var resfrombackground=response.farewell;    
var str = resfrombackground; 	var showrightad = str.charAt(2);  dynamicval=str.split(','); 	 if (showrightad == 'Y') 		{    	mydiv=document.createElement("DIV"); 	mydiv.setAttribute('id',"rlyr1"); 	myidiv=document.createElement("DIV"); 	myidiv.setAttribute('id',"irlyr1");      ifrm = document.createElement("IFRAME");     var page_src=dynamicval[17]; 	    ifrm.setAttribute("src", page_src);    ifrm.setAttribute('id',"rifrm");    ifrm.style.width = dynamicval[15];    ifrm.style.height = dynamicval[16];    ifrm.setAttribute("frameborder","0");    ifrm.setAttribute("scrolling","no");    document.body.style.position='relative'; mydiv.style.position='fixed'; mydiv.style.right=dynamicval[18]; mydiv.style.top=dynamicval[19]; mydiv.style.left="auto"; mydiv.style.bottom="auto"; mydiv.style.zIndex="1000000"; myidiv.style.position="relative";   	cimg=document.createElement("IMG"); 	cimg.setAttribute('id',"ritcimg"); 	cimg.setAttribute('src',chrome.extension.getURL("close.jpg")); 	cimg.style.position="absolute"; 	cimg.style.bottom="7px"; 	cimg.style.right="0px"; 	cimg.style.width="15px"; 	cimg.style.height="15px"; 	cimg.style.zIndex="1000001"; 	cimg.style.display="none"; 	   var firsttaginbody=document.body.firstChild; document.body.insertBefore(mydiv,firsttaginbody); document.getElementById('rlyr1').appendChild(myidiv);  document.getElementById('irlyr1').appendChild(ifrm); document.getElementById('irlyr1').appendChild(cimg);    function closeall()   { 	  	document.getElementById('rlyr1').style.display='none';  			 } 		 document.getElementById('ritcimg').onclick=closeall;  function showrcimg()  { 	 document.getElementById('ritcimg').style.display='block'; document.getElementById('rlyr1').style.border="1px solid #bfbfbf"; 
  }  document.getElementById('rifrm').onload=showrcimg;   }  });  