var partner_source="http://img.kapanlagi.com/partner/top_square.php";
var partner_width="250";
var partner_height="250";

document.write('<ifr'+'ame src="'+partner_source+'" ');
document.write('width="'+partner_width+'" height="'+partner_height+'" marginheight="0" marginwidth="0" frameborder="0" scrolling="no">');
document.write('<\/ifr'+'ame>');

// ********** this function gets cookies
function getCookieValue(cookieName) {
	var cookieValue = document.cookie;
	var cookieStartsAt = cookieValue.indexOf(" " + cookieName + "=");
	if (cookieStartsAt == -1) {
		cookieStartsAt = cookieValue.indexOf(cookieName + "=");
	}
	if (cookieStartsAt == -1) {
		cookieValue = null;
	} else {
		cookieStartsAt = cookieValue.indexOf("=", cookieStartsAt) + 1;
		var cookieEndsAt = cookieValue.indexOf(";", cookieStartsAt);
		if (cookieEndsAt == -1) {
			cookieEndsAt = cookieValue.length;
		}
		cookieValue = unescape(cookieValue.substring(cookieStartsAt, cookieEndsAt));
	}
	return cookieValue;
}
// ********** this function makes cookies
function setCookie(cookieName, cookieValue, cookiePath, cookieExpires) {
	cookieValue = escape(cookieValue);
	if (cookieExpires == "") {
		var nowDate = new Date();
		nowDate.setHours(nowDate.getHours() + 6);
		cookieExpires = nowDate.toGMTString();
	}
	if (cookiePath != "") {
		cookiePath = ";Path=" + cookiePath;
	}
	document.cookie = cookieName + "=" + cookieValue + ";expires=" + cookieExpires + cookiePath + ";Domain=kapanlagi.com";
}
function openVideo(){
	var bigNissan = document.getElementById("bigNissan");
	var smallNissan = document.getElementById("smallNissan");
	bigNissan.style.display = "none";
	smallNissan.style.display = "block";
}

function openBigflash(){
	var bigNissan = document.getElementById("bigNissan");
	var smallNissan = document.getElementById("smallNissan");
	smallNissan.style.display = "none";
	bigNissan.style.display = "block";
}
/*
var strHref = window.location.href;

if(strHref == 'http://www.kapanlagi.com' || strHref == 'http://www.kapanlagi.com/' || strHref == 'http://www.kapanlagi.com/index.html') {
	var nissanShow = getCookieValue("nissanShow");
	if(nissanShow==null || nissanShow>4) {
		var bigDisplay = "block";
		var smallDisplay = "none";
		nissanShow = 0;
	} else {
		var bigDisplay = "none";
		var smallDisplay = "block";
		nissanShow = parseInt(nissanShow) + 1;
	}
	setCookie("nissanShow", nissanShow, "", "");
} else {
	var bigDisplay = "none";
	var smallDisplay = "block";
} // /i/v2/partner/nissan/NISSANG-250x230.swf
document.write('<div id="bigNissan" style="position:absolute;width:770px;height:600px;left:-5px;display:' + bigDisplay + ';">');
document.write('  <object id="swfbigNissan" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=7,0,19,0" width="771" height="600">');
document.write('    <param name="movie" value="/i/v2/partner/nissan/NISSANB-770x600.swf">');
document.write('    <param name="quality" value="high">');
document.write('    <param name="wmode" value="transparent">');
document.write('    <param name="allowscriptaccess" value="alway">');
document.write('    <param name="swliveconnect" value="true">');
document.write('    <param name="loop" value="true">');
document.write('    <embed name="swfbigNissan" src="/i/v2/partner/nissan/NISSANB-770x600.swf" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="771" height="600" wmode="transparent" allowscriptaccess="always" swliveconnect="true"></embed>');
document.write('  </object>');
document.write('</div>');
document.write('<div id="smallNissan" style="position:absolute;width:250px;height:230px;left:515px;display:' + smallDisplay + ';">');
document.write('  <object id="swfsmallNissan" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=7,0,19,0" width="250" height="230">');
document.write('    <param name="movie" value="/partner/showflash.php?id=61">');
document.write('    <param name="quality" value="high">');
document.write('    <param name="wmode" value="transparent">');
document.write('    <param name="allowscriptaccess" value="alway">');
document.write('    <param name="swliveconnect" value="true">');
document.write('    <param name="loop" value="true">');
document.write('    <embed name="swfsmallNissan" src="/partner/showflash.php?id=61" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="250" height="230" wmode="transparent" allowscriptaccess="always" swliveconnect="true"></embed>');
document.write('  </object>');
document.write('<div>');
document.write('<div style="width:150px;height:20px;float:left;"><a href="http://img.kapanlagi.com/partner/top_square_launcher.php" target="_blank" style="color:#cccccc;font-weight:bold;font-size:9pt;text-decoration:none;">www.nissan.co.id</a></div>');
document.write('<div style="width:100px;height:20px;float:left;text-align:right;"><a href="javascript:openBigflash();" style="color:#cccccc;font-weight:bold;font-size:9pt;text-decoration:none;">Replay</a></div>');
document.write('<br style="clear:both;" />');
document.write('</div>');
document.write('</div>');
*/
