// JavaScript Document
/////////////////////////////////// Page Setup /////////////////////////////////////
document.write('<script language="javascript">var ssl = new Boolean;</script>');
var str=window.location.href, valid=str.indexOf("https");
if(valid==0){ssl=true;}
else{ssl=false;}

<!-- BEGIN HelpOnClick CODE -->
document.write('<SCRIPT language="JavaScript">var hoc_traffic_u = 4512, hoc_traffic_usrnme = "gwins", hoc_invite_bgcolor = "white", hoc_secured = "yes";</SCRIPT>');
document.write('<SCRIPT language="JavaScript" src="https://chat.helponclick.com/import_traffic.hoc"></SCRIPT>');
document.write('<div style="z-index:99;position:absolute;visibility:hidden;display:none;left:0;top:0"><a href="http://www.helponclick.com"><font size="1">Chat Software</font></a></div>');
<!-- END HelpOnClick CODE -->

//////////////////////////////// new eflash setup ///////////////////////////////
document.write('<script language="javascript">var n=new Array(), e=new Array(), dayLimit=-1;</script>');
///////////////////////// Copy Right ////////////////////////////////////
function CopyRight(){
	document.write('Copyright &co'+'py; 2007 Gwins.com, Gwins Travel, Gwins Motivation. All rights reserved.');
}
////////////////////// SSL Check & Switch ////////////////////////////////
function Switch(){
	if(valid==0){window.location.href='http'+str.substring(5);}
	else{window.location.href='https'+str.substring(4);}
}	
////////////////////////// subBar & navBar ////////////////////////////////
function navSpacer(){
	document.write('&nb'+'sp;&nb'+'sp;<span class="nav-spacer">|</span>&nb'+'sp;&nb'+'sp;');
}
function subBar(){
	document.write('<a href="https://www.gwins.com/employment">Employment</a>');
		navSpacer();
	document.write('<a href="https://www.gwins.com/vacation/aboutus.htm">Gwins Travel</a>');
		navSpacer();
	document.write('<a href="https://www.gwins.com/incentive/aboutus.htm">Gwins Motivation</a>');
		navSpacer();
	document.write('<a href="https://www.gwins.com/gig/">Gig Gwin</a>');
}
function navBar(arrNameNav, arrANav){
	var i=0;
	for (i=0;i<arrNameNav.length;i++){
		document.write('<a id="aNav'+i+'" href="'+arrANav[i]+'" class="nav">'+arrNameNav[i]+'</a>');
		if (i!=arrNameNav.length-1){navSpacer();}
	}
}
///////////////////////////////////////////////////// About Us //////////////////////////////////
function AboutUs(){
	document.write('<a hre'+'f="aboutus.htm" class="nav">About Us</a>');
}
//////////////////////////////////////////// Vacation Features /////////////////////////////////
function objHot(txtH, aH, txtS, img, txtB, txtBS, hbr){
	//Properties
	this.Title=txtH;		this.SubTitle=txtS;		this.Link=aH;
	this.Img=img;			this.BodyShort=txtBS;	this.Body=txtB;
	this._br=hbr
	//Methods
	this.outputMain = printMainStyle;
	this.outputSub = printSubStyle;
	this.outputSide = printSideStyle;
	this.outputS = printSideSubStyle;
}

