function getCookie(name) {
    var cname = name + "=";               
    var dc = document.cookie;             
 
    if (dc.length > 0) {              
     begin = dc.indexOf(cname);       
        
        if (begin != -1) {           
         begin += cname.length;       
         end = dc.indexOf(";", begin);
 
         if (end == -1) end = dc.length;
             return unescape(dc.substring(begin, end));
        } 
    }
    return "";
} 

function setCookie(name, value)
{
   var argv = setCookie.arguments;
   var argc = setCookie.arguments.length;
   var expires = (2 < argc) ? argv[2] : null;
	var path = "/";
   var domain = (4 < argc) ? argv[4] : null;
   var secure = (5 < argc) ? argv[5] : false;
   document.cookie = name + "=" + value +
        ((expires == null) ? "" : ("; expires="+expires.toGMTString())) +
     ((path == null) ? "" : ("; path=" + path)) +
     ((domain == null) ? "" : ("; domain=" + domain)) +
        ((secure == true) ? "; secure" : "");
}
if(getCookie("pcid") == null || getCookie("pcid") == ""){
  var cookieval = new Date();
  cookieval = cookieval.getTime();
  var rStr_1 = "" + Math.random();
  var rStr_2 = "" + Math.random();
  var rStr_3 = "" + Math.random();
  var rStr_4 = "" + Math.random();
  var rStr_5 = "" + Math.random();
  rStr_1 = rStr_1.charAt(2);
  rStr_2 = rStr_2.charAt(2);
  rStr_3 = rStr_3.charAt(2);
  rStr_4 = rStr_4.charAt(2);
  rStr_5 = rStr_5.charAt(2);

  var uv_expired_data = new Date(2011,1,1);
  cookieval = cookieval + rStr_1 + rStr_2 + rStr_3 + rStr_4 + rStr_5;
  setCookie("pcid", cookieval , uv_expired_data, null, "sa.lge.com", false);
} 
//CSR No: C2006071101000000997 
//CSR Title: Checking and setting the bg color of all B2C sites
//Modified By: Deepa
//Date of Modification: 2006/07/24
document.bgColor="#FFFFFF";
 /**
 *  Copyright(κΆ) Do Not Erase This Comment!!! ( μ£Όμλ¬Έμ μ§°μ λ§κ²)
 *  
 *  In the case of modifing source, you should email to all the authors 
 *  in the below author list for information ( such as all set of modified sources,
 *  information of modifications, etc..)
 *  If provided modifications are proved reasonable, we may update imgbutton.htc 
 *  reflecting your ideas on modifications
 *  Furthermore, if your modifications are proved valuable, it is possible to add 
 *  your information on the authors list under deliberation.
 *
 *  (Caution!) DO NOT redistribute without permission. 
 *             Distribution to outside of LG CNS is NOT permitted. 
 *
 *  €λ λ³κ²½ν ¬μ©ν κ²½μ   λ¦¬μ€νΈμ ±λ λͺ¨λ κ²
 *  λ³κ²½λ  μ²΄μ λ³κ²½λ ¬ν mailλ‘ €μ .
 *   κ³΅λ €κ ©ν€κ ¨λ κ²½μ ΄λ ¬ν λ°  .
 *  μ€ Ideaλ₯ κ³΅ν€κ ¨λ κ²½μ   List λ°  .
 *  
 *  (μ£Όμ!)  ½μ ¬λ°°   Όλ©° LG CNS Έλλ‘ μΆ ¬μ .
 *  
 **
 * AUTHORS LIST       E-MAIL                   HOMEPAGE
 * TK Shin            tkyushin@lgcns.com       http://www.javatoy.net
 * 
 **
 ** MODIFICATION HISTORY
 ** DATE       Version    DEVELOPER        DESCRIPTION
 ** 2006/02/06 0.8        Shin Tack Kyu    Initial Release
 **
 ** Detail Build HISTORY
 ** DATE        BUILD  DESCRIPTION
 ** 2006/02/06 a100   alpha Release
 */
/* 
document.attachEvent ("onreadystatechange", function() {
   if (document.readyState=="complete")   {
      if (window.objectPatch) window.objectPatch();
   }
})
*/
function objectPatch() {
	var os = document.getElementsByTagName("param");
	var ps = "";

	for (var idx=0; idx < os.length; idx++) {
		var peer1 = os[idx];
		ps = ps + peer1.outerHTML;
	}

	var os = document.getElementsByTagName("object");

	for (var idx=0; idx < os.length; idx++) {
		var peer = os[idx];
		var clsid = peer.getAttribute("classid");
		if (!clsid) continue;
		switch (clsid.toLowerCase()) {
			case "clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" :  // media player
			case "clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" :  // asf, wmv
				var html = peer.outerHTML;
				var oe = '</object>';
				var oen = html.toLowerCase().search(oe);
				html = html.substring(0,oen) + ps + oe;
  				peer.outerHTML = html;
  				break;
			case "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" :  // flash  				
			case "clsid:bb4533a0-85e0-4657-9bf2-e8e7b100d47e" :  // combo
			case "clsid:71e7aca0-ef63-4055-9894-229b056e9c31" :  // grid
				var html = peer.outerHTML;
	  			peer.outerHTML = html;
	  			break;						
	  		default:
	  				break;
		}
	}
} 

/* SiteCatalyst code version: H.17. */
document.writeln("<scr"+"ipt language='JavaScript' type='text/javascript' src='/js/s_code.js'></scr"+"ipt>");

document.writeln("<scr"+"ipt language='JavaScript' type='text/javascript'><!--");
document.writeln("if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'\!-'+'-')");
document.writeln("//--></script><noscript><a href='http://www.omniture.com' title='Web Analytics'><img");
document.writeln("src='http://lgemiddleeastafrica.122.2O7.net/b/ss/lgesa/1/H.17--NS/0'");
document.writeln("height='1' width='1' border='0' alt='' /></a></noscript>");
document.writeln("<!-- End SiteCatalyst code version: H.17. -->");
/* End of SiteCatalyst code version: H.17.*/
