
   function getCookie(name) {  
     var arg = name + "=";  
     var argLen = arg.length;  
     var cookieLen = document.cookie.length;  
     var i = 0;  
     while (i < cookieLen) {
       var j = i + argLen;    
       if (document.cookie.substring(i, j) == arg)      
         return getCookieVal(j);
       i = document.cookie.indexOf(" ", i) + 1;    
       if (i == 0) break;   
     }  
     return null;
   }

   function getCookieVal(offset) {
     var endstr = document.cookie.indexOf(";", offset);
     if (endstr == -1)
       endstr = document.cookie.length;
     return unescape(document.cookie.substring(offset, endstr));
   }

   function setCookie(name, value) {  
     var argv = setCookie.arguments;  
     var argc = setCookie.arguments.length;  
     var expires = (argc > 2) ? argv[2] : null;  
     var path = (argc > 3) ? argv[3] : null;  
     var domain = (argc > 4) ? argv[4] : null;  
     var secure = (argc > 5) ? argv[5] : false;  
     document.cookie = name + "=" + escape(value) + 
                       ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
                       ((path == null) ? "" : ("; path=" + path)) +  
                       ((domain == null) ? "" : ("; domain=" + domain)) +    
                       ((secure == true) ? "; secure" : "");
   }

   function deleteCookie(name) {  
     var exp = new Date();  
     exp.setTime (exp.getTime() - 1);   
     var cval = getCookie(name);  
     document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
   }

   var expDays = 30;
   var exp = new Date(); 
   exp.setTime(exp.getTime() + (expDays * 24 * 60 * 60 * 1000));

   function getVisitCount() {
     var count = getCookie('count')
     if (count == null) {
       setCookie('count', '1');
       return 1;
     } else {
       var newcount = parseInt(count) + 1;
       deleteCookie('count');
       setCookie('count', newcount, exp);
       return count;
     }
   }

   function showFlash() {
     var movieArray = new Array("paymethods3.swf", "paymethods2.swf");
     var curMovieIdx = getVisitCount();

document.write(" <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' width='100%' height='65'>\n");
	 
document.write("<param name='movie' value='skin1/flash/paymethods3.swf' />\n");
     document.write("<param name='quality' value='high' />\n");
	 document.write("<param name='wmode' value='transparent' />\n");
	 
     document.write(" <embed src='skin1/flash/paymethods3.swf' width='100%' height='65' quality='high'  wmode='transparent' pluginspage='https://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'></embed>\n");
	 
     document.write("</object>\n");
   }

