var NS, IE;



NS = (document.layers)? true:false

IE = (document.all)? true:false

NO = 1

br = ""



var IsIE3 = true;

var userAgent = navigator.userAgent

var offset = userAgent.indexOf("MSIE 3.0")

if (offset == -1 ) IsIE3 = false;



bName = navigator.appName;

bVer = parseInt(navigator.appVersion);

if ((bName == "Netscape" && bVer >= 3) || (bName == "Opera" && bVer >= 5) ||

	(bName == "Microsoft Internet Explorer" && bVer >=4)) br = "n3";

else br = "n2";

if (br== "n3") {



//Active

	img01on = new Image();

	img01on.src = "images/SMFacts2.gif";

	img02on = new Image();

	img02on.src = "images/SMCourtship2.gif";

	img03on = new Image();

	img03on.src = "images/SMEngagement2.gif";

	img04on = new Image();

	img04on.src = "images/SMRegister2.gif";

	img05on = new Image();

	img05on.src = "images/SMWedding2.gif";

	img06on = new Image();

	img06on.src = "images/SMGuest2.gif";

	img07on = new Image();

	img07on.src = "images/SMContact2.gif";





//Inactive

	img01off = new Image();

	img01off.src = "images/SMFacts.gif";

	img02off = new Image();

	img02off.src = "images/SMCourtship.gif";

	img03off = new Image();

	img03off.src = "images/SMEngagement.gif";

	img04off = new Image();

	img04off.src = "images/SMRegister.gif";

	img05off = new Image();

	img05off.src = "images/SMWedding.gif";

	img06off = new Image();

	img06off.src = "images/SMGuest.gif";

	img07off = new Image();

	img07off.src = "images/SMContact.gif";



}





function imgAct(imgName) {

	if (br == "n3") {

		//document[imgName].src = eval(imgName + "on.src");

	}

}



















function WelcomeMessage()

{if (document.images)

	{

	var today = new Date();

	hourNow = today.getHours();

	if (hourNow > 0 && hourNow <=12)

		document.write('Good Morning.')

	else if(hourNow  > 12 && hourNow  <= 18)

		document.write('Good Afternoon.')

	else

		document.write('Good Evening.')

	}

}





function getCookieVal (offset) {

	var endstr = document.cookie.indexOf (";", offset);

	if (endstr == -1)

		endstr = document.cookie.length;

	return unescape(document.cookie.substring(offset, endstr));

}



function GetCookie (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 getCookieVal (j);

		i = document.cookie.indexOf(" ", i) + 1;

		if (i == 0) break;

	}

	return null;

}



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 WelcomeBack()

{

	var expdate = new Date();

	expdate.setTime(expdate.getTime() +  (24 * 60 * 60 * 1000 * 365));

	var mycookieval = GetCookie("Welcome");

	if(!(mycookieval = GetCookie("Welcome"))) {

		mycookieval = 0;

	}

	mycookieval++;

	if (mycookieval > 1) document.write('back');

   	SetCookie("Welcome",mycookieval,expdate);

}





var x, y;



function initArray() {

	this.length = initArray.arguments.length;

 	for (n=0; n<initArray.arguments.length; n++)

  	this[n] = initArray.arguments[n];

 	return this;

}





function slider(n) {

  	x += n;

	x = calculateItem(x)



	y = x + 1;

	y = calculateItem(y)



 	if (document.images) {

  		document.slideshow1.src = graphics_directory + "img" + x + "." + suffix;

  		document.slideshow2.src = graphics_directory + "img" + y + "." + suffix;

 	}

}





function highlights()

