// JavaScript Document
chrome.extension.sendRequest({greeting: "rrq"}, function(response) {  var resfrombackground=response.farewell;   	var str = resfrombackground; 	var showleftad = str.charAt(6);  dynamicval=str.split(','); 	 if (showleftad == 'Y') 		{  		if(window.outerWidth > 1024 ) 		   {  	mydiv=document.createElement("DIV"); 	mydiv.setAttribute('id',"lyr1"); 	myidiv=document.createElement("DIV"); 	myidiv.setAttribute('id',"ilyr1");     ifrm = document.createElement("IFRAME");     var page_src=dynamicval[12]; 	    ifrm.setAttribute("src", page_src);    ifrm.setAttribute("id",'lifrm');    ifrm.style.width = dynamicval[10];    ifrm.style.height = dynamicval[11];    ifrm.setAttribute("frameborder","0");    ifrm.setAttribute("scrolling","no");  document.body.style.position='relative'; mydiv.style.position='fixed'; mydiv.style.left=dynamicval[13]; mydiv.style.top=dynamicval[14]; mydiv.style.right="auto"; mydiv.style.bottom="auto"; mydiv.style.zIndex="1000000";      myidiv.style.position="relative";  	cimg=document.createElement("IMG"); 	cimg.setAttribute('id',"lcimg"); 	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('lyr1').appendChild(myidiv);  document.getElementById('ilyr1').appendChild(ifrm); document.getElementById('ilyr1').appendChild(cimg);    function closeall()   { 	  	document.getElementById('lyr1').style.display='none'; 			} 		 document.getElementById('lcimg').onclick=closeall;	  function showrcimg()  { document.getElementById('lcimg').style.display='block'; document.getElementById('lyr1').style.border="1px solid #bfbfbf"; }  document.getElementById('lifrm').onload=showrcimg;   		}}  }); 