function printMainStyle(){
	document.writeln('<div>');
		document.writeln('<div class="Hot-Head">');
			if (this.Link!=""){document.writeln('<a href="'+this.Link+'">');}
				document.write('<img class="arrow" src="../images/arrow.gif" width="15" height="15">');
				document.write('<span class="header"> '+this.Title+'</span>');
			if (this.Link!=""){document.write('</a>');}
			document.write('<div class="hr"></div>');
		document.write('</div>');
		document.write('<p class="Hot-SubHead">'+this.SubTitle+'</p>');
		document.write('<div class="Hot-Pic"><img src="'+this.Img+'" border="0"></div>');
		document.write('<p>'+this.BodyShort+'</p>');
		document.write(this.Body);
		document.write('<br />');
		if (this.Link!=""){document.write('<a class="MoreDetails" href="'+this.Link+'">More Details</a>');}
	document.write('&nbsp;</div>');
}
function printSubStyle(){
	var br=''; if(this._br){br='<br />&nbsp;';}
	document.write('<div class="Sub-Left">');
		if (this.Link!=""){document.write('<a class="Hot-SubHead" href="'+this.Link+'"> '+this.Title+'</a>'+br);}
		else {document.write('<span class="Hot-SubHead"> '+this.Title+br+'</span>');}
		document.write('<div class="Hot-Pic"><img src="'+this.Img+'" border="0" width="190"></div>');
		document.write('<br />');
		document.write('<span>'+this.SubTitle+' </span>');
		document.write(this.BodyShort);
		//document.write('<br />');
		//if (this.Link!=""){document.write('<a class="MoreDetails" href="'+this.Link+'">More Details</a>');}
	document.write('</div>');
}
function printSideStyle(){
	document.write('<div>');
		if (this.Link!=""){document.write('<a class="Hot-SubHead" href="'+this.Link+'"> '+this.Title+'</a>');}
		else {document.write('<span class="Hot-SubHead"> '+this.Title+'</span>');}
		document.write('<hr color="#e6e6e6" size=1 noshade>');
		document.write('<div class="Hot-Pic"><img src="'+this.Img+'" border="0" width="50"></div>');	
		document.write('<span>'+this.SubTitle+' </span>');
		document.write(this.BodyShort);
		document.write('&nbsp;&nbsp;&nbsp;');
		if (this.Link!=""){document.write('<a class="MoreDetails" href="'+this.Link+'">More Details</a>');}
	document.write('<hr color="#e6e6e6" size=1 noshade></div>');
}
function printSideSubStyle(){
	document.write('<div style="width:200px; float:left;">');
		if (this.Link!=""){document.write('<a class="Hot-SubHead" href="'+this.Link+'"> '+this.Title+'</a>');}
		else {document.write('<span class="Hot-SubHead"> '+this.Title+'</span>');}
		document.write('<hr color="#e6e6e6" size=1 noshade>');
		document.write('<div class="Hot-Pic"><img src="'+this.Img+'" border="0" width="190"></div>');	
		document.write('<span>'+this.SubTitle+' </span>');
		document.write(this.BodyShort);
		document.write('&nbsp;&nbsp;&nbsp;');
		if (this.Link!=""){document.write('<a class="MoreDetails" href="'+this.Link+'">More Details</a>');}
	document.write('<hr color="#e6e6e6" size=1 noshade></div>');
}

function FlashNew63(){
	var class1='LinkColored';
	if(c==1){class1='navLinkColored'; c=0;}else{c=1;}
	var obj1=document.getElementById("xMobile");
	count++;
	if (count <= 17){
		if(obj1!=null){obj1.className=class1;}
		setTimeout("FlashNew63()",400);
	}else{
		count = 0;
	}

}//LinkColored
//////////////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////// Formating Functions ////////////////////////////////
/********************************* CREATES DATETIME ********************************/
function CreateDate(YYYY,MM,DD,hh,mm,ss){
	var cDate = new Date();
	if(YYYY!=''){cDate.setFullYear(YYYY);}
	if(MM!=''){cDate.setMonth(MM);}
	if(DD!=''){cDate.setDate(DD);}
	if(hh!=''){cDate.setHours(hh);}
	if(mm!=''){cDate.setMinutes(mm);}
	if(ss!=''){cDate.setSeconds(ss);}
	return cDate;
}
/******************************** FORMATES DATETIME ********************************/
/* Example - 9/17/1977 13:00                                       */
function FormatDateTime(dt){ 
	var value=dt.getMonth()+1+'/'+dt.getDate()+'/'+dt.getFullYear()+' '+right('0'+dt.getHours(),2)+':'+right('0'+dt.getMinutes(),2);
	return value;
}
/******************************** FORMATES DATETIME ********************************/
/* Example - 1977.09.17.13.00                                       */
function SolarDateTime(dt){ 
	var value=dt.getFullYear()+'.'+right('0'+(dt.getMonth()+1),2)+'.'+right('0'+dt.getDate(),2)+'.'+right('0'+dt.getHours(),2)+'.'+right('0'+dt.getMinutes(),2);
	return value;
}
function SQLDateFormat(dt,_time){ 
// Example - 'YYYYMMDD' or 'YYYY-MM-DDTHH:MM:SS'
	if(_time){
	var value=dt.getFullYear()+'-'+right('0'+(dt.getMonth()+1),2)+'-'+right('0'+dt.getDate(),2)+'T'+right('0'+dt.getHours(),2)+':'+right('0'+dt.getMinutes(),2)+':'+right('0'+dt.getSeconds(),2);}
	else{var value=dt.getFullYear()+right('0'+(dt.getMonth()+1),2)+right('0'+dt.getDate(),2);}
	return value;
}
/********************************** CUTOFF RIGHT ***********************************/
/* Example - right("javascript",4) = "ript"                        */
function right(value, num){
	if (num>0){return value.substr(value.length-num);}
}
/********************************** CUTOFF LEFT *************************************/
/* Example - left("javascript",6,'') = "javasc" OR
             left("javascript",6,'yes') = "jav..."                 */
function left(value, num, cont){ 
	var ending='';
	if(num>0){
		if(cont=='yes'){if(num<=value.length){num-=3;ending='...';}}
		return value.substr(0, num)+ending;
	}
}
/////////////////////////////////// Remove Leading Zero //////////////////////////////////////////////
function RemoveLeadingZero(value){
	if(value.indexOf("0")==0){value=value.substr(1);}
	return value;
}
