var keyimg3;
var _timeout3;

//*************************** cookie.js *************************
//---utility function to retrieve an expiration date in proper---
function getExpDate3(days, hours, minutes) {
    var expDate = new Date( );
    if (typeof days == "number" && typeof hours == "number" && typeof minutes == "number") {
        expDate.setDate(expDate.getDate( ) + parseInt(days));
        expDate.setHours(expDate.getHours( ) + parseInt(hours));
        expDate.setMinutes(expDate.getMinutes( ) + parseInt(minutes));
        return expDate.toGMTString( );
    }
}
//-----------utility function called by getCookie( )------------
function getCookieVal3(offset) {
    var endstr = document.cookie.indexOf (";", offset);
    if (endstr == -1) {
        endstr = document.cookie.length;
    }
    return unescape(document.cookie.substring(offset, endstr));
}
//----------primary function to retrieve cookie by name---------
function getCookie3(name) {
    var arg = name + "=";
    var alen = arg.length;
    var clen = document.cookie.length;
    var i = 0;
    while (i < clen) {
        var j = i + alen;
        if (document.cookie.substring(i, j) == arg) {
            return getCookieVal3(j);
        }
        i = document.cookie.indexOf(" ", i) + 1;
        if (i == 0) break; 
    }
    return "";
}
//------store cookie value with optional details as needed------
function setCookie3(name, value, expires, path, domain, secure) {
    document.cookie = name + "=" + escape (value) +
        ((expires) ? "; expires=" + expires : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

//***************cookie¤Î³ÎÇ§****************
var ccode3 = getCookie3("ccode");
//-------------------------------------------
if (ccode3 == "") {
	//var climit = getExpDate3(7,0,0);
	//var climit = getExpDate3(0,1,0);
	var climit = getExpDate3(0,0,1);
	setCookie3('ccode', '1265696090-27661', climit, '/');
	//---------------------------------------
	ccode3 = '1265696090-27661';
}

//*******************************************
keyimg3 = document.images[0].src;
var pviframe3 = '<iframe name="pvf3" id="pvf3" src="http://test3.boronsha.jp/pv/pvtop.cgi?qbid=3&ws=480&image='+keyimg3+'&ccode='+ccode3+'" frameborder="0" width="480" height="0" marginwidth="0" marginheight="0" scrolling="no" style="overflow-x:hidden;"></iframe>';
document.write(pviframe3);

_timeout3 = setTimeout(_setpvfcheck3,1500);

function _setpvfcheck3() {
	if (pvf3.inwin) {
		if (pvf3.inwin.location.hash) {
			var pvhash = pvf3.inwin.location.hash;
			var pvhashlong = pvhash.length;
			var setheight  = pvhash.substring(1,pvhashlong);
			document.getElementById('pvf3').style.height = setheight+'px';
		}
	}
	_timeout3 = setTimeout(_setpvfcheck3,1500);
}
