
// 覧覧覧覧覧覧覧覧	GOOGLE +1

//	document.write("<script type=\"text/javascript\" ", "src=\"https://apis.google.com/js/plusone.js\"></script>")



// 覧覧覧覧覧覧覧覧	DATE AND TIME

today = new Date();
TimeHrs = today.getHours(); TimeMin = today.getMinutes();
DateMth = today.getMonth()+1; DateDate = today.getDate();
DateYear = today.getYear(); DateDy = today.getDay();

if (TimeHrs > 12) {
	TimeHrs = TimeHrs - 12; if (TimeHrs == 12) { AmPm = "am"; } else { AmPm = "pm"; }
} else {
	if (TimeHrs == 12) { AmPm = "pm"; } else { AmPm = "am"; }
}

if (TimeMin < 10) { TimeMin = "0" + TimeMin; }

DateMonth = ["","January ","February ","March ","April ","May ","June ",
	"July ","August ","September ","October ","November ","December "];

DateDay = ["Sunday, ","Monday, ","Tuesday, ","Wednesday, ","Thursday, ","Friday, ","Saturday, "];

brsr = navigator.appName;
if (brsr == "Netscape") { if (DateYear < 99) { DateYear = DateYear + 2000; } else { DateYear = DateYear + 1900; } }

// ----------DAY OF WEEK VAR:	DateDay[DateDy]

function TheDate() { document.write(DateMonth[DateMth], DateDate, ", ", DateYear); }
function Year() { document.write(DateYear); }



// 覧覧覧覧覧覧覧覧	ADSENSE

