/*
copyright Stephen Ensminger @ Media27, Inc.
2010-2011

These variables are initialized by the parent and then accessed by every script in the chain

*/

var jvars = function(){
    
    this.domain = (window.location.hostname=='localhost')?'localhost/script_debug/ProjectsGC' :'www.giffinandcrane.com';
    this.browserType = "Internet Explorer";
	this.platformType = "Windows NT";
	
    this.gCurrentSection = 1;
    this.gCurrentTransitionSection = 1;
    this.numOfTransitionSections = 1;

	// array to hold browser properties that are not supported in current browser
	this.nosupport = {};

	this.isPageLoaded;
	
	this.isPortfolioCategoryIntialized = 0;
	
	this.isThumbsContainer = 0;
	this.isThumbnailsHidden = 1; // do not show the thumbnail container 1099:REMEMBER TO SET THIS TO 1 WHEN LIVE
	this.isKeyboardAnimHidden; // show the keyboard animation
	this.isKeyboardAnimInitHidden = 1; // start the keyboard anmation hidden
	this.isSubcatKeynavEnabled = 0; // do we want keyboard navigation on the subcategory previews?
	this.collectionType;
	this.lastSubcatSelected = 0;
	this.lastIndexSelected = 0;
	this.isSubcategorized = 0;
	
	this.galleryPrevNextClickEvent;
	
    this._ajaxLinkOnColor = 'rgb(73, 43, 32)'; // must use RGB in order to compare 73,43,32 #492B20
    this._ajaxHoverColor = 'rgb(36, 37, 65)'; // increase hover color by 1 so it won't conflict with ON color
    this._ajaxLinkOffColor = "#FFF"; // does not need to use RGB

    this._ajaxMenuOnColor = 'rgb(83, 74, 40)'; // purposely incremeted the R value by 1 to distinquish it from the ON color (visibly it's the same)
    this._ajaxMenuOffColor = "#998c7d";
    this._ajaxMenuHoverColor = 'rgb(82, 74, 40)';
    
    this.keyboardhandler = "section";
    this.divboxForText = "textbox";
	
    this.numOfSections;
    
    this.animateMenuChange = 0;
    
    this.userEmailAddress;
	
	this.transitionIntervalId = 0;
    
	this.isLoggedIn = 0;
	this.isLoggedInByAdmin = 0;
	this.isAdmin = 0;
	this.isMemberWarning = 0;
	this.isContactWarning = 0;
	this.isGrayOutOn = 0;
	this.redirectToPageAfterLogin;
	this.retainPostParams = 0;
	this.isAutoLogin = 0;
	
	this.CALC;
	
	// position retainers
	this.isHeightConfig = 0;
	this.layoutHeight = 0;
	this.documentHeight = 0;
	this.windowHeight = 0;
	this.variableHeight = 0;
	this.prevWindowHeight = 0;
	
			
    // upload
    this.isAutoUploadOn = 1;
    this.tempFilePathName;
    this.tempFilePath;
    
    // contains post field values
    this.postParams = {};
    
    // These contain preset values for the form fields
    this.arr_formvalues = Array(
                           'email',
                           'name',
                           'type or paste your story',
                           'first name',
                           'last name');


    
}
var jvars = new jvars();