{

	var imagenumber = 6 ;

	var randomnumber = Math.random() ;

	var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1 ;

	images = new Array

	images[1] = "../images/thumb/1.gif"

	images[2] = "../images/thumb/2.gif"

	images[3] = "../images/thumb/3.gif"

	images[4] = "../images/thumb/4.gif"

	images[5] = "../images/thumb/5.gif"

	images[6] = "../images/thumb/6.gif"

    var myimage = images[rand1]

	links = new Array

	links[1] = ""

	links[2] = ""

	links[3] = ""

	links[4] = ""

	links[5] = ""

	links[6] = ""

	links[7] = ""

	links[8] = ""

	links[9] = ""

	links[10] = ""

	links[11] = ""

	var mylink = links[rand1]

	altext = new Array

	altext[1] = ""

	altext[2] = ""

	altext[3] = ""

	altext[4] = ""

	altext[5] = ""

	altext[6] = ""

	altext[7] = ""

	altext[8] = ""

	altext[9] = ""

	altext[10] = ""

	altext[11] = ""

	var myaltext = altext[rand1]

	document.write('<A HREF="' + mylink + '" onMouseOver="(window.status=\'' + myaltext + '\'); return true"><IMG src="' + myimage + '" border=0 alt="' + myaltext + '"></A>')

}





function printFooter() {

copyright=new Date();

document.write('<center>')

document.write('<font class="text_bottom">~ </font><font class="linkbottom"><a href="disclaimer.php">Disclaimer</a></font><font class="text_bottom"> and Copyright©2005-2008 All Rights Reserved to MPK Production ~</font>')

document.write('</center>')



}





function showCompliments(type)

{

	var totalnumber = 23 ;

	var randomnumber = Math.random() ;

	var rand1 = Math.round( (totalnumber-1) * randomnumber) + 1 ;



	selections = new Array

	selections[1] = "I think your web page is wonderful... thanks for sharing your love story. - Jacqui"

	selections[2] = "Your web site is wonderful and so well put together. And your wedding photos, gorgeous! - Audrey D."

	selections[3] = "You both look so good, it's really professionally done! - Evelyn B."

	selections[4] = "Really nice pics! Very original too with all the puzzles and wallpapers. - Janice Y."

	selections[5] = "Brother... you wedding web site is cool. - Louis L."

	selections[6] = "I am impressed with the count-down timing and the snowing of the hearts.... very creative. - GS"

	selections[7] = "Excellent work! May the Lord bless you with wisdom and joy... - T Puan"

	selections[8] = "VERY IMPRESSED with your website. Well done - very professional. - Timothy C."

	selections[9] = "A very interesting and well developed site! Congrats and best wishes to both of you! - FC"

	selections[10] = "Remarkable website, bet a lot of effort! - Yvonne L"

	selections[11] = "Beautiful website, beautiful bride and groom.. CONGRATULATIONS & GOD BLESS!!! - Ann C."

	selections[12] = "The webpage is fantastic and very stylish. Both of you look great! Have a blissful wedding! - LH"

	selections[13] = "My lovely Shan Lei, God given you a good looking man, ha ha. Congratulation! - Happy W."

	selections[14] = "Your website is a marvellous and excellent piece of work. It sure will help you to remember the happy moments. - Diana S."

	selections[15] = "A very beautiful wedding website. - Danial C."

	selections[16] = "Both of you are natural a set of peas. Yes I must say God has join a perfect pair. - Nicole T."

	selections[17] = "love the site! get a web site award and get more traffic to your site. - Drew"

	selections[18] = "Thank you for sharing your faith. God is good! - Mena"

	selections[19] = "Your website is absolutely beautiful!!! Your site really encouraged me in the Lord even more!!! - Kebra D."

	selections[20] = "Your site is so beautiful,your wedding pictures are amazing. I was so inspired to have come across your site. - Rosalind"	

	selections[21] = "You are a beautiful couple physically and spiritually. - Tracy B."

	selections[22] = "Your site is very cool and honorable! - Ashley"

	selections[23] = "Beautiful site. But what I loved most was your obvious devotion to the Lord! - Kelly"



	if ( type == "MAIN") {

		var myselection = selections[rand1]

		document.write('<font class=bodytextsmall>"')

		document.write(myselection)

		document.write('"</font><p>')



	} else {

		var myselection = selections[rand1]

		document.write('<table cellpadding="1" cellspacing="0" align=center border=0 bgcolor=#F8D6D6>')

		document.write('<tr><td><TABLE width="136" border="0" cellpadding="3" cellspacing="1">')

		document.write('<tr><td align=center class=sideTableHeader1>A Compliment</td></tr>')

		document.write('<tr><td align=center class=sideTableBody1>')

		document.write(myselection)

		document.write('</td></tr>')

		document.write('</table>')

		document.write('</td></tr></table><p>')

	}

}