function GGsense() {
	a = location.href;
	if (google_ad_height < 30) { GGAdInd = 0; } else { GGAdInd = 30; }
	if (a.search(/http:\/\/creativity-portal/) != -1) {
		document.write("<div style=\"width: ", google_ad_width, "; height: ", google_ad_height,
		"; background-color: #fed; border: 1px solid #dcb; text-align: center; vertical-align: middle\">",
		"<div style=\"position: relative; top: ", GGAdInd, "%\">Google AdSense</div></div>");
	} else {
		document.write("<script type=\"text/javascript\" ",
		"src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"></script>");
	}
}



// 覧覧覧覧覧覧覧覧	JUMP MENU CODE

function JumpMenu(GoURL) { URL = GoURL.options[GoURL.selectedIndex].value; if (URL != "") { location = URL; } }



// 覧覧覧覧覧覧覧覧	RSS FEED / NEWSLETTER SUBSCRIPTION CODE

function RSSNews() {
	a = location.href; a = a.replace(/\//g, "%2F"); a = a.replace(/:/g, "%3A");

	if (navigator.appName.search(/explorer/i) != -1) { gglInput = 20; gglPad = "padding: 0; margin: -14px 0 -10px 0";
		document.write("<style type=\"text/css\">\n.search { padding: 0; top: 0; }\n</style>\n"); SubscrPad = "padding: 0; margin-left: -9";
	} else { gglInput = 25; gglPad = "padding: 15px 0 10px 0; margin: -12px 0 -13px 0"; SubscrPad = "padding: 14px 0 10px 0; margin-left: -9"; }

	document.write("<div class=\"menu f9\" style=\"border: 1px dotted #d5d5ee; border-width: 0 1px 1px 1px\">",
	"<form action=\"http://www.creativity-portal.com/search/\" ",
	"id=\"cse-search-box\"><div style=\"", gglPad,
	"\" class=\"ctr\"><div class=\"f8 alnlt\" style=\"padding-left: 18px; color: #3c5793\">search site</div>",
	"<input type=\"hidden\" name=\"cx\" value=\"partner-pub-3373249915520899:gq1pim36xp3\" /><input ",
	"type=\"hidden\" name=\"cof\" value=\"FORID:10\" /><input type=\"hidden\" name=\"ie\" value=\"ISO-8859-1\" /><input ",
	"type=\"text\" name=\"q\" class=\"search2\" size=\"", gglInput, "\" title=\"Enter your search terms here\" /> <input type=\"submit\" name=\"sa\" ",
	"value=\"Search\" class=\"search\" onMouseOver=\"style.cursor='pointer'; style.borderColor='#9595dd'\" ",
	"onMouseOut=\"style.borderColor='#c5c5ee'\" /></div></form>",
	"<script ","type=\"text/javascript\" src=\"http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en\"></script></div>",

	"<div class=\"menu f9\" style=\"border-top-width: 0\">",
	"<div style=\"padding: 10px 0 3px 0\">",
	"<iframe src=\"http://www.facebook.com/plugins/like.php?href=", a, "&amp;layout=standard&amp;",
	"show_faces=false&amp;width=220&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=30\" ",
	"scrolling=\"no\" frameborder=\"0\" style=\"overflow: hidden; width: 220px; ",
	"height: 30px\" allowTransparency=\"true\"></iframe></div>",

	"<div id=\"NewPlusOne\" style=\"overflow: hidden; width: 150px;\"></div>",

	"<div style=\"padding: 10px 20px 0 20px\"><div class=\"ctr\" style=\"padding: 0 25px 10px 0\"><img src=\"/images/main/newsletter/pal.gif\"\n",
	"alt=\"Inspiring Creativity Newsletter\" title=\"Inspiring Creativity Newsletter\"\n",
	"width=\"163\" height=\"126\" border=\"0\" /></div>",
	"<strong>Discover Your Muse!</strong> Subscribe to our FREE NewZine ",
	"for inspiring interviews, coaching tips, new articles, and fresh perspectives to jumpstart your creativity! ",
	"<form name=\"subscr\" method=\"post\" action=\"http://www.ymlp.com/subscribe.php?creativityportal\">\n",

	"<div class=\"ctr\" style=\"", SubscrPad, "\"><input name=\"YMLP0\" type=\"text\" ",
	"value=\"primary e-mail\" size=\"20\" onFocus=\"if(subscr.YMLP0.value=='primary e-mail'){subscr.YMLP0.value=''}\" ",
	"onBlur=\"if(subscr.YMLP0.value==''){subscr.YMLP0.value='primary e-mail'}\" ",
	"class=\"search2\" style=\"width: 190px\" title=\"Enter your e-mail address here\" /><br />\n",
	"<input name=\"submit\" type=\"submit\" value=\"Yes, Subscribe Me!\" onMouseOver=\"style.cursor='pointer'; style.borderColor='#9595dd'\" ",
	"onMouseOut=\"style.borderColor='#c5c5ee'\" class=\"search\" style=\"width: 144px; margin-top: 3px; top: 0\" />",
	"</div></form></div></div>");
}



function RSSNews2() {
	MoveIt = document.getElementById("GglPlusOne").innerHTML;
	document.getElementById("NewPlusOne").innerHTML = MoveIt;
}



// 覧覧覧覧覧覧覧覧	ADDTHIS

function AddThis() {
	document.write("<div class=\"addthis_toolbox addthis_default_style\">",
		"<a href=\"http://www.addthis.com/bookmark.php?v=250&amp;pub=cportal\" class=\"addthis_button_compact blu nn\">Share</a> ",
		"<span class=\"addthis_separator\">|</span> <a class=\"addthis_button_google_plusone\"></a> <a class=\"addthis_button_facebook\"></a> ",
		"<a class=\"addthis_button_facebook_like\"></a> <a class=\"addthis_button_tweet\"></a> ",
		"<a class=\"addthis_button_email\"></a> <a class=\"addthis_button_favorites\"></a></div>",
		"<script type=\"text/javascript\" src=\"http://s7.addthis.com/js/250/addthis_widget.js#pub=cportal\"></script>",
		"<div class=\"divbar2\"></div>");
}



function JSNewWinLink(a) { document.write("<a href=\"", a, "\" target=\"_blank\" class=\"blu nn\">"); }



// 覧覧覧覧覧覧覧覧	DETAIL NOTES POPUP

NumDet = 1; DetailPopUp = "DetailNote1"; flag = 0; WdtDet = 250; XCo = 300;
t = setTimeout("EraseNotice()",10000000);
function Notice() {
	if (flag == 0) { EraseNotice(); }

	if (navigator.appName.search(/explorer/i) != -1 || navigator.appVersion.search(/5.0/) != -1) {
		xCoord = document.body.scrollLeft; yCoord = document.body.scrollTop;
	} else { xCoord = self.pageXOffset; yCoord = self.pageYOffset; }

	DetailPopUp = "DetailNote" + NumDet; DetPopUpClose = "DetailClose" + NumDet; DetailContent = "DetailContent" + NumDet;

	box = document.getElementById(DetailPopUp); box.style.left = xCoord + XCo; box.style.top = yCoord + 100;
	box.style.width = WdtDet; box.style.visibility = "visible";
	box = document.getElementById(DetPopUpClose); box.style.width = WdtDet - 6;

	if (navigator.appName.search(/microsoft/i) != -1) { box = document.getElementById(DetailContent); box.style.width = WdtDet - 6; }

	t = setTimeout("Notice()",10); flag = 1;
}



function EraseNotice() { clearTimeout(t); box = document.getElementById(DetailPopUp); box.style.visibility = "hidden"; }



// 覧覧覧覧覧覧覧覧	INTERNAL

function ShowHLN(HN) {
	FlagHL = 0; HLN = HN; data = unescape(document.cookie); parts = data.split("; "); len = parts.length;

	for (a=0; a<len; a++) {
		if (parts[a].search(/ShowHiliteNum/) != -1) { ID = parts[a].split("="); ID = ID[1]; FlagHL = 1; }
	}

	if (FlagHL == 1) {
		date = new Date();
		cdt = 1000 * 60 * 60 * 24 * 365 * 5; currentdate = date.getTime() + cdt; date.setTime(currentdate);
		document.cookie = "ShowHiliteNum=" + ID + "; expires=" + date.toGMTString() + "; path=/";

		data = unescape(document.cookie);
		if (data.length > 0 && ID.length > 3) {
			document.write("<script type=\"text/JavaScript\"", " src=\"/z.internal.setting/show.hl.num.", ID, ".js\"></script>");
		}
	}
}


