code stringlengths 1 2.01M | repo_name stringlengths 3 62 | path stringlengths 1 267 | language stringclasses 231 values | license stringclasses 13 values | size int64 1 2.01M |
|---|---|---|---|---|---|
<?php
/*
* Created on Sep 15, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
class HttpUtils
{
public function fetch_url($url, $code_on_fail = false, $interface = null)
{
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
if ($interface !== null) {
curl_setopt($ch, CURLOPT_INTERFACE, $interface);
}// end if
$content = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($content === false && $code_on_fail === true) {
return $http_code;
}// end if
return $content;
}// end fun
}
?>
| 123gohelmetsv2 | trunk/admin/lib/HttpUtils.php | PHP | asf20 | 842 |
<?php
include_once("../configure/admin.config.inc.php"); //--> admin global var
include_once("db.inc.php"); //--> db global var
include_once("Smarty.class.php"); //--> out template
include_once("Operation.php"); //--> Operation
include_once("QA.php"); //--> QA
require_once("controlHeader.php"); //--> system control header
include_once("Strings.php"); //--> String
$objOperate = new Operation($objSession->getLanguage()); //--> Operation
$objQA = new QA(DB_TAG_SYSTEM, $uid); //--> QA
$objString = new Strings(); //--> String
$error_message = '';
$arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid);
$arrOperateInfo = $objOperate->arrGetOPInfo($arrOperate);
$arrDataList = $objQA->lists($arrOperate, " ORDER BY id DESC", $page, DISPLAY_DATA_SIZE, '');
if(is_array($arrDataList)){
foreach($arrDataList as $key => $value){
$arrDataList[$key]['answer'] = $objString->cut(strip_tags($value['answer']), 60);
}
}
/*----- out html -----*/
$smarty = new Smarty(); //----- out template
$smarty->template_dir = TEMPLATE_SYS_DIR;
$smarty->compile_dir = COMPILE_SYS_DIR;
$smarty->assign('error_message', $error_message);
$smarty->assign('menuGid', $menuGid);
$smarty->assign('menuid', $menuid);
$smarty->assign('selfFileName', $objOperate->strGetSelfFileName());
$smarty->assign('arrOperateInfo', $arrOperateInfo);
$smarty->assign('arrDataList', $arrDataList);
$smarty->assign('PAGE_BAR', $objQA->pagenav);
$smarty->display('listQA.htm');
?>
| 123gohelmetsv2 | trunk/admin/qa/listQA.php | PHP | asf20 | 1,510 |
<?php
include_once("../configure/admin.config.inc.php");//--> admin global var
include_once("db.inc.php"); //--> db global var
include_once("Operation.php"); //--> Operation
include_once("QA.php"); //--> QA
require_once("controlHeader.php"); //--> system control header
$objOperate = new Operation($objSession->getLanguage()); //--> Operation instance
$objQA = new QA($objSession->getLanguage(), $uid); //--> QA
$arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid);
if(isset($_GET['id']) && !empty($_GET['id'])){
$id = $_GET['id'];
$isReturn = $objQA->delete($arrOperate, $id);
if($isReturn)
$error_message = 'delete successfully.';
else
$error_message = 'delete failure.';
}
echo "<script language='javascript'>";
echo "alert(\"$error_message\");";
echo "location.href=\"".$_SERVER['HTTP_REFERER']."\";";
echo "</script>";
//$backurl = $_SERVER['HTTP_REFERER'];
//header("Location: $backurl");
?>
| 123gohelmetsv2 | trunk/admin/qa/listQA_Delete.php | PHP | asf20 | 961 |
<?php
include_once("../configure/admin.config.inc.php"); //--> admin global var
include_once("db.inc.php"); //--> db global var
include_once("Smarty.class.php"); //--> out template
include_once("Operation.php"); //--> Operation
require_once("controlHeader.php"); //--> system control header
include_once("QA.php"); //--> qa
require_once("../tools/fckeditor/fckeditor.php") ;
$objOperate = new Operation($objSession->getLanguage()); //--> Operation
$objQA = new QA($objSession->getLanguage(), $uid); //--> qa
$error_message = '';
$question = '';
$answer = '';
$status = 'approved';
$arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid);
if(isset($_POST['Submit'])){
$question = $_POST['question'];
$answer = $_POST['answer'];
$status = $_POST['status'];
if(empty($question))
$error_message = 'question should\'t be empty.';
else if(empty($answer))
$error_message = 'answer should\'t be empty.';
else{
$isReturn = $objQA->add($arrOperate, '', $question, $answer, $status);
if($isReturn)
$error_message = 'add successfully.';
else
$error_message = 'add failure.';
}
}
/*----- load FCKEditor -----*/
$oFCKeditor = new FCKeditor('answer') ;
$oFCKeditor->Height = $fckEditorHeight;
$oFCKeditor->BasePath = $fckBasePath;
$oFCKeditor->Value = $answer;
$fckHtml = $oFCKeditor->CreateHtml() ;
$arrStatus = array('approved' => 'approved', 'unapproved' => 'unapproved');
/*----- out html -----*/
$smarty = new Smarty(); //----- out template
$smarty->template_dir = TEMPLATE_SYS_DIR;
$smarty->compile_dir = COMPILE_SYS_DIR;
$smarty->assign('menuGid', $menuGid);
$smarty->assign('menuid', $menuid);
$smarty->assign('backurl',$backurl);
$smarty->assign('error_message', $error_message);
$smarty->assign('question', $question);
$smarty->assign('answer', $answer);
$smarty->assign('arrStatus', $arrStatus);
$smarty->assign('statusS', $status);
$smarty->assign("fckHtml", $fckHtml);
$smarty->display('listQA_Add.htm');
?>
| 123gohelmetsv2 | trunk/admin/qa/listQA_Add.php | PHP | asf20 | 1,998 |
<?php
include_once("../configure/admin.config.inc.php"); //--> admin global var
include_once("db.inc.php"); //--> db global var
include_once("Smarty.class.php"); //--> out template
include_once("Operation.php"); //--> Operation
require_once("controlHeader.php"); //--> system control header
include_once("QA.php"); //--> qa
require_once("../tools/fckeditor/fckeditor.php") ;
$objOperate = new Operation($objSession->getLanguage()); //--> Operation
$objQA = new QA($objSession->getLanguage(), $uid); //--> qa
$error_message = '';
$question = '';
$answer = '';
$arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid);
$arrDataInfo = $objQA->getFromID($arrOperate, $id);
if(is_array($arrDataInfo)){
$question = $arrDataInfo['question'];
$answer = $arrDataInfo['answer'];
$status = $arrDataInfo['status'];
}
if(isset($_POST['Submit'])){
$question = addslashes($_POST['question']);
$answer = addslashes($_POST['answer']);
$status = $_POST['status'];
$email = $_POST['email'];
if(empty($question))
$error_message = 'question should\'t be empty.';
else if(empty($answer))
$error_message = 'answer should\'t be empty.';
else{
$isReturn = $objQA->edit($arrOperate, $id, '', $question, $answer, $status);
if($isReturn)
$error_message = 'edit successfully.';
else
$error_message = 'edit failure.';
}
}
/*----- load FCKEditor -----*/
$oFCKeditor = new FCKeditor('answer') ;
$oFCKeditor->Height = $fckEditorHeight;
$oFCKeditor->BasePath = $fckBasePath;
$oFCKeditor->Value = $answer;
$fckHtml = $oFCKeditor->CreateHtml() ;
$arrStatus = array('approved' => 'approved', 'unapproved' => 'unapproved');
/*----- out html -----*/
$smarty = new Smarty(); //----- out template
$smarty->template_dir = TEMPLATE_SYS_DIR;
$smarty->compile_dir = COMPILE_SYS_DIR;
$smarty->assign('menuGid', $menuGid);
$smarty->assign('menuid', $menuid);
$smarty->assign('id', $id);
$smarty->assign('backurl',$backurl);
$smarty->assign('error_message', $error_message);
$smarty->assign('question', $question);
$smarty->assign('answer', $answer);
$smarty->assign('arrStatus', $arrStatus);
$smarty->assign('statusS', $status);
$smarty->assign("fckHtml", $fckHtml);
$smarty->display('listQA_Edit.htm');
?>
| 123gohelmetsv2 | trunk/admin/qa/listQA_Edit.php | PHP | asf20 | 2,262 |
<?php
//include_once ("../configure/configure.php"); //-- global var
include_once("./configure/admin.config.inc.php"); //--> global var
include_once("db.inc.php"); //--> db global var
include_once("Smarty.class.php"); //--> out template
include_once("Authority.php"); //--> Authority
//include_once("controlHeader.php"); //--> system control header
include_once ("Session.php"); //-- Session
//if ($_SERVER["HTTPS"] <> "on")
//{
// $xredir="https://".$_SERVER["SERVER_NAME"]. $_SERVER["REQUEST_URI"];
// header("Location: ".$xredir);
//}
$objSession = new Session(); //-- session
/*----- check session -----*/
if($objSession->exist()) {
$gid = $objSession->getGroupID();
$uid = $objSession->getUserID();
}else{
header("Location: ./login.php");
exit;
}
if(isset($_GET["Lan"])){
$arrLan = array("lan" => $_GET["Lan"]);
$objSession->add($arrLan);
}
if($objSession->getLanguage() == "zh-CN"){
include_once("zh-CN.inc.php"); //--> zh_CN
}else{
include_once("en-US.inc.php"); //--> us_EN
}
if(isset($_GET['menuGid']) && isset($_GET['menuid'])){
$menuGid = $_GET['menuGid'];
$menuid = $_GET['menuid'];
$id = $_GET['id'];
}else{
$menuGid = $_POST['menuGid'];
$menuid = $_POST['menuid'];
$id = $_POST['id'];
}
if(isset($_POST['backurl']))
$backurl = $_POST['backurl'];
else
$backurl = $_SERVER['HTTP_REFERER'];
$objAuth = new Authority($objSession->getLanguage(), $uid); //--> Authority
$navigation = 'Welcome';
$strSubFrameUrl = "templates_sys_en-US/welcome.htm";
$objAuth->setLan($objSession->getLanguage());
$arrMenuList = $objAuth->getMenuFromGroupID($gid);
if(isset($_GET['menuGid']) && isset($_GET['menuid']) && is_array($arrMenuList)){
foreach ($arrMenuList as $cache){
foreach ($cache as $arrValue){
if($arrValue['mid'] == $_GET['menuid']){
$strSubFrameUrl = $arrValue['url'] . "?menuGid=$menuGid&menuid=$menuid";
$navigation = $arrValue['gname'] . ' > ' . $arrValue['mname'];
}
}
}
}
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_SYS_DIR;
$smarty->compile_dir = COMPILE_SYS_DIR;
$smarty->assign('arrMenuList', $arrMenuList);
$smarty->assign('initGid', $menuGid);
$smarty->assign('userName', $objSession->getUserName());
$smarty->assign('navigation', $navigation);
$smarty->assign('subFrameUrl', $strSubFrameUrl);
$smarty->display('main.htm');
?>
| 123gohelmetsv2 | trunk/admin/index.php | PHP | asf20 | 2,491 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("UploadFiles.php"); //--> UploadFiles
include_once("customerSession.inc.php");
include_once ("Session.php"); //-- Session
include_once ("Password.php"); //-- Password
include_once("Strings.php"); //--> String utils
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
require_once('includeHttps.php');
$common = new Common();
$ins_session = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
$objPassword = new Password();
$objCart = new Cart(); //--> Cart
$objStrings = new Strings();
/*----- check session -----*/
if($ins_session->exist()) {
$location = './myaccount.php';
header("Location: $location");
exit;
}
session_start();
$email = $_GET['email'];
$password = $_GET['password'];
if($_SESSION['cart'])
$objCart = unserialize($_SESSION['cart']);
if(isset($_POST['email'])){
$email = $_POST['email'];
$password = $_POST['password'];
if($email == '')
$error_message = "Email is required."; //-- login name was empty
else if($password == '')
$error_message = "Error: No match for E-Mail Address and/or Password."; //-- login password was empty
if(empty($error_message)){
$arrCustomers = $common->getRow(DB_TAG_PUBLIC, "SELECT id, password, lastname FROM customers WHERE email='$email'");
if(!is_array($arrCustomers) || count($arrCustomers) < 1){
$error_message = $email . " not existed.";
}else if(!($objPassword->validate($password, $arrCustomers['password']))){
$error_message = "Error: No match for E-Mail Address and/or Password.";
}else {
$arrdata = array();
$arrdata['uname'] = $arrCustomers['lastname']; //--> add login name to session
if(is_array($ins_session->start($arrCustomers['id'], $arrdata))){
if(isset($_POST['action']) && $_POST['action'] =="guest_email")
$location = './checkout.php';
else
$location = './myaccount.php';
header("Location: $location");
exit;
}
}
}
}
if(isset($_POST['action']) && $_POST['action'] =="guest_email" && !empty($error_message)){
$location = "./preCheckout.php?error_message_login=$error_message";
header("Location: $location");
exit;
}
include_once("includeCategory.php"); //--> include category
include_once("includeSpec.php"); //--> include spec
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->force_compile = true;
$smarty->debugging = false;
$smarty->caching = false;
$smarty->cache_lifetime = 120;
$smarty->assign('error_message', $error_message);
$smarty->assign('HOME_URL', HOME_URL);
$smarty->assign('HOME_URL_HTTP', HOME_URL);
$smarty->assign('categorys', $categorys);
$smarty->assign('topCategory', $topCategory);
$smarty->assign('specProducts', $specProducts);
$smarty->assign('email', $email);
$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);
$smarty->display('login.html');
?>
| 123gohelmetsv2 | trunk/login.php | PHP | asf20 | 3,535 |
/*
Yetii - Yet (E)Another Tab Interface Implementation
http://www.kminek.pl/lab/yetii/
Copyright (c) 2007 Grzegorz Wojcik
Code licensed under the BSD License:
http://www.kminek.pl/bsdlicense.txt
*/
function Yetii() {
this.defaults = {
id: null,
active: 1,
timeout: null,
interval: null,
tabclass: 'tab',
activeclass: 'active'
};
for (var n in arguments[0]) { this.defaults[n]=arguments[0][n]; };
this.getTabs = function() {
var retnode = [];
var elem = document.getElementById(this.defaults.id).getElementsByTagName('*');
var regexp = new RegExp("(^|\\s)" + this.defaults.tabclass.replace(/\-/g, "\\-") + "(\\s|$)");
for (var i = 0; i < elem.length; i++) {
if (regexp.test(elem[i].className)) retnode.push(elem[i]);
}
return retnode;
};
this.links = document.getElementById(this.defaults.id + '-nav').getElementsByTagName('a');
this.show = function(number){
for (var i = 0; i < this.tabs.length; i++) {
this.tabs[i].style.display = ((i+1)==number) ? 'block' : 'none';
this.links[i].className = ((i+1)==number) ? this.defaults.activeclass : '';
}
};
this.rotate = function(interval){
this.show(this.defaults.active);
this.defaults.active++;
if(this.defaults.active > this.tabs.length) this.defaults.active = 1;
var self = this;
this.defaults.timeout = setTimeout(function(){self.rotate(interval);}, interval*1000);
};
this.tabs = this.getTabs();
this.show(this.defaults.active);
var self = this;
for (var i = 0; i < this.links.length; i++) {
this.links[i].customindex = i+1;
this.links[i].onclick = function(){ if (self.defaults.timeout) clearTimeout(self.defaults.timeout); self.show(this.customindex); return false; };
}
if (this.defaults.interval) this.rotate(this.defaults.interval);
}; | 123gohelmetsv2 | trunk/js/java.js | JavaScript | asf20 | 2,014 |
// -----------------------------------------------------------------------------------
//
// Lightbox v2.03.3
// by Lokesh Dhakar - http://www.huddletogether.com
// 5/21/06
//
// For more information on this script, visit:
// http://huddletogether.com/projects/lightbox2/
//
// Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/
//
// Credit also due to those who have helped, inspired, and made their code available to the public.
// Including: Scott Upton(uptonic.com), Peter-Paul Koch(quirksmode.com), Thomas Fuchs(mir.aculo.us), and others.
//
//
// -----------------------------------------------------------------------------------
/*
Table of Contents
-----------------
Configuration
Global Variables
Extending Built-in Objects
- Object.extend(Element)
- Array.prototype.removeDuplicates()
- Array.prototype.empty()
Lightbox Class Declaration
- initialize()
- updateImageList()
- start()
- changeImage()
- resizeImageContainer()
- showImage()
- updateDetails()
- updateNav()
- enableKeyboardNav()
- disableKeyboardNav()
- keyboardAction()
- preloadNeighborImages()
- end()
Miscellaneous Functions
- getPageScroll()
- getPageSize()
- getKey()
- listenKey()
- showSelectBoxes()
- hideSelectBoxes()
- showFlash()
- hideFlash()
- pause()
- initLightbox()
Function Calls
- addLoadEvent(initLightbox)
*/
// -----------------------------------------------------------------------------------
//
// Configuration
//
var fileLoadingImage = "images/loading.gif";
var fileBottomNavCloseImage = "images/closelabel.gif";
var overlayOpacity = 0.8; // controls transparency of shadow overlay
var animate = true; // toggles resizing animations
var resizeSpeed = 7; // controls the speed of the image resizing animations (1=slowest and 10=fastest)
var borderSize = 10; //if you adjust the padding in the CSS, you will need to update this variable
// -----------------------------------------------------------------------------------
//
// Global Variables
//
var imageArray = new Array;
var activeImage;
if(animate == true){
overlayDuration = 0.2; // shadow fade in/out duration
if(resizeSpeed > 10){ resizeSpeed = 10;}
if(resizeSpeed < 1){ resizeSpeed = 1;}
resizeDuration = (11 - resizeSpeed) * 0.15;
} else {
overlayDuration = 0;
resizeDuration = 0;
}
// -----------------------------------------------------------------------------------
//
// Additional methods for Element added by SU, Couloir
// - further additions by Lokesh Dhakar (huddletogether.com)
//
Object.extend(Element, {
getWidth: function(element) {
element = $(element);
return element.offsetWidth;
},
setWidth: function(element,w) {
element = $(element);
element.style.width = w +"px";
},
setHeight: function(element,h) {
element = $(element);
element.style.height = h +"px";
},
setTop: function(element,t) {
element = $(element);
element.style.top = t +"px";
},
setLeft: function(element,l) {
element = $(element);
element.style.left = l +"px";
},
setSrc: function(element,src) {
element = $(element);
element.src = src;
},
setHref: function(element,href) {
element = $(element);
element.href = href;
},
setInnerHTML: function(element,content) {
element = $(element);
element.innerHTML = content;
}
});
// -----------------------------------------------------------------------------------
//
// Extending built-in Array object
// - array.removeDuplicates()
// - array.empty()
//
Array.prototype.removeDuplicates = function () {
for(i = 0; i < this.length; i++){
for(j = this.length-1; j>i; j--){
if(this[i][0] == this[j][0]){
this.splice(j,1);
}
}
}
}
// -----------------------------------------------------------------------------------
Array.prototype.empty = function () {
for(i = 0; i <= this.length; i++){
this.shift();
}
}
// -----------------------------------------------------------------------------------
//
// Lightbox Class Declaration
// - initialize()
// - start()
// - changeImage()
// - resizeImageContainer()
// - showImage()
// - updateDetails()
// - updateNav()
// - enableKeyboardNav()
// - disableKeyboardNav()
// - keyboardNavAction()
// - preloadNeighborImages()
// - end()
//
// Structuring of code inspired by Scott Upton (http://www.uptonic.com/)
//
var Lightbox = Class.create();
Lightbox.prototype = {
// initialize()
// Constructor runs on completion of the DOM loading. Calls updateImageList and then
// the function inserts html at the bottom of the page which is used to display the shadow
// overlay and the image container.
//
initialize: function() {
this.updateImageList();
// Code inserts html at the bottom of the page that looks similar to this:
//
// <div id="overlay"></div>
// <div id="lightbox">
// <div id="outerImageContainer">
// <div id="imageContainer">
// <img id="lightboxImage">
// <div style="" id="hoverNav">
// <a href="#" id="prevLink"></a>
// <a href="#" id="nextLink"></a>
// </div>
// <div id="loading">
// <a href="#" id="loadingLink">
// <img src="images/loading.gif">
// </a>
// </div>
// </div>
// </div>
// <div id="imageDataContainer">
// <div id="imageData">
// <div id="imageDetails">
// <span id="caption"></span>
// <span id="numberDisplay"></span>
// </div>
// <div id="bottomNav">
// <a href="#" id="bottomNavClose">
// <img src="images/close.gif">
// </a>
// </div>
// </div>
// </div>
// </div>
var objBody = document.getElementsByTagName("body").item(0);
var objOverlay = document.createElement("div");
objOverlay.setAttribute('id','overlay');
objOverlay.style.display = 'none';
objOverlay.onclick = function() { myLightbox.end(); }
objBody.appendChild(objOverlay);
var objLightbox = document.createElement("div");
objLightbox.setAttribute('id','lightbox');
objLightbox.style.display = 'none';
objLightbox.onclick = function(e) { // close Lightbox is user clicks shadow overlay
if (!e) var e = window.event;
var clickObj = Event.element(e).id;
if ( clickObj == 'lightbox') {
myLightbox.end();
}
};
objBody.appendChild(objLightbox);
var objOuterImageContainer = document.createElement("div");
objOuterImageContainer.setAttribute('id','outerImageContainer');
objLightbox.appendChild(objOuterImageContainer);
// When Lightbox starts it will resize itself from 250 by 250 to the current image dimension.
// If animations are turned off, it will be hidden as to prevent a flicker of a
// white 250 by 250 box.
if(animate){
Element.setWidth('outerImageContainer', 250);
Element.setHeight('outerImageContainer', 250);
} else {
Element.setWidth('outerImageContainer', 1);
Element.setHeight('outerImageContainer', 1);
}
var objImageContainer = document.createElement("div");
objImageContainer.setAttribute('id','imageContainer');
objOuterImageContainer.appendChild(objImageContainer);
var objLightboxImage = document.createElement("img");
objLightboxImage.setAttribute('id','lightboxImage');
objImageContainer.appendChild(objLightboxImage);
var objHoverNav = document.createElement("div");
objHoverNav.setAttribute('id','hoverNav');
objImageContainer.appendChild(objHoverNav);
var objPrevLink = document.createElement("a");
objPrevLink.setAttribute('id','prevLink');
objPrevLink.setAttribute('href','#');
objHoverNav.appendChild(objPrevLink);
var objNextLink = document.createElement("a");
objNextLink.setAttribute('id','nextLink');
objNextLink.setAttribute('href','#');
objHoverNav.appendChild(objNextLink);
var objLoading = document.createElement("div");
objLoading.setAttribute('id','loading');
objImageContainer.appendChild(objLoading);
var objLoadingLink = document.createElement("a");
objLoadingLink.setAttribute('id','loadingLink');
objLoadingLink.setAttribute('href','#');
objLoadingLink.onclick = function() { myLightbox.end(); return false; }
objLoading.appendChild(objLoadingLink);
var objLoadingImage = document.createElement("img");
objLoadingImage.setAttribute('src', fileLoadingImage);
objLoadingLink.appendChild(objLoadingImage);
var objImageDataContainer = document.createElement("div");
objImageDataContainer.setAttribute('id','imageDataContainer');
objLightbox.appendChild(objImageDataContainer);
var objImageData = document.createElement("div");
objImageData.setAttribute('id','imageData');
objImageDataContainer.appendChild(objImageData);
var objImageDetails = document.createElement("div");
objImageDetails.setAttribute('id','imageDetails');
objImageData.appendChild(objImageDetails);
var objCaption = document.createElement("span");
objCaption.setAttribute('id','caption');
objImageDetails.appendChild(objCaption);
var objNumberDisplay = document.createElement("span");
objNumberDisplay.setAttribute('id','numberDisplay');
objImageDetails.appendChild(objNumberDisplay);
var objBottomNav = document.createElement("div");
objBottomNav.setAttribute('id','bottomNav');
objImageData.appendChild(objBottomNav);
var objBottomNavCloseLink = document.createElement("a");
objBottomNavCloseLink.setAttribute('id','bottomNavClose');
objBottomNavCloseLink.setAttribute('href','#');
objBottomNavCloseLink.onclick = function() { myLightbox.end(); return false; }
objBottomNav.appendChild(objBottomNavCloseLink);
var objBottomNavCloseImage = document.createElement("img");
objBottomNavCloseImage.setAttribute('src', fileBottomNavCloseImage);
objBottomNavCloseLink.appendChild(objBottomNavCloseImage);
},
//
// updateImageList()
// Loops through anchor tags looking for 'lightbox' references and applies onclick
// events to appropriate links. You can rerun after dynamically adding images w/ajax.
//
updateImageList: function() {
if (!document.getElementsByTagName){ return; }
var anchors = document.getElementsByTagName('a');
var areas = document.getElementsByTagName('area');
// loop through all anchor tags
for (var i=0; i<anchors.length; i++){
var anchor = anchors[i];
var relAttribute = String(anchor.getAttribute('rel'));
// use the string.match() method to catch 'lightbox' references in the rel attribute
if (anchor.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))){
anchor.onclick = function () {myLightbox.start(this); return false;}
}
}
// loop through all area tags
// todo: combine anchor & area tag loops
for (var i=0; i< areas.length; i++){
var area = areas[i];
var relAttribute = String(area.getAttribute('rel'));
// use the string.match() method to catch 'lightbox' references in the rel attribute
if (area.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))){
area.onclick = function () {myLightbox.start(this); return false;}
}
}
},
//
// start()
// Display overlay and lightbox. If image is part of a set, add siblings to imageArray.
//
start: function(imageLink) {
hideSelectBoxes();
hideFlash();
// stretch overlay to fill page and fade in
var arrayPageSize = getPageSize();
Element.setWidth('overlay', arrayPageSize[0]);
Element.setHeight('overlay', arrayPageSize[1]);
new Effect.Appear('overlay', { duration: overlayDuration, from: 0.0, to: overlayOpacity });
imageArray = [];
imageNum = 0;
if (!document.getElementsByTagName){ return; }
var anchors = document.getElementsByTagName( imageLink.tagName);
// if image is NOT part of a set..
if((imageLink.getAttribute('rel') == 'lightbox')){
// add single image to imageArray
imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title')));
} else {
// if image is part of a set..
// loop through anchors, find other images in set, and add them to imageArray
for (var i=0; i<anchors.length; i++){
var anchor = anchors[i];
if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))){
imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title')));
}
}
imageArray.removeDuplicates();
while(imageArray[imageNum][0] != imageLink.getAttribute('href')) { imageNum++;}
}
// calculate top and left offset for the lightbox
var arrayPageScroll = getPageScroll();
var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 10);
var lightboxLeft = arrayPageScroll[0];
Element.setTop('lightbox', lightboxTop);
Element.setLeft('lightbox', lightboxLeft);
Element.show('lightbox');
this.changeImage(imageNum);
},
//
// changeImage()
// Hide most elements and preload image in preparation for resizing image container.
//
changeImage: function(imageNum) {
activeImage = imageNum; // update global var
// hide elements during transition
if(animate){ Element.show('loading');}
Element.hide('lightboxImage');
Element.hide('hoverNav');
Element.hide('prevLink');
Element.hide('nextLink');
Element.hide('imageDataContainer');
Element.hide('numberDisplay');
imgPreloader = new Image();
// once image is preloaded, resize image container
imgPreloader.onload=function(){
Element.setSrc('lightboxImage', imageArray[activeImage][0]);
myLightbox.resizeImageContainer(imgPreloader.width, imgPreloader.height);
imgPreloader.onload=function(){}; // clear onLoad, IE behaves irratically with animated gifs otherwise
}
imgPreloader.src = imageArray[activeImage][0];
},
//
// resizeImageContainer()
//
resizeImageContainer: function( imgWidth, imgHeight) {
// get curren width and height
this.widthCurrent = Element.getWidth('outerImageContainer');
this.heightCurrent = Element.getHeight('outerImageContainer');
// get new width and height
var widthNew = (imgWidth + (borderSize * 2));
var heightNew = (imgHeight + (borderSize * 2));
// scalars based on change from old to new
this.xScale = ( widthNew / this.widthCurrent) * 100;
this.yScale = ( heightNew / this.heightCurrent) * 100;
// calculate size difference between new and old image, and resize if necessary
wDiff = this.widthCurrent - widthNew;
hDiff = this.heightCurrent - heightNew;
if(!( hDiff == 0)){ new Effect.Scale('outerImageContainer', this.yScale, {scaleX: false, duration: resizeDuration, queue: 'front'}); }
if(!( wDiff == 0)){ new Effect.Scale('outerImageContainer', this.xScale, {scaleY: false, delay: resizeDuration, duration: resizeDuration}); }
// if new and old image are same size and no scaling transition is necessary,
// do a quick pause to prevent image flicker.
if((hDiff == 0) && (wDiff == 0)){
if (navigator.appVersion.indexOf("MSIE")!=-1){ pause(250); } else { pause(100);}
}
Element.setHeight('prevLink', imgHeight);
Element.setHeight('nextLink', imgHeight);
Element.setWidth( 'imageDataContainer', widthNew);
this.showImage();
},
//
// showImage()
// Display image and begin preloading neighbors.
//
showImage: function(){
Element.hide('loading');
new Effect.Appear('lightboxImage', { duration: resizeDuration, queue: 'end', afterFinish: function(){ myLightbox.updateDetails(); } });
this.preloadNeighborImages();
},
//
// updateDetails()
// Display caption, image number, and bottom nav.
//
updateDetails: function() {
// if caption is not null
if(imageArray[activeImage][1]){
Element.show('caption');
Element.setInnerHTML( 'caption', imageArray[activeImage][1]);
}
// if image is part of set display 'Image x of x'
if(imageArray.length > 1){
Element.show('numberDisplay');
Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length);
}
new Effect.Parallel(
[ new Effect.SlideDown( 'imageDataContainer', { sync: true, duration: resizeDuration, from: 0.0, to: 1.0 }),
new Effect.Appear('imageDataContainer', { sync: true, duration: resizeDuration }) ],
{ duration: resizeDuration, afterFinish: function() {
// update overlay size and update nav
var arrayPageSize = getPageSize();
Element.setHeight('overlay', arrayPageSize[1]);
myLightbox.updateNav();
}
}
);
},
//
// updateNav()
// Display appropriate previous and next hover navigation.
//
updateNav: function() {
Element.show('hoverNav');
// if not first image in set, display prev image button
if(activeImage != 0){
Element.show('prevLink');
document.getElementById('prevLink').onclick = function() {
myLightbox.changeImage(activeImage - 1); return false;
}
}
// if not last image in set, display next image button
if(activeImage != (imageArray.length - 1)){
Element.show('nextLink');
document.getElementById('nextLink').onclick = function() {
myLightbox.changeImage(activeImage + 1); return false;
}
}
this.enableKeyboardNav();
},
//
// enableKeyboardNav()
//
enableKeyboardNav: function() {
document.onkeydown = this.keyboardAction;
},
//
// disableKeyboardNav()
//
disableKeyboardNav: function() {
document.onkeydown = '';
},
//
// keyboardAction()
//
keyboardAction: function(e) {
if (e == null) { // ie
keycode = event.keyCode;
escapeKey = 27;
} else { // mozilla
keycode = e.keyCode;
escapeKey = e.DOM_VK_ESCAPE;
}
key = String.fromCharCode(keycode).toLowerCase();
if((key == 'x') || (key == 'o') || (key == 'c') || (keycode == escapeKey)){ // close lightbox
myLightbox.end();
} else if((key == 'p') || (keycode == 37)){ // display previous image
if(activeImage != 0){
myLightbox.disableKeyboardNav();
myLightbox.changeImage(activeImage - 1);
}
} else if((key == 'n') || (keycode == 39)){ // display next image
if(activeImage != (imageArray.length - 1)){
myLightbox.disableKeyboardNav();
myLightbox.changeImage(activeImage + 1);
}
}
},
//
// preloadNeighborImages()
// Preload previous and next images.
//
preloadNeighborImages: function(){
if((imageArray.length - 1) > activeImage){
preloadNextImage = new Image();
preloadNextImage.src = imageArray[activeImage + 1][0];
}
if(activeImage > 0){
preloadPrevImage = new Image();
preloadPrevImage.src = imageArray[activeImage - 1][0];
}
},
//
// end()
//
end: function() {
this.disableKeyboardNav();
Element.hide('lightbox');
new Effect.Fade('overlay', { duration: overlayDuration});
showSelectBoxes();
showFlash();
}
}
// -----------------------------------------------------------------------------------
//
// getPageScroll()
// Returns array with x,y page scroll values.
// Core code from - quirksmode.com
//
function getPageScroll(){
var xScroll, yScroll;
if (self.pageYOffset) {
yScroll = self.pageYOffset;
xScroll = self.pageXOffset;
} else if (document.documentElement && document.documentElement.scrollTop){ // Explorer 6 Strict
yScroll = document.documentElement.scrollTop;
xScroll = document.documentElement.scrollLeft;
} else if (document.body) {// all other Explorers
yScroll = document.body.scrollTop;
xScroll = document.body.scrollLeft;
}
arrayPageScroll = new Array(xScroll,yScroll)
return arrayPageScroll;
}
// -----------------------------------------------------------------------------------
//
// getPageSize()
// Returns array with page width, height and window width, height
// Core code from - quirksmode.com
// Edit for Firefox by pHaez
//
function getPageSize(){
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = window.innerWidth + window.scrollMaxX;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
// console.log(self.innerWidth);
// console.log(document.documentElement.clientWidth);
if (self.innerHeight) { // all except Explorer
if(document.documentElement.clientWidth){
windowWidth = document.documentElement.clientWidth;
} else {
windowWidth = self.innerWidth;
}
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
// for small pages with total height less then height of the viewport
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
// console.log("xScroll " + xScroll)
// console.log("windowWidth " + windowWidth)
// for small pages with total width less then width of the viewport
if(xScroll < windowWidth){
pageWidth = xScroll;
} else {
pageWidth = windowWidth;
}
// console.log("pageWidth " + pageWidth)
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;
}
// -----------------------------------------------------------------------------------
//
// getKey(key)
// Gets keycode. If 'x' is pressed then it hides the lightbox.
//
function getKey(e){
if (e == null) { // ie
keycode = event.keyCode;
} else { // mozilla
keycode = e.which;
}
key = String.fromCharCode(keycode).toLowerCase();
if(key == 'x'){
}
}
// -----------------------------------------------------------------------------------
//
// listenKey()
//
function listenKey () { document.onkeypress = getKey; }
// ---------------------------------------------------
function showSelectBoxes(){
var selects = document.getElementsByTagName("select");
for (i = 0; i != selects.length; i++) {
selects[i].style.visibility = "visible";
}
}
// ---------------------------------------------------
function hideSelectBoxes(){
var selects = document.getElementsByTagName("select");
for (i = 0; i != selects.length; i++) {
selects[i].style.visibility = "hidden";
}
}
// ---------------------------------------------------
function showFlash(){
var flashObjects = document.getElementsByTagName("object");
for (i = 0; i < flashObjects.length; i++) {
flashObjects[i].style.visibility = "visible";
}
var flashEmbeds = document.getElementsByTagName("embed");
for (i = 0; i < flashEmbeds.length; i++) {
flashEmbeds[i].style.visibility = "visible";
}
}
// ---------------------------------------------------
function hideFlash(){
var flashObjects = document.getElementsByTagName("object");
for (i = 0; i < flashObjects.length; i++) {
flashObjects[i].style.visibility = "hidden";
}
var flashEmbeds = document.getElementsByTagName("embed");
for (i = 0; i < flashEmbeds.length; i++) {
flashEmbeds[i].style.visibility = "hidden";
}
}
// ---------------------------------------------------
//
// pause(numberMillis)
// Pauses code execution for specified time. Uses busy code, not good.
// Help from Ran Bar-On [ran2103@gmail.com]
//
function pause(ms){
var date = new Date();
curDate = null;
do{var curDate = new Date();}
while( curDate - date < ms);
}
/*
function pause(numberMillis) {
var curently = new Date().getTime() + sender;
while (new Date().getTime();
}
*/
// ---------------------------------------------------
function initLightbox() { myLightbox = new Lightbox(); }
Event.observe(window, 'load', initLightbox, false); | 123gohelmetsv2 | trunk/js/lightbox.js | JavaScript | asf20 | 23,833 |
/******************************************************************************
Name: Highslide JS
Version: 4.1.8 (October 27 2009)
Config: default +inline +ajax +iframe +flash
Author: Torstein Hønsi
Support: http://highslide.com/support
Licence:
Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5
License (http://creativecommons.org/licenses/by-nc/2.5/).
You are free:
* to copy, distribute, display, and perform the work
* to make derivative works
Under the following conditions:
* Attribution. You must attribute the work in the manner specified by the
author or licensor.
* Noncommercial. You may not use this work for commercial purposes.
* For any reuse or distribution, you must make clear to others the license
terms of this work.
* Any of these conditions can be waived if you get permission from the
copyright holder.
Your fair use and other rights are in no way affected by the above.
******************************************************************************/
if (!hs) { var hs = {
// Language strings
lang : {
cssDirection: 'ltr',
loadingText : 'Loading...',
loadingTitle : 'Click to cancel',
focusTitle : 'Click to bring to front',
fullExpandTitle : 'Expand to actual size (f)',
creditsText : 'Powered by <i>Highslide JS</i>',
creditsTitle : 'Go to the Highslide JS homepage',
previousText : 'Previous',
nextText : 'Next',
moveText : 'Move',
closeText : 'Close',
closeTitle : 'Close (esc)',
resizeTitle : 'Resize',
playText : 'Play',
playTitle : 'Play slideshow (spacebar)',
pauseText : 'Pause',
pauseTitle : 'Pause slideshow (spacebar)',
previousTitle : 'Previous (arrow left)',
nextTitle : 'Next (arrow right)',
moveTitle : 'Move',
fullExpandText : '1:1',
restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.'
},
// See http://highslide.com/ref for examples of settings
graphicsDir : 'highslide/graphics/',
expandCursor : 'zoomin.cur', // null disables
restoreCursor : 'zoomout.cur', // null disables
expandDuration : 250, // milliseconds
restoreDuration : 250,
marginLeft : 15,
marginRight : 15,
marginTop : 15,
marginBottom : 15,
zIndexCounter : 1001, // adjust to other absolutely positioned elements
loadingOpacity : 0.75,
allowMultipleInstances: true,
numberOfImagesToPreload : 5,
outlineWhileAnimating : 2, // 0 = never, 1 = always, 2 = HTML only
outlineStartOffset : 3, // ends at 10
padToMinWidth : false, // pad the popup width to make room for wide caption
fullExpandPosition : 'bottom right',
fullExpandOpacity : 1,
showCredits : true, // you can set this to false if you want
creditsHref : 'http://highslide.com/',
creditsTarget : '_self',
enableKeyListener : true,
openerTagNames : ['a'], // Add more to allow slideshow indexing
allowWidthReduction : false,
allowHeightReduction : true,
preserveContent : true, // Preserve changes made to the content and position of HTML popups.
objectLoadTime : 'before', // Load iframes 'before' or 'after' expansion.
cacheAjax : true, // Cache ajax popups for instant display. Can be overridden for each popup.
dragByHeading: true,
minWidth: 200,
minHeight: 200,
allowSizeReduction: true, // allow the image to reduce to fit client size. If false, this overrides minWidth and minHeight
outlineType : 'drop-shadow', // set null to disable outlines
skin : {
contentWrapper:
'<div class="highslide-header"><ul>'+
'<li class="highslide-previous">'+
'<a href="#" title="{hs.lang.previousTitle}" onclick="return hs.previous(this)">'+
'<span>{hs.lang.previousText}</span></a>'+
'</li>'+
'<li class="highslide-next">'+
'<a href="#" title="{hs.lang.nextTitle}" onclick="return hs.next(this)">'+
'<span>{hs.lang.nextText}</span></a>'+
'</li>'+
'<li class="highslide-move">'+
'<a href="#" title="{hs.lang.moveTitle}" onclick="return false">'+
'<span>{hs.lang.moveText}</span></a>'+
'</li>'+
'<li class="highslide-close">'+
'<a href="#" title="{hs.lang.closeTitle}" onclick="return hs.close(this)">'+
'<span>{hs.lang.closeText}</span></a>'+
'</li>'+
'</ul></div>'+
'<div class="highslide-body"></div>'+
'<div class="highslide-footer"><div>'+
'<span class="highslide-resize" title="{hs.lang.resizeTitle}"><span></span></span>'+
'</div></div>'
},
// END OF YOUR SETTINGS
// declare internal properties
preloadTheseImages : [],
continuePreloading: true,
expanders : [],
overrides : [
'allowSizeReduction',
'useBox',
'outlineType',
'outlineWhileAnimating',
'captionId',
'captionText',
'captionEval',
'captionOverlay',
'headingId',
'headingText',
'headingEval',
'headingOverlay',
'creditsPosition',
'dragByHeading',
'width',
'height',
'contentId',
'allowWidthReduction',
'allowHeightReduction',
'preserveContent',
'maincontentId',
'maincontentText',
'maincontentEval',
'objectType',
'cacheAjax',
'objectWidth',
'objectHeight',
'objectLoadTime',
'swfOptions',
'wrapperClassName',
'minWidth',
'minHeight',
'maxWidth',
'maxHeight',
'slideshowGroup',
'easing',
'easingClose',
'fadeInOut',
'src'
],
overlays : [],
idCounter : 0,
oPos : {
x: ['leftpanel', 'left', 'center', 'right', 'rightpanel'],
y: ['above', 'top', 'middle', 'bottom', 'below']
},
mouse: {},
headingOverlay: {},
captionOverlay: {},
swfOptions: { flashvars: {}, params: {}, attributes: {} },
timers : [],
pendingOutlines : {},
sleeping : [],
preloadTheseAjax : [],
cacheBindings : [],
cachedGets : {},
clones : {},
onReady: [],
uaVersion: /Trident\/4\.0/.test(navigator.userAgent) ? 8 :
parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]),
ie : (document.all && !window.opera),
safari : /Safari/.test(navigator.userAgent),
geckoMac : /Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),
$ : function (id) {
if (id) return document.getElementById(id);
},
push : function (arr, val) {
arr[arr.length] = val;
},
createElement : function (tag, attribs, styles, parent, nopad) {
var el = document.createElement(tag);
if (attribs) hs.extend(el, attribs);
if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0});
if (styles) hs.setStyles(el, styles);
if (parent) parent.appendChild(el);
return el;
},
extend : function (el, attribs) {
for (var x in attribs) el[x] = attribs[x];
return el;
},
setStyles : function (el, styles) {
for (var x in styles) {
if (hs.ie && x == 'opacity') {
if (styles[x] > 0.99) el.style.removeAttribute('filter');
else el.style.filter = 'alpha(opacity='+ (styles[x] * 100) +')';
}
else el.style[x] = styles[x];
}
},
animate: function(el, prop, opt) {
var start,
end,
unit;
if (typeof opt != 'object' || opt === null) {
var args = arguments;
opt = {
duration: args[2],
easing: args[3],
complete: args[4]
};
}
if (typeof opt.duration != 'number') opt.duration = 250;
opt.easing = Math[opt.easing] || Math.easeInQuad;
opt.curAnim = hs.extend({}, prop);
for (var name in prop) {
var e = new hs.fx(el, opt , name );
start = parseFloat(hs.css(el, name)) || 0;
end = parseFloat(prop[name]);
unit = name != 'opacity' ? 'px' : '';
e.custom( start, end, unit );
}
},
css: function(el, prop) {
if (document.defaultView) {
return document.defaultView.getComputedStyle(el, null).getPropertyValue(prop);
} else {
if (prop == 'opacity') prop = 'filter';
var val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b){ return b.toUpperCase(); })];
if (prop == 'filter')
val = val.replace(/alpha\(opacity=([0-9]+)\)/,
function (a, b) { return b / 100 });
return val === '' ? 1 : val;
}
},
getPageSize : function () {
var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat'
? d.documentElement : d.body;
var width = hs.ie ? iebody.clientWidth :
(d.documentElement.clientWidth || self.innerWidth),
height = hs.ie ? iebody.clientHeight : self.innerHeight;
hs.page = {
width: width,
height: height,
scrollLeft: hs.ie ? iebody.scrollLeft : pageXOffset,
scrollTop: hs.ie ? iebody.scrollTop : pageYOffset
}
},
getPosition : function(el) {
var p = { x: el.offsetLeft, y: el.offsetTop };
while (el.offsetParent) {
el = el.offsetParent;
p.x += el.offsetLeft;
p.y += el.offsetTop;
if (el != document.body && el != document.documentElement) {
p.x -= el.scrollLeft;
p.y -= el.scrollTop;
}
}
return p;
},
expand : function(a, params, custom, type) {
if (!a) a = hs.createElement('a', null, { display: 'none' }, hs.container);
if (typeof a.getParams == 'function') return params;
if (type == 'html') {
for (var i = 0; i < hs.sleeping.length; i++) {
if (hs.sleeping[i] && hs.sleeping[i].a == a) {
hs.sleeping[i].awake();
hs.sleeping[i] = null;
return false;
}
}
hs.hasHtmlExpanders = true;
}
try {
new hs.Expander(a, params, custom, type);
return false;
} catch (e) { return true; }
},
htmlExpand : function(a, params, custom) {
return hs.expand(a, params, custom, 'html');
},
getSelfRendered : function() {
return hs.createElement('div', {
className: 'highslide-html-content',
innerHTML: hs.replaceLang(hs.skin.contentWrapper)
});
},
getElementByClass : function (el, tagName, className) {
var els = el.getElementsByTagName(tagName);
for (var i = 0; i < els.length; i++) {
if ((new RegExp(className)).test(els[i].className)) {
return els[i];
}
}
return null;
},
replaceLang : function(s) {
s = s.replace(/\s/g, ' ');
var re = /{hs\.lang\.([^}]+)\}/g,
matches = s.match(re),
lang;
if (matches) for (var i = 0; i < matches.length; i++) {
lang = matches[i].replace(re, "$1");
if (typeof hs.lang[lang] != 'undefined') s = s.replace(matches[i], hs.lang[lang]);
}
return s;
},
getCacheBinding : function (a) {
for (var i = 0; i < hs.cacheBindings.length; i++) {
if (hs.cacheBindings[i][0] == a) {
var c = hs.cacheBindings[i][1];
hs.cacheBindings[i][1] = c.cloneNode(1);
return c;
}
}
return null;
},
preloadAjax : function (e) {
var arr = hs.getAnchors();
for (var i = 0; i < arr.htmls.length; i++) {
var a = arr.htmls[i];
if (hs.getParam(a, 'objectType') == 'ajax' && hs.getParam(a, 'cacheAjax'))
hs.push(hs.preloadTheseAjax, a);
}
hs.preloadAjaxElement(0);
},
preloadAjaxElement : function (i) {
if (!hs.preloadTheseAjax[i]) return;
var a = hs.preloadTheseAjax[i];
var cache = hs.getNode(hs.getParam(a, 'contentId'));
if (!cache) cache = hs.getSelfRendered();
var ajax = new hs.Ajax(a, cache, 1);
ajax.onError = function () { };
ajax.onLoad = function () {
hs.push(hs.cacheBindings, [a, cache]);
hs.preloadAjaxElement(i + 1);
};
ajax.run();
},
focusTopmost : function() {
var topZ = 0,
topmostKey = -1,
expanders = hs.expanders,
exp,
zIndex;
for (var i = 0; i < expanders.length; i++) {
exp = expanders[i];
if (exp) {
zIndex = exp.wrapper.style.zIndex;
if (zIndex && zIndex > topZ) {
topZ = zIndex;
topmostKey = i;
}
}
}
if (topmostKey == -1) hs.focusKey = -1;
else expanders[topmostKey].focus();
},
getParam : function (a, param) {
a.getParams = a.onclick;
var p = a.getParams ? a.getParams() : null;
a.getParams = null;
return (p && typeof p[param] != 'undefined') ? p[param] :
(typeof hs[param] != 'undefined' ? hs[param] : null);
},
getSrc : function (a) {
var src = hs.getParam(a, 'src');
if (src) return src;
return a.href;
},
getNode : function (id) {
var node = hs.$(id), clone = hs.clones[id], a = {};
if (!node && !clone) return null;
if (!clone) {
clone = node.cloneNode(true);
clone.id = '';
hs.clones[id] = clone;
return node;
} else {
return clone.cloneNode(true);
}
},
discardElement : function(d) {
if (d) hs.garbageBin.appendChild(d);
hs.garbageBin.innerHTML = '';
},
transit : function (adj, exp) {
var last = exp = exp || hs.getExpander();
if (hs.upcoming) return false;
else hs.last = last;
try {
hs.upcoming = adj;
adj.onclick();
} catch (e){
hs.last = hs.upcoming = null;
}
try {
exp.close();
} catch (e) {}
return false;
},
previousOrNext : function (el, op) {
var exp = hs.getExpander(el);
if (exp) return hs.transit(exp.getAdjacentAnchor(op), exp);
else return false;
},
previous : function (el) {
return hs.previousOrNext(el, -1);
},
next : function (el) {
return hs.previousOrNext(el, 1);
},
keyHandler : function(e) {
if (!e) e = window.event;
if (!e.target) e.target = e.srcElement; // ie
if (typeof e.target.form != 'undefined') return true; // form element has focus
var exp = hs.getExpander();
var op = null;
switch (e.keyCode) {
case 70: // f
if (exp) exp.doFullExpand();
return true;
case 32: // Space
case 34: // Page Down
case 39: // Arrow right
case 40: // Arrow down
op = 1;
break;
case 8: // Backspace
case 33: // Page Up
case 37: // Arrow left
case 38: // Arrow up
op = -1;
break;
case 27: // Escape
case 13: // Enter
op = 0;
}
if (op !== null) {hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
if (!hs.enableKeyListener) return true;
if (e.preventDefault) e.preventDefault();
else e.returnValue = false;
if (exp) {
if (op == 0) {
exp.close();
} else {
hs.previousOrNext(exp.key, op);
}
return false;
}
}
return true;
},
registerOverlay : function (overlay) {
hs.push(hs.overlays, hs.extend(overlay, { hsId: 'hsId'+ hs.idCounter++ } ));
},
getWrapperKey : function (element, expOnly) {
var el, re = /^highslide-wrapper-([0-9]+)$/;
// 1. look in open expanders
el = element;
while (el.parentNode) {
if (el.id && re.test(el.id)) return el.id.replace(re, "$1");
el = el.parentNode;
}
// 2. look in thumbnail
if (!expOnly) {
el = element;
while (el.parentNode) {
if (el.tagName && hs.isHsAnchor(el)) {
for (var key = 0; key < hs.expanders.length; key++) {
var exp = hs.expanders[key];
if (exp && exp.a == el) return key;
}
}
el = el.parentNode;
}
}
return null;
},
getExpander : function (el, expOnly) {
if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null;
if (typeof el == 'number') return hs.expanders[el] || null;
if (typeof el == 'string') el = hs.$(el);
return hs.expanders[hs.getWrapperKey(el, expOnly)] || null;
},
isHsAnchor : function (a) {
return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/));
},
reOrder : function () {
for (var i = 0; i < hs.expanders.length; i++)
if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost();
},
mouseClickHandler : function(e)
{
if (!e) e = window.event;
if (e.button > 1) return true;
if (!e.target) e.target = e.srcElement;
var el = e.target;
while (el.parentNode
&& !(/highslide-(image|move|html|resize)/.test(el.className)))
{
el = el.parentNode;
}
var exp = hs.getExpander(el);
if (exp && (exp.isClosing || !exp.isExpanded)) return true;
if (exp && e.type == 'mousedown') {
if (e.target.form) return true;
var match = el.className.match(/highslide-(image|move|resize)/);
if (match) {
hs.dragArgs = {
exp: exp ,
type: match[1],
left: exp.x.pos,
width: exp.x.size,
top: exp.y.pos,
height: exp.y.size,
clickX: e.clientX,
clickY: e.clientY
};
hs.addEventListener(document, 'mousemove', hs.dragHandler);
if (e.preventDefault) e.preventDefault(); // FF
if (/highslide-(image|html)-blur/.test(exp.content.className)) {
exp.focus();
hs.hasFocused = true;
}
return false;
}
else if (/highslide-html/.test(el.className) && hs.focusKey != exp.key) {
exp.focus();
exp.doShowHide('hidden');
}
} else if (e.type == 'mouseup') {
hs.removeEventListener(document, 'mousemove', hs.dragHandler);
if (hs.dragArgs) {
if (hs.styleRestoreCursor && hs.dragArgs.type == 'image')
hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor;
var hasDragged = hs.dragArgs.hasDragged;
if (!hasDragged &&!hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) {
exp.close();
}
else if (hasDragged || (!hasDragged && hs.hasHtmlExpanders)) {
hs.dragArgs.exp.doShowHide('hidden');
}
if (hs.dragArgs.exp.releaseMask)
hs.dragArgs.exp.releaseMask.style.display = 'none';
hs.hasFocused = false;
hs.dragArgs = null;
} else if (/highslide-image-blur/.test(el.className)) {
el.style.cursor = hs.styleRestoreCursor;
}
}
return false;
},
dragHandler : function(e)
{
if (!hs.dragArgs) return true;
if (!e) e = window.event;
var a = hs.dragArgs, exp = a.exp;
if (exp.iframe) {
if (!exp.releaseMask) exp.releaseMask = hs.createElement('div', null,
{ position: 'absolute', width: exp.x.size+'px', height: exp.y.size+'px',
left: exp.x.cb+'px', top: exp.y.cb+'px', zIndex: 4, background: (hs.ie ? 'white' : 'none'),
opacity: .01 },
exp.wrapper, true);
if (exp.releaseMask.style.display == 'none')
exp.releaseMask.style.display = '';
}
a.dX = e.clientX - a.clickX;
a.dY = e.clientY - a.clickY;
var distance = Math.sqrt(Math.pow(a.dX, 2) + Math.pow(a.dY, 2));
if (!a.hasDragged) a.hasDragged = (a.type != 'image' && distance > 0)
|| (distance > (hs.dragSensitivity || 5));
if (a.hasDragged && e.clientX > 5 && e.clientY > 5) {
if (a.type == 'resize') exp.resize(a);
else {
exp.moveTo(a.left + a.dX, a.top + a.dY);
if (a.type == 'image') exp.content.style.cursor = 'move';
}
}
return false;
},
wrapperMouseHandler : function (e) {
try {
if (!e) e = window.event;
var over = /mouseover/i.test(e.type);
if (!e.target) e.target = e.srcElement; // ie
if (hs.ie) e.relatedTarget =
over ? e.fromElement : e.toElement; // ie
var exp = hs.getExpander(e.target);
if (!exp.isExpanded) return;
if (!exp || !e.relatedTarget || hs.getExpander(e.relatedTarget, true) == exp
|| hs.dragArgs) return;
for (var i = 0; i < exp.overlays.length; i++) (function() {
var o = hs.$('hsId'+ exp.overlays[i]);
if (o && o.hideOnMouseOut) {
if (over) hs.setStyles(o, { visibility: 'visible', display: '' });
hs.animate(o, { opacity: over ? o.opacity : 0 }, o.dur);
}
})();
} catch (e) {}
},
addEventListener : function (el, event, func) {
if (el == document && event == 'ready') hs.push(hs.onReady, func);
try {
el.addEventListener(event, func, false);
} catch (e) {
try {
el.detachEvent('on'+ event, func);
el.attachEvent('on'+ event, func);
} catch (e) {
el['on'+ event] = func;
}
}
},
removeEventListener : function (el, event, func) {
try {
el.removeEventListener(event, func, false);
} catch (e) {
try {
el.detachEvent('on'+ event, func);
} catch (e) {
el['on'+ event] = null;
}
}
},
preloadFullImage : function (i) {
if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') {
var img = document.createElement('img');
img.onload = function() {
img = null;
hs.preloadFullImage(i + 1);
};
img.src = hs.preloadTheseImages[i];
}
},
preloadImages : function (number) {
if (number && typeof number != 'object') hs.numberOfImagesToPreload = number;
var arr = hs.getAnchors();
for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) {
hs.push(hs.preloadTheseImages, hs.getSrc(arr.images[i]));
}
// preload outlines
if (hs.outlineType) new hs.Outline(hs.outlineType, function () { hs.preloadFullImage(0)} );
else
hs.preloadFullImage(0);
// preload cursor
if (hs.restoreCursor) var cur = hs.createElement('img', { src: hs.graphicsDir + hs.restoreCursor });
},
init : function () {
if (!hs.container) {
hs.getPageSize();
hs.ieLt7 = hs.ie && hs.uaVersion < 7;
hs.ie6SSL = hs.ieLt7 && location.protocol == 'https:';
for (var x in hs.langDefaults) {
if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x];
else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined')
hs.lang[x] = hs.langDefaults[x];
}
hs.container = hs.createElement('div', {
className: 'highslide-container'
}, {
position: 'absolute',
left: 0,
top: 0,
width: '100%',
zIndex: hs.zIndexCounter,
direction: 'ltr'
},
document.body,
true
);
hs.loading = hs.createElement('a', {
className: 'highslide-loading',
title: hs.lang.loadingTitle,
innerHTML: hs.lang.loadingText,
href: 'javascript:;'
}, {
position: 'absolute',
top: '-9999px',
opacity: hs.loadingOpacity,
zIndex: 1
}, hs.container
);
hs.garbageBin = hs.createElement('div', null, { display: 'none' }, hs.container);
hs.clearing = hs.createElement('div', null,
{ clear: 'both', paddingTop: '1px' }, null, true);
// http://www.robertpenner.com/easing/
Math.linearTween = function (t, b, c, d) {
return c*t/d + b;
};
Math.easeInQuad = function (t, b, c, d) {
return c*(t/=d)*t + b;
};
hs.hideSelects = hs.ieLt7;
hs.hideIframes = ((window.opera && hs.uaVersion < 9) || navigator.vendor == 'KDE'
|| (hs.ie && hs.uaVersion < 5.5));
}
},
ready : function() {
if (hs.isReady) return;
hs.isReady = true;
for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i]();
},
updateAnchors : function() {
var el, els, all = [], images = [], htmls = [],groups = {}, re;
for (var i = 0; i < hs.openerTagNames.length; i++) {
els = document.getElementsByTagName(hs.openerTagNames[i]);
for (var j = 0; j < els.length; j++) {
el = els[j];
re = hs.isHsAnchor(el);
if (re) {
hs.push(all, el);
if (re[0] == 'hs.expand') hs.push(images, el);
else if (re[0] == 'hs.htmlExpand') hs.push(htmls, el);
var g = hs.getParam(el, 'slideshowGroup') || 'none';
if (!groups[g]) groups[g] = [];
hs.push(groups[g], el);
}
}
}
hs.anchors = { all: all, groups: groups, images: images, htmls: htmls };
return hs.anchors;
},
getAnchors : function() {
return hs.anchors || hs.updateAnchors();
},
close : function(el) {
var exp = hs.getExpander(el);
if (exp) exp.close();
return false;
}
}; // end hs object
hs.fx = function( elem, options, prop ){
this.options = options;
this.elem = elem;
this.prop = prop;
if (!options.orig) options.orig = {};
};
hs.fx.prototype = {
update: function(){
(hs.fx.step[this.prop] || hs.fx.step._default)(this);
if (this.options.step)
this.options.step.call(this.elem, this.now, this);
},
custom: function(from, to, unit){
this.startTime = (new Date()).getTime();
this.start = from;
this.end = to;
this.unit = unit;// || this.unit || "px";
this.now = this.start;
this.pos = this.state = 0;
var self = this;
function t(gotoEnd){
return self.step(gotoEnd);
}
t.elem = this.elem;
if ( t() && hs.timers.push(t) == 1 ) {
hs.timerId = setInterval(function(){
var timers = hs.timers;
for ( var i = 0; i < timers.length; i++ )
if ( !timers[i]() )
timers.splice(i--, 1);
if ( !timers.length ) {
clearInterval(hs.timerId);
}
}, 13);
}
},
step: function(gotoEnd){
var t = (new Date()).getTime();
if ( gotoEnd || t >= this.options.duration + this.startTime ) {
this.now = this.end;
this.pos = this.state = 1;
this.update();
this.options.curAnim[ this.prop ] = true;
var done = true;
for ( var i in this.options.curAnim )
if ( this.options.curAnim[i] !== true )
done = false;
if ( done ) {
if (this.options.complete) this.options.complete.call(this.elem);
}
return false;
} else {
var n = t - this.startTime;
this.state = n / this.options.duration;
this.pos = this.options.easing(n, 0, 1, this.options.duration);
this.now = this.start + ((this.end - this.start) * this.pos);
this.update();
}
return true;
}
};
hs.extend( hs.fx, {
step: {
opacity: function(fx){
hs.setStyles(fx.elem, { opacity: fx.now });
},
_default: function(fx){
try {
if ( fx.elem.style && fx.elem.style[ fx.prop ] != null )
fx.elem.style[ fx.prop ] = fx.now + fx.unit;
else
fx.elem[ fx.prop ] = fx.now;
} catch (e) {}
}
}
});
hs.Outline = function (outlineType, onLoad) {
this.onLoad = onLoad;
this.outlineType = outlineType;
var v = hs.uaVersion, tr;
this.hasAlphaImageLoader = hs.ie && v >= 5.5 && v < 7;
if (!outlineType) {
if (onLoad) onLoad();
return;
}
hs.init();
this.table = hs.createElement(
'table', {
cellSpacing: 0
}, {
visibility: 'hidden',
position: 'absolute',
borderCollapse: 'collapse',
width: 0
},
hs.container,
true
);
var tbody = hs.createElement('tbody', null, null, this.table, 1);
this.td = [];
for (var i = 0; i <= 8; i++) {
if (i % 3 == 0) tr = hs.createElement('tr', null, { height: 'auto' }, tbody, true);
this.td[i] = hs.createElement('td', null, null, tr, true);
var style = i != 4 ? { lineHeight: 0, fontSize: 0} : { position : 'relative' };
hs.setStyles(this.td[i], style);
}
this.td[4].className = outlineType +' highslide-outline';
this.preloadGraphic();
};
hs.Outline.prototype = {
preloadGraphic : function () {
var src = hs.graphicsDir + (hs.outlinesDir || "outlines/")+ this.outlineType +".png";
var appendTo = hs.safari ? hs.container : null;
this.graphic = hs.createElement('img', null, { position: 'absolute',
top: '-9999px' }, appendTo, true); // for onload trigger
var pThis = this;
this.graphic.onload = function() { pThis.onGraphicLoad(); };
this.graphic.src = src;
},
onGraphicLoad : function () {
var o = this.offset = this.graphic.width / 4,
pos = [[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],
dim = { height: (2*o) +'px', width: (2*o) +'px' };
for (var i = 0; i <= 8; i++) {
if (pos[i]) {
if (this.hasAlphaImageLoader) {
var w = (i == 1 || i == 7) ? '100%' : this.graphic.width +'px';
var div = hs.createElement('div', null, { width: '100%', height: '100%', position: 'relative', overflow: 'hidden'}, this.td[i], true);
hs.createElement ('div', null, {
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+ this.graphic.src + "')",
position: 'absolute',
width: w,
height: this.graphic.height +'px',
left: (pos[i][0]*o)+'px',
top: (pos[i][1]*o)+'px'
},
div,
true);
} else {
hs.setStyles(this.td[i], { background: 'url('+ this.graphic.src +') '+ (pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'});
}
if (window.opera && (i == 3 || i ==5))
hs.createElement('div', null, dim, this.td[i], true);
hs.setStyles (this.td[i], dim);
}
}
this.graphic = null;
if (hs.pendingOutlines[this.outlineType]) hs.pendingOutlines[this.outlineType].destroy();
hs.pendingOutlines[this.outlineType] = this;
if (this.onLoad) this.onLoad();
},
setPosition : function (pos, offset, vis, dur, easing) {
var exp = this.exp,
stl = exp.wrapper.style,
offset = offset || 0,
pos = pos || {
x: exp.x.pos + offset,
y: exp.y.pos + offset,
w: exp.x.get('wsize') - 2 * offset,
h: exp.y.get('wsize') - 2 * offset
};
if (vis) this.table.style.visibility = (pos.h >= 4 * this.offset)
? 'visible' : 'hidden';
hs.setStyles(this.table, {
left: (pos.x - this.offset) +'px',
top: (pos.y - this.offset) +'px',
width: (pos.w + 2 * this.offset) +'px'
});
pos.w -= 2 * this.offset;
pos.h -= 2 * this.offset;
hs.setStyles (this.td[4], {
width: pos.w >= 0 ? pos.w +'px' : 0,
height: pos.h >= 0 ? pos.h +'px' : 0
});
if (this.hasAlphaImageLoader) this.td[3].style.height
= this.td[5].style.height = this.td[4].style.height;
},
destroy : function(hide) {
if (hide) this.table.style.visibility = 'hidden';
else hs.discardElement(this.table);
}
};
hs.Dimension = function(exp, dim) {
this.exp = exp;
this.dim = dim;
this.ucwh = dim == 'x' ? 'Width' : 'Height';
this.wh = this.ucwh.toLowerCase();
this.uclt = dim == 'x' ? 'Left' : 'Top';
this.lt = this.uclt.toLowerCase();
this.ucrb = dim == 'x' ? 'Right' : 'Bottom';
this.rb = this.ucrb.toLowerCase();
this.p1 = this.p2 = 0;
};
hs.Dimension.prototype = {
get : function(key) {
switch (key) {
case 'loadingPos':
return this.tpos + this.tb + (this.t - hs.loading['offset'+ this.ucwh]) / 2;
case 'wsize':
return this.size + 2 * this.cb + this.p1 + this.p2;
case 'fitsize':
return this.clientSize - this.marginMin - this.marginMax;
case 'maxsize':
return this.get('fitsize') - 2 * this.cb - this.p1 - this.p2 ;
case 'opos':
return this.pos - (this.exp.outline ? this.exp.outline.offset : 0);
case 'osize':
return this.get('wsize') + (this.exp.outline ? 2*this.exp.outline.offset : 0);
case 'imgPad':
return this.imgSize ? Math.round((this.size - this.imgSize) / 2) : 0;
}
},
calcBorders: function() {
// correct for borders
this.cb = (this.exp.content['offset'+ this.ucwh] - this.t) / 2;
this.marginMax = hs['margin'+ this.ucrb];
},
calcThumb: function() {
this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) :
this.exp.el['offset'+ this.ucwh];
this.tpos = this.exp.tpos[this.dim];
this.tb = (this.exp.el['offset'+ this.ucwh] - this.t) / 2;
if (this.tpos == 0 || this.tpos == -1) {
this.tpos = (hs.page[this.wh] / 2) + hs.page['scroll'+ this.uclt];
};
},
calcExpanded: function() {
var exp = this.exp;
this.justify = 'auto';
// size and position
this.pos = this.tpos - this.cb + this.tb;
if (this.maxHeight && this.dim == 'x')
exp.maxWidth = Math.min(exp.maxWidth || this.full, exp.maxHeight * this.full / exp.y.full);
this.size = Math.min(this.full, exp['max'+ this.ucwh] || this.full);
this.minSize = exp.allowSizeReduction ?
Math.min(exp['min'+ this.ucwh], this.full) :this.full;
if (exp.isImage && exp.useBox) {
this.size = exp[this.wh];
this.imgSize = this.full;
}
if (this.dim == 'x' && hs.padToMinWidth) this.minSize = exp.minWidth;
this.marginMin = hs['margin'+ this.uclt];
this.scroll = hs.page['scroll'+ this.uclt];
this.clientSize = hs.page[this.wh];
},
setSize: function(i) {
var exp = this.exp;
if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
this.imgSize = i;
this.size = Math.max(this.size, this.imgSize);
exp.content.style[this.lt] = this.get('imgPad')+'px';
} else
this.size = i;
exp.content.style[this.wh] = i +'px';
exp.wrapper.style[this.wh] = this.get('wsize') +'px';
if (exp.outline) exp.outline.setPosition();
if (exp.releaseMask) exp.releaseMask.style[this.wh] = i +'px';
if (this.dim == 'y' && exp.iDoc && exp.body.style.height != 'auto') try {
exp.iDoc.body.style.overflow = 'auto';
} catch (e) {}
if (exp.isHtml) {
var d = exp.scrollerDiv;
if (this.sizeDiff === undefined)
this.sizeDiff = exp.innerContent['offset'+ this.ucwh] - d['offset'+ this.ucwh];
d.style[this.wh] = (this.size - this.sizeDiff) +'px';
if (this.dim == 'x') exp.mediumContent.style.width = 'auto';
if (exp.body) exp.body.style[this.wh] = 'auto';
}
if (this.dim == 'x' && exp.overlayBox) exp.sizeOverlayBox(true);
},
setPos: function(i) {
this.pos = i;
this.exp.wrapper.style[this.lt] = i +'px';
if (this.exp.outline) this.exp.outline.setPosition();
}
};
hs.Expander = function(a, params, custom, contentType) {
if (document.readyState && hs.ie && !hs.isReady) {
hs.addEventListener(document, 'ready', function() {
new hs.Expander(a, params, custom, contentType);
});
return;
}
this.a = a;
this.custom = custom;
this.contentType = contentType || 'image';
this.isHtml = (contentType == 'html');
this.isImage = !this.isHtml;
hs.continuePreloading = false;
this.overlays = [];
hs.init();
var key = this.key = hs.expanders.length;
// override inline parameters
for (var i = 0; i < hs.overrides.length; i++) {
var name = hs.overrides[i];
this[name] = params && typeof params[name] != 'undefined' ?
params[name] : hs[name];
}
if (!this.src) this.src = a.href;
// get thumb
var el = (params && params.thumbnailId) ? hs.$(params.thumbnailId) : a;
el = this.thumb = el.getElementsByTagName('img')[0] || el;
this.thumbsUserSetId = el.id || a.id;
// check if already open
for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && hs.expanders[i].a == a) {
hs.expanders[i].focus();
return false;
}
}
// cancel other
if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) {
hs.expanders[i].cancelLoading();
}
}
hs.expanders[key] = this;
if (!hs.allowMultipleInstances && !hs.upcoming) {
if (hs.expanders[key-1]) hs.expanders[key-1].close();
if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey])
hs.expanders[hs.focusKey].close();
}
// initiate metrics
this.el = el;
this.tpos = hs.getPosition(el);
hs.getPageSize();
var x = this.x = new hs.Dimension(this, 'x');
x.calcThumb();
var y = this.y = new hs.Dimension(this, 'y');
y.calcThumb();
this.wrapper = hs.createElement(
'div', {
id: 'highslide-wrapper-'+ this.key,
className: 'highslide-wrapper '+ this.wrapperClassName
}, {
visibility: 'hidden',
position: 'absolute',
zIndex: hs.zIndexCounter += 2
}, null, true );
this.wrapper.onmouseover = this.wrapper.onmouseout = hs.wrapperMouseHandler;
if (this.contentType == 'image' && this.outlineWhileAnimating == 2)
this.outlineWhileAnimating = 0;
// get the outline
if (!this.outlineType) {
this[this.contentType +'Create']();
} else if (hs.pendingOutlines[this.outlineType]) {
this.connectOutline();
this[this.contentType +'Create']();
} else {
this.showLoading();
var exp = this;
new hs.Outline(this.outlineType,
function () {
exp.connectOutline();
exp[exp.contentType +'Create']();
}
);
}
return true;
};
hs.Expander.prototype = {
error : function(e) {
// alert ('Line '+ e.lineNumber +': '+ e.message);
window.location.href = this.src;
},
connectOutline : function() {
var outline = this.outline = hs.pendingOutlines[this.outlineType];
outline.exp = this;
outline.table.style.zIndex = this.wrapper.style.zIndex - 1;
hs.pendingOutlines[this.outlineType] = null;
},
showLoading : function() {
if (this.onLoadStarted || this.loading) return;
this.loading = hs.loading;
var exp = this;
this.loading.onclick = function() {
exp.cancelLoading();
};
var exp = this,
l = this.x.get('loadingPos') +'px',
t = this.y.get('loadingPos') +'px';
setTimeout(function () {
if (exp.loading) hs.setStyles(exp.loading, { left: l, top: t, zIndex: hs.zIndexCounter++ })}
, 100);
},
imageCreate : function() {
var exp = this;
var img = document.createElement('img');
this.content = img;
img.onload = function () {
if (hs.expanders[exp.key]) exp.contentLoaded();
};
if (hs.blockRightClick) img.oncontextmenu = function() { return false; };
img.className = 'highslide-image';
hs.setStyles(img, {
visibility: 'hidden',
display: 'block',
position: 'absolute',
maxWidth: '9999px',
zIndex: 3
});
img.title = hs.lang.restoreTitle;
if (hs.safari) hs.container.appendChild(img);
if (hs.ie && hs.flushImgSize) img.src = null;
img.src = this.src;
this.showLoading();
},
htmlCreate : function () {
this.content = hs.getCacheBinding(this.a);
if (!this.content)
this.content = hs.getNode(this.contentId);
if (!this.content)
this.content = hs.getSelfRendered();
this.getInline(['maincontent']);
if (this.maincontent) {
var body = hs.getElementByClass(this.content, 'div', 'highslide-body');
if (body) body.appendChild(this.maincontent);
this.maincontent.style.display = 'block';
}
var innerContent = this.innerContent = this.content;
if (/(swf|iframe)/.test(this.objectType)) this.setObjContainerSize(innerContent);
// the content tree
hs.container.appendChild(this.wrapper);
hs.setStyles( this.wrapper, {
position: 'static',
padding: '0 '+ hs.marginRight +'px 0 '+ hs.marginLeft +'px'
});
this.content = hs.createElement(
'div', {
className: 'highslide-html'
}, {
position: 'relative',
zIndex: 3,
overflow: 'hidden'
},
this.wrapper
);
this.mediumContent = hs.createElement('div', null, null, this.content, 1);
this.mediumContent.appendChild(innerContent);
hs.setStyles (innerContent, {
position: 'relative',
display: 'block',
direction: hs.lang.cssDirection || ''
});
if (this.width) innerContent.style.width = this.width +'px';
if (this.height) hs.setStyles(innerContent, {
height: this.height +'px',
overflow: 'hidden'
});
if (innerContent.offsetWidth < this.minWidth)
innerContent.style.width = this.minWidth +'px';
if (this.objectType == 'ajax' && !hs.getCacheBinding(this.a)) {
this.showLoading();
var exp = this;
var ajax = new hs.Ajax(this.a, innerContent);
ajax.src = this.src;
ajax.onLoad = function () { if (hs.expanders[exp.key]) exp.contentLoaded(); };
ajax.onError = function () { location.href = exp.src; };
ajax.run();
}
else
if (this.objectType == 'iframe' && this.objectLoadTime == 'before') {
this.writeExtendedContent();
}
else
this.contentLoaded();
},
contentLoaded : function() {
try {
if (!this.content) return;
this.content.onload = null;
if (this.onLoadStarted) return;
else this.onLoadStarted = true;
var x = this.x, y = this.y;
if (this.loading) {
hs.setStyles(this.loading, { top: '-9999px' });
this.loading = null;
}
if (this.isImage) {
x.full = this.content.width;
y.full = this.content.height;
hs.setStyles(this.content, {
width: x.t +'px',
height: y.t +'px'
});
this.wrapper.appendChild(this.content);
hs.container.appendChild(this.wrapper);
} else if (this.htmlGetSize) this.htmlGetSize();
x.calcBorders();
y.calcBorders();
hs.setStyles (this.wrapper, {
left: (x.tpos + x.tb - x.cb) +'px',
top: (y.tpos + x.tb - y.cb) +'px'
});
this.getOverlays();
var ratio = x.full / y.full;
x.calcExpanded();
this.justify(x);
y.calcExpanded();
this.justify(y);
if (this.isHtml) this.htmlSizeOperations();
if (this.overlayBox) this.sizeOverlayBox(0, 1);
if (this.allowSizeReduction) {
if (this.isImage)
this.correctRatio(ratio);
else this.fitOverlayBox();
if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
this.createFullExpand();
if (this.overlays.length == 1) this.sizeOverlayBox();
}
}
this.show();
} catch (e) {
this.error(e);
}
},
setObjContainerSize : function(parent, auto) {
var c = hs.getElementByClass(parent, 'DIV', 'highslide-body');
if (/(iframe|swf)/.test(this.objectType)) {
if (this.objectWidth) c.style.width = this.objectWidth +'px';
if (this.objectHeight) c.style.height = this.objectHeight +'px';
}
},
writeExtendedContent : function () {
if (this.hasExtendedContent) return;
var exp = this;
this.body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body');
if (this.objectType == 'iframe') {
this.showLoading();
var ruler = hs.clearing.cloneNode(1);
this.body.appendChild(ruler);
this.newWidth = this.innerContent.offsetWidth;
if (!this.objectWidth) this.objectWidth = ruler.offsetWidth;
var hDiff = this.innerContent.offsetHeight - this.body.offsetHeight,
h = this.objectHeight || hs.page.height - hDiff - hs.marginTop - hs.marginBottom,
onload = this.objectLoadTime == 'before' ?
' onload="if (hs.expanders['+ this.key +']) hs.expanders['+ this.key +'].contentLoaded()" ' : '';
this.body.innerHTML += '<iframe name="hs'+ (new Date()).getTime() +'" frameborder="0" key="'+ this.key +'" '
+' style="width:'+ this.objectWidth +'px; height:'+ h +'px" '
+ onload +' src="'+ this.src +'" ></iframe>';
this.ruler = this.body.getElementsByTagName('div')[0];
this.iframe = this.body.getElementsByTagName('iframe')[0];
if (this.objectLoadTime == 'after') this.correctIframeSize();
}
if (this.objectType == 'swf') {
this.body.id = this.body.id || 'hs-flash-id-' + this.key;
var a = this.swfOptions;
if (!a.params) a.params = {};
if (typeof a.params.wmode == 'undefined') a.params.wmode = 'transparent';
if (swfobject) swfobject.embedSWF(this.src, this.body.id, this.objectWidth, this.objectHeight,
a.version || '7', a.expressInstallSwfurl, a.flashvars, a.params, a.attributes);
}
this.hasExtendedContent = true;
},
htmlGetSize : function() {
if (this.iframe && !this.objectHeight) { // loadtime before
this.iframe.style.height = this.body.style.height = this.getIframePageHeight() +'px';
}
this.innerContent.appendChild(hs.clearing);
if (!this.x.full) this.x.full = this.innerContent.offsetWidth;
this.y.full = this.innerContent.offsetHeight;
this.innerContent.removeChild(hs.clearing);
if (hs.ie && this.newHeight > parseInt(this.innerContent.currentStyle.height)) { // ie css bug
this.newHeight = parseInt(this.innerContent.currentStyle.height);
}
hs.setStyles( this.wrapper, { position: 'absolute', padding: '0'});
hs.setStyles( this.content, { width: this.x.t +'px', height: this.y.t +'px'});
},
getIframePageHeight : function() {
var h;
try {
var doc = this.iDoc = this.iframe.contentDocument || this.iframe.contentWindow.document;
var clearing = doc.createElement('div');
clearing.style.clear = 'both';
doc.body.appendChild(clearing);
h = clearing.offsetTop;
if (hs.ie) h += parseInt(doc.body.currentStyle.marginTop)
+ parseInt(doc.body.currentStyle.marginBottom) - 1;
} catch (e) { // other domain
h = 300;
}
return h;
},
correctIframeSize : function () {
var wDiff = this.innerContent.offsetWidth - this.ruler.offsetWidth;
hs.discardElement(this.ruler);
if (wDiff < 0) wDiff = 0;
var hDiff = this.innerContent.offsetHeight - this.iframe.offsetHeight;
if (this.iDoc && !this.objectHeight && !this.height && this.y.size == this.y.full) try {
this.iDoc.body.style.overflow = 'hidden';
} catch (e) {}
hs.setStyles(this.iframe, {
width: Math.abs(this.x.size - wDiff) +'px',
height: Math.abs(this.y.size - hDiff) +'px'
});
hs.setStyles(this.body, {
width: this.iframe.style.width,
height: this.iframe.style.height
});
this.scrollingContent = this.iframe;
this.scrollerDiv = this.scrollingContent;
},
htmlSizeOperations : function () {
this.setObjContainerSize(this.innerContent);
if (this.objectType == 'swf' && this.objectLoadTime == 'before') this.writeExtendedContent();
// handle minimum size
if (this.x.size < this.x.full && !this.allowWidthReduction) this.x.size = this.x.full;
if (this.y.size < this.y.full && !this.allowHeightReduction) this.y.size = this.y.full;
this.scrollerDiv = this.innerContent;
hs.setStyles(this.mediumContent, {
position: 'relative',
width: this.x.size +'px'
});
hs.setStyles(this.innerContent, {
border: 'none',
width: 'auto',
height: 'auto'
});
var node = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body');
if (node && !/(iframe|swf)/.test(this.objectType)) {
var cNode = node; // wrap to get true size
node = hs.createElement(cNode.nodeName, null, {overflow: 'hidden'}, null, true);
cNode.parentNode.insertBefore(node, cNode);
node.appendChild(hs.clearing); // IE6
node.appendChild(cNode);
var wDiff = this.innerContent.offsetWidth - node.offsetWidth;
var hDiff = this.innerContent.offsetHeight - node.offsetHeight;
node.removeChild(hs.clearing);
var kdeBugCorr = hs.safari || navigator.vendor == 'KDE' ? 1 : 0; // KDE repainting bug
hs.setStyles(node, {
width: (this.x.size - wDiff - kdeBugCorr) +'px',
height: (this.y.size - hDiff) +'px',
overflow: 'auto',
position: 'relative'
}
);
if (kdeBugCorr && cNode.offsetHeight > node.offsetHeight) {
node.style.width = (parseInt(node.style.width) + kdeBugCorr) + 'px';
}
this.scrollingContent = node;
this.scrollerDiv = this.scrollingContent;
}
if (this.iframe && this.objectLoadTime == 'before') this.correctIframeSize();
if (!this.scrollingContent && this.y.size < this.mediumContent.offsetHeight) this.scrollerDiv = this.content;
if (this.scrollerDiv == this.content && !this.allowWidthReduction && !/(iframe|swf)/.test(this.objectType)) {
this.x.size += 17; // room for scrollbars
}
if (this.scrollerDiv && this.scrollerDiv.offsetHeight > this.scrollerDiv.parentNode.offsetHeight) {
setTimeout("try { hs.expanders["+ this.key +"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}",
hs.expandDuration);
}
},
justify : function (p, moveOnly) {
var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
var hasMovedMin = false;
var allowReduce = p.exp.allowSizeReduction;
p.pos = Math.round(p.pos - ((p.get('wsize') - p.t) / 2));
if (p.pos < p.scroll + p.marginMin) {
p.pos = p.scroll + p.marginMin;
hasMovedMin = true;
}
if (!moveOnly && p.size < p.minSize) {
p.size = p.minSize;
allowReduce = false;
}
if (p.pos + p.get('wsize') > p.scroll + p.clientSize - p.marginMax) {
if (!moveOnly && hasMovedMin && allowReduce) {
p.size = Math.min(p.size, p.get(dim == 'y' ? 'fitsize' : 'maxsize'));
} else if (p.get('wsize') < p.get('fitsize')) {
p.pos = p.scroll + p.clientSize - p.marginMax - p.get('wsize');
} else { // image larger than viewport
p.pos = p.scroll + p.marginMin;
if (!moveOnly && allowReduce) p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize');
}
}
if (!moveOnly && p.size < p.minSize) {
p.size = p.minSize;
allowReduce = false;
}
if (p.pos < p.marginMin) {
var tmpMin = p.pos;
p.pos = p.marginMin;
if (allowReduce && !moveOnly) p.size = p.size - (p.pos - tmpMin);
}
},
correctRatio : function(ratio) {
var x = this.x,
y = this.y,
changed = false,
xSize = Math.min(x.full, x.size),
ySize = Math.min(y.full, y.size),
useBox = (this.useBox || hs.padToMinWidth);
if (xSize / ySize > ratio) { // width greater
xSize = ySize * ratio;
if (xSize < x.minSize) { // below minWidth
xSize = x.minSize;
ySize = xSize / ratio;
}
changed = true;
} else if (xSize / ySize < ratio) { // height greater
ySize = xSize / ratio;
changed = true;
}
if (hs.padToMinWidth && x.full < x.minSize) {
x.imgSize = x.full;
y.size = y.imgSize = y.full;
} else if (this.useBox) {
x.imgSize = xSize;
y.imgSize = ySize;
} else {
x.size = xSize;
y.size = ySize;
}
changed = this.fitOverlayBox(useBox ? null : ratio, changed);
if (useBox && y.size < y.imgSize) {
y.imgSize = y.size;
x.imgSize = y.size * ratio;
}
if (changed || useBox) {
x.pos = x.tpos - x.cb + x.tb;
x.minSize = x.size;
this.justify(x, true);
y.pos = y.tpos - y.cb + y.tb;
y.minSize = y.size;
this.justify(y, true);
if (this.overlayBox) this.sizeOverlayBox();
}
},
fitOverlayBox : function(ratio, changed) {
var x = this.x, y = this.y;
if (this.overlayBox && (this.isImage || this.allowHeightReduction)) {
while (y.size > this.minHeight && x.size > this.minWidth
&& y.get('wsize') > y.get('fitsize')) {
y.size -= 10;
if (ratio) x.size = y.size * ratio;
this.sizeOverlayBox(0, 1);
changed = true;
}
}
return changed;
},
show : function () {
var x = this.x, y = this.y;
this.doShowHide('hidden');
// Apply size change
this.changeSize(
1, {
wrapper: {
width : x.get('wsize'),
height : y.get('wsize'),
left: x.pos,
top: y.pos
},
content: {
left: x.p1 + x.get('imgPad'),
top: y.p1 + y.get('imgPad'),
width:x.imgSize ||x.size,
height:y.imgSize ||y.size
}
},
hs.expandDuration
);
},
changeSize : function(up, to, dur) {
if (this.outline && !this.outlineWhileAnimating) {
if (up) this.outline.setPosition();
else this.outline.destroy(
(this.isHtml && this.preserveContent));
}
if (!up) this.destroyOverlays();
var exp = this,
x = exp.x,
y = exp.y,
easing = this.easing;
if (!up) easing = this.easingClose || easing;
var after = up ?
function() {
if (exp.outline) exp.outline.table.style.visibility = "visible";
setTimeout(function() {
exp.afterExpand();
}, 50);
} :
function() {
exp.afterClose();
};
if (up) hs.setStyles( this.wrapper, {
width: x.t +'px',
height: y.t +'px'
});
if (up && this.isHtml) {
hs.setStyles(this.wrapper, {
left: (x.tpos - x.cb + x.tb) +'px',
top: (y.tpos - y.cb + y.tb) +'px'
});
}
if (this.fadeInOut) {
hs.setStyles(this.wrapper, { opacity: up ? 0 : 1 });
hs.extend(to.wrapper, { opacity: up });
}
hs.animate( this.wrapper, to.wrapper, {
duration: dur,
easing: easing,
step: function(val, args) {
if (exp.outline && exp.outlineWhileAnimating && args.prop == 'top') {
var fac = up ? args.pos : 1 - args.pos;
var pos = {
w: x.t + (x.get('wsize') - x.t) * fac,
h: y.t + (y.get('wsize') - y.t) * fac,
x: x.tpos + (x.pos - x.tpos) * fac,
y: y.tpos + (y.pos - y.tpos) * fac
};
exp.outline.setPosition(pos, 0, 1);
}
if (exp.isHtml) {
if (args.prop == 'left')
exp.mediumContent.style.left = (x.pos - val) +'px';
if (args.prop == 'top')
exp.mediumContent.style.top = (y.pos - val) +'px';
}
}
});
hs.animate( this.content, to.content, dur, easing, after);
if (up) {
this.wrapper.style.visibility = 'visible';
this.content.style.visibility = 'visible';
if (this.isHtml) this.innerContent.style.visibility = 'visible';
this.a.className += ' highslide-active-anchor';
}
},
afterExpand : function() {
this.isExpanded = true;
this.focus();
if (this.isHtml && this.objectLoadTime == 'after') this.writeExtendedContent();
if (this.iframe) {
try {
var exp = this,
doc = this.iframe.contentDocument || this.iframe.contentWindow.document;
hs.addEventListener(doc, 'mousedown', function () {
if (hs.focusKey != exp.key) exp.focus();
});
} catch(e) {}
if (hs.ie && typeof this.isClosing != 'boolean') // first open
this.iframe.style.width = (this.objectWidth - 1) +'px'; // hasLayout
}
if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null;
this.prepareNextOutline();
var p = hs.page, mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop;
this.mouseIsOver = this.x.pos < mX && mX < this.x.pos + this.x.get('wsize')
&& this.y.pos < mY && mY < this.y.pos + this.y.get('wsize');
if (this.overlayBox) this.showOverlays();
},
prepareNextOutline : function() {
var key = this.key;
var outlineType = this.outlineType;
new hs.Outline(outlineType,
function () { try { hs.expanders[key].preloadNext(); } catch (e) {} });
},
preloadNext : function() {
var next = this.getAdjacentAnchor(1);
if (next && next.onclick.toString().match(/hs\.expand/))
var img = hs.createElement('img', { src: hs.getSrc(next) });
},
getAdjacentAnchor : function(op) {
var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none'];
/*< ? if ($cfg->slideshow) : ?>s*/
if (!as[current + op] && this.slideshow && this.slideshow.repeat) {
if (op == 1) return as[0];
else if (op == -1) return as[as.length-1];
}
/*< ? endif ?>s*/
return as[current + op] || null;
},
getAnchorIndex : function() {
var arr = hs.getAnchors().groups[this.slideshowGroup || 'none'];
if (arr) for (var i = 0; i < arr.length; i++) {
if (arr[i] == this.a) return i;
}
return null;
},
cancelLoading : function() {
hs.discardElement (this.wrapper);
hs.expanders[this.key] = null;
if (this.loading) hs.loading.style.left = '-9999px';
},
writeCredits : function () {
this.credits = hs.createElement('a', {
href: hs.creditsHref,
target: hs.creditsTarget,
className: 'highslide-credits',
innerHTML: hs.lang.creditsText,
title: hs.lang.creditsTitle
});
this.createOverlay({
overlayId: this.credits,
position: this.creditsPosition || 'top left'
});
},
getInline : function(types, addOverlay) {
for (var i = 0; i < types.length; i++) {
var type = types[i], s = null;
if (!this[type +'Id'] && this.thumbsUserSetId)
this[type +'Id'] = type +'-for-'+ this.thumbsUserSetId;
if (this[type +'Id']) this[type] = hs.getNode(this[type +'Id']);
if (!this[type] && !this[type +'Text'] && this[type +'Eval']) try {
s = eval(this[type +'Eval']);
} catch (e) {}
if (!this[type] && this[type +'Text']) {
s = this[type +'Text'];
}
if (!this[type] && !s) {
this[type] = hs.getNode(this.a['_'+ type + 'Id']);
if (!this[type]) {
var next = this.a.nextSibling;
while (next && !hs.isHsAnchor(next)) {
if ((new RegExp('highslide-'+ type)).test(next.className || null)) {
if (!next.id) this.a['_'+ type + 'Id'] = next.id = 'hsId'+ hs.idCounter++;
this[type] = hs.getNode(next.id);
break;
}
next = next.nextSibling;
}
}
}
if (!this[type] && s) this[type] = hs.createElement('div',
{ className: 'highslide-'+ type, innerHTML: s } );
if (addOverlay && this[type]) {
var o = { position: (type == 'heading') ? 'above' : 'below' };
for (var x in this[type+'Overlay']) o[x] = this[type+'Overlay'][x];
o.overlayId = this[type];
this.createOverlay(o);
}
}
},
// on end move and resize
doShowHide : function(visibility) {
if (hs.hideSelects) this.showHideElements('SELECT', visibility);
if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
if (hs.geckoMac) this.showHideElements('*', visibility);
},
showHideElements : function (tagName, visibility) {
var els = document.getElementsByTagName(tagName);
var prop = tagName == '*' ? 'overflow' : 'visibility';
for (var i = 0; i < els.length; i++) {
if (prop == 'visibility' || (document.defaultView.getComputedStyle(
els[i], "").getPropertyValue('overflow') == 'auto'
|| els[i].getAttribute('hidden-by') != null)) {
var hiddenBy = els[i].getAttribute('hidden-by');
if (visibility == 'visible' && hiddenBy) {
hiddenBy = hiddenBy.replace('['+ this.key +']', '');
els[i].setAttribute('hidden-by', hiddenBy);
if (!hiddenBy) els[i].style[prop] = els[i].origProp;
} else if (visibility == 'hidden') { // hide if behind
var elPos = hs.getPosition(els[i]);
elPos.w = els[i].offsetWidth;
elPos.h = els[i].offsetHeight;
var clearsX = (elPos.x + elPos.w < this.x.get('opos')
|| elPos.x > this.x.get('opos') + this.x.get('osize'));
var clearsY = (elPos.y + elPos.h < this.y.get('opos')
|| elPos.y > this.y.get('opos') + this.y.get('osize'));
var wrapperKey = hs.getWrapperKey(els[i]);
if (!clearsX && !clearsY && wrapperKey != this.key) { // element falls behind image
if (!hiddenBy) {
els[i].setAttribute('hidden-by', '['+ this.key +']');
els[i].origProp = els[i].style[prop];
els[i].style[prop] = 'hidden';
} else if (hiddenBy.indexOf('['+ this.key +']') == -1) {
els[i].setAttribute('hidden-by', hiddenBy + '['+ this.key +']');
}
} else if ((hiddenBy == '['+ this.key +']' || hs.focusKey == wrapperKey)
&& wrapperKey != this.key) { // on move
els[i].setAttribute('hidden-by', '');
els[i].style[prop] = els[i].origProp || '';
} else if (hiddenBy && hiddenBy.indexOf('['+ this.key +']') > -1) {
els[i].setAttribute('hidden-by', hiddenBy.replace('['+ this.key +']', ''));
}
}
}
}
},
focus : function() {
this.wrapper.style.zIndex = hs.zIndexCounter += 2;
// blur others
for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && i == hs.focusKey) {
var blurExp = hs.expanders[i];
blurExp.content.className += ' highslide-'+ blurExp.contentType +'-blur';
if (blurExp.isImage) {
blurExp.content.style.cursor = hs.ie ? 'hand' : 'pointer';
blurExp.content.title = hs.lang.focusTitle;
}
}
}
// focus this
if (this.outline) this.outline.table.style.zIndex
= this.wrapper.style.zIndex - 1;
this.content.className = 'highslide-'+ this.contentType;
if (this.isImage) {
this.content.title = hs.lang.restoreTitle;
if (hs.restoreCursor) {
hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ hs.graphicsDir + hs.restoreCursor +'), pointer';
if (hs.ie && hs.uaVersion < 6) hs.styleRestoreCursor = 'hand';
this.content.style.cursor = hs.styleRestoreCursor;
}
}
hs.focusKey = this.key;
hs.addEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
},
moveTo: function(x, y) {
this.x.setPos(x);
this.y.setPos(y);
},
resize : function (e) {
var w, h, r = e.width / e.height;
w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full));
if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full;
h = this.isHtml ? e.height + e.dY : w / r;
if (h < Math.min(this.minHeight, this.y.full)) {
h = Math.min(this.minHeight, this.y.full);
if (this.isImage) w = h * r;
}
this.resizeTo(w, h);
},
resizeTo: function(w, h) {
this.y.setSize(h);
this.x.setSize(w);
this.wrapper.style.height = this.y.get('wsize') +'px';
},
close : function() {
if (this.isClosing || !this.isExpanded) return;
this.isClosing = true;
hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
try {
if (this.isHtml) this.htmlPrepareClose();
this.content.style.cursor = 'default';
this.changeSize(
0, {
wrapper: {
width : this.x.t,
height : this.y.t,
left: this.x.tpos - this.x.cb + this.x.tb,
top: this.y.tpos - this.y.cb + this.y.tb
},
content: {
left: 0,
top: 0,
width: this.x.t,
height: this.y.t
}
}, hs.restoreDuration
);
} catch (e) { this.afterClose(); }
},
htmlPrepareClose : function() {
if (hs.geckoMac) { // bad redraws
if (!hs.mask) hs.mask = hs.createElement('div', null,
{ position: 'absolute' }, hs.container);
hs.setStyles(hs.mask, { width: this.x.size +'px', height: this.y.size +'px',
left: this.x.pos +'px', top: this.y.pos +'px', display: 'block' });
}
if (this.objectType == 'swf') try { hs.$(this.body.id).StopPlay(); } catch (e) {}
if (this.objectLoadTime == 'after' && !this.preserveContent) this.destroyObject();
if (this.scrollerDiv && this.scrollerDiv != this.scrollingContent)
this.scrollerDiv.style.overflow = 'hidden';
},
destroyObject : function () {
if (hs.ie && this.iframe)
try { this.iframe.contentWindow.document.body.innerHTML = ''; } catch (e) {}
if (this.objectType == 'swf') swfobject.removeSWF(this.body.id);
this.body.innerHTML = '';
},
sleep : function() {
if (this.outline) this.outline.table.style.display = 'none';
this.releaseMask = null;
this.wrapper.style.display = 'none';
hs.push(hs.sleeping, this);
},
awake : function() {try {
hs.expanders[this.key] = this;
if (!hs.allowMultipleInstances &&hs.focusKey != this.key) {
try { hs.expanders[hs.focusKey].close(); } catch (e){}
}
var z = hs.zIndexCounter++, stl = { display: '', zIndex: z };
hs.setStyles (this.wrapper, stl);
this.isClosing = false;
var o = this.outline || 0;
if (o) {
if (!this.outlineWhileAnimating) stl.visibility = 'hidden';
hs.setStyles (o.table, stl);
}
this.show();
} catch (e) {}
},
createOverlay : function (o) {
var el = o.overlayId;
if (typeof el == 'string') el = hs.getNode(el);
if (o.html) el = hs.createElement('div', { innerHTML: o.html });
if (!el || typeof el == 'string') return;
el.style.display = 'block';
this.genOverlayBox();
var width = o.width && /^[0-9]+(px|%)$/.test(o.width) ? o.width : 'auto';
if (/^(left|right)panel$/.test(o.position) && !/^[0-9]+px$/.test(o.width)) width = '200px';
var overlay = hs.createElement(
'div', {
id: 'hsId'+ hs.idCounter++,
hsId: o.hsId
}, {
position: 'absolute',
visibility: 'hidden',
width: width,
direction: hs.lang.cssDirection || '',
opacity: 0
},this.overlayBox,
true
);
overlay.appendChild(el);
hs.extend(overlay, {
opacity: 1,
offsetX: 0,
offsetY: 0,
dur: (o.fade === 0 || o.fade === false || (o.fade == 2 && hs.ie)) ? 0 : 250
});
hs.extend(overlay, o);
if (this.gotOverlays) {
this.positionOverlay(overlay);
if (!overlay.hideOnMouseOut || this.mouseIsOver)
hs.animate(overlay, { opacity: overlay.opacity }, overlay.dur);
}
hs.push(this.overlays, hs.idCounter - 1);
},
positionOverlay : function(overlay) {
var p = overlay.position || 'middle center',
offX = overlay.offsetX,
offY = overlay.offsetY;
if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
if (/left$/.test(p)) overlay.style.left = offX +'px';
if (/center$/.test(p)) hs.setStyles (overlay, {
left: '50%',
marginLeft: (offX - Math.round(overlay.offsetWidth / 2)) +'px'
});
if (/right$/.test(p)) overlay.style.right = - offX +'px';
if (/^leftpanel$/.test(p)) {
hs.setStyles(overlay, {
right: '100%',
marginRight: this.x.cb +'px',
top: - this.y.cb +'px',
bottom: - this.y.cb +'px',
overflow: 'auto'
});
this.x.p1 = overlay.offsetWidth;
} else if (/^rightpanel$/.test(p)) {
hs.setStyles(overlay, {
left: '100%',
marginLeft: this.x.cb +'px',
top: - this.y.cb +'px',
bottom: - this.y.cb +'px',
overflow: 'auto'
});
this.x.p2 = overlay.offsetWidth;
}
if (/^top/.test(p)) overlay.style.top = offY +'px';
if (/^middle/.test(p)) hs.setStyles (overlay, {
top: '50%',
marginTop: (offY - Math.round(overlay.offsetHeight / 2)) +'px'
});
if (/^bottom/.test(p)) overlay.style.bottom = - offY +'px';
if (/^above$/.test(p)) {
hs.setStyles(overlay, {
left: (- this.x.p1 - this.x.cb) +'px',
right: (- this.x.p2 - this.x.cb) +'px',
bottom: '100%',
marginBottom: this.y.cb +'px',
width: 'auto'
});
this.y.p1 = overlay.offsetHeight;
} else if (/^below$/.test(p)) {
hs.setStyles(overlay, {
position: 'relative',
left: (- this.x.p1 - this.x.cb) +'px',
right: (- this.x.p2 - this.x.cb) +'px',
top: '100%',
marginTop: this.y.cb +'px',
width: 'auto'
});
this.y.p2 = overlay.offsetHeight;
overlay.style.position = 'absolute';
}
},
getOverlays : function() {
this.getInline(['heading', 'caption'], true);
if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move';
if (hs.showCredits) this.writeCredits();
for (var i = 0; i < hs.overlays.length; i++) {
var o = hs.overlays[i], tId = o.thumbnailId, sg = o.slideshowGroup;
if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
|| (sg && sg === this.slideshowGroup)) {
if (this.isImage || (this.isHtml && o.useOnHtml))
this.createOverlay(o);
}
}
var os = [];
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
if (/panel$/.test(o.position)) this.positionOverlay(o);
else hs.push(os, o);
}
for (var i = 0; i < os.length; i++) this.positionOverlay(os[i]);
this.gotOverlays = true;
},
genOverlayBox : function() {
if (!this.overlayBox) this.overlayBox = hs.createElement (
'div', {
className: this.wrapperClassName
}, {
position : 'absolute',
width: (this.x.size || (this.useBox ? this.width : null)
|| this.x.full) +'px',
height: (this.y.size || this.y.full) +'px',
visibility : 'hidden',
overflow : 'hidden',
zIndex : hs.ie ? 4 : 'auto'
},
hs.container,
true
);
},
sizeOverlayBox : function(doWrapper, doPanels) {
var overlayBox = this.overlayBox,
x = this.x,
y = this.y;
hs.setStyles( overlayBox, {
width: x.size +'px',
height: y.size +'px'
});
if (doWrapper || doPanels) {
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
var ie6 = (hs.ieLt7 || document.compatMode == 'BackCompat');
if (o && /^(above|below)$/.test(o.position)) {
if (ie6) {
o.style.width = (overlayBox.offsetWidth + 2 * x.cb
+ x.p1 + x.p2) +'px';
}
y[o.position == 'above' ? 'p1' : 'p2'] = o.offsetHeight;
}
if (o && ie6 && /^(left|right)panel$/.test(o.position)) {
o.style.height = (overlayBox.offsetHeight + 2* y.cb) +'px';
}
}
}
if (doWrapper) {
hs.setStyles(this.content, {
top: y.p1 +'px'
});
hs.setStyles(overlayBox, {
top: (y.p1 + y.cb) +'px'
});
}
},
showOverlays : function() {
var b = this.overlayBox;
b.className = '';
hs.setStyles(b, {
top: (this.y.p1 + this.y.cb) +'px',
left: (this.x.p1 + this.x.cb) +'px',
overflow : 'visible'
});
if (hs.safari) b.style.visibility = 'visible';
this.wrapper.appendChild (b);
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
o.style.zIndex = 4;
if (!o.hideOnMouseOut || this.mouseIsOver) {
o.style.visibility = 'visible';
hs.setStyles(o, { visibility: 'visible', display: '' });
hs.animate(o, { opacity: o.opacity }, o.dur);
}
}
},
destroyOverlays : function() {
if (!this.overlays.length) return;
if (this.isHtml && this.preserveContent) {
this.overlayBox.style.top = '-9999px';
hs.container.appendChild(this.overlayBox);
} else
hs.discardElement(this.overlayBox);
},
createFullExpand : function () {
this.fullExpandLabel = hs.createElement(
'a', {
href: 'javascript:hs.expanders['+ this.key +'].doFullExpand();',
title: hs.lang.fullExpandTitle,
className: 'highslide-full-expand'
}
);
this.createOverlay({
overlayId: this.fullExpandLabel,
position: hs.fullExpandPosition,
hideOnMouseOut: true,
opacity: hs.fullExpandOpacity
});
},
doFullExpand : function () {
try {
if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel);
this.focus();
var xSize = this.x.size;
this.resizeTo(this.x.full, this.y.full);
var xpos = this.x.pos - (this.x.size - xSize) / 2;
if (xpos < hs.marginLeft) xpos = hs.marginLeft;
this.moveTo(xpos, this.y.pos);
this.doShowHide('hidden');
} catch (e) {
this.error(e);
}
},
afterClose : function () {
this.a.className = this.a.className.replace('highslide-active-anchor', '');
this.doShowHide('visible');
if (this.isHtml && this.preserveContent) {
this.sleep();
} else {
if (this.outline && this.outlineWhileAnimating) this.outline.destroy();
hs.discardElement(this.wrapper);
}
if (hs.mask) hs.mask.style.display = 'none';
hs.expanders[this.key] = null;
hs.reOrder();
}
};
// hs.Ajax object prototype
hs.Ajax = function (a, content, pre) {
this.a = a;
this.content = content;
this.pre = pre;
};
hs.Ajax.prototype = {
run : function () {
var xhr;
if (!this.src) this.src = hs.getSrc(this.a);
if (this.src.match('#')) {
var arr = this.src.split('#');
this.src = arr[0];
this.id = arr[1];
}
if (hs.cachedGets[this.src]) {
this.cachedGet = hs.cachedGets[this.src];
if (this.id) this.getElementContent();
else this.loadHTML();
return;
}
try { xhr = new XMLHttpRequest(); }
catch (e) {
try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); }
catch (e) {
try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e) { this.onError(); }
}
}
var pThis = this;
xhr.onreadystatechange = function() {
if(pThis.xhr.readyState == 4) {
if (pThis.id) pThis.getElementContent();
else pThis.loadHTML();
}
};
var src = this.src;
this.xhr = xhr;
if (hs.forceAjaxReload)
src = src.replace(/$/, (/\?/.test(src) ? '&' : '?') +'dummy='+ (new Date()).getTime());
xhr.open('GET', src, true);
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.send(null);
},
getElementContent : function() {
hs.init();
var attribs = window.opera || hs.ie6SSL ? { src: 'about:blank' } : null;
this.iframe = hs.createElement('iframe', attribs,
{ position: 'absolute', top: '-9999px' }, hs.container);
this.loadHTML();
},
loadHTML : function() {
var s = this.cachedGet || this.xhr.responseText,
regBody;
if (this.pre) hs.cachedGets[this.src] = s;
if (!hs.ie || hs.uaVersion >= 5.5) {
s = s.replace(new RegExp('<link[^>]*>', 'gi'), '')
.replace(new RegExp('<script[^>]*>.*?</script>', 'gi'), '');
if (this.iframe) {
var doc = this.iframe.contentDocument;
if (!doc && this.iframe.contentWindow) doc = this.iframe.contentWindow.document;
if (!doc) { // Opera
var pThis = this;
setTimeout(function() { pThis.loadHTML(); }, 25);
return;
}
doc.open();
doc.write(s);
doc.close();
try { s = doc.getElementById(this.id).innerHTML; } catch (e) {
try { s = this.iframe.document.getElementById(this.id).innerHTML; } catch (e) {} // opera
}
hs.discardElement(this.iframe);
} else {
regBody = /(<body[^>]*>|<\/body>)/ig;
if (regBody.test(s)) s = s.split(regBody)[hs.ie ? 1 : 2];
}
}
hs.getElementByClass(this.content, 'DIV', 'highslide-body').innerHTML = s;
this.onLoad();
for (var x in this) this[x] = null;
}
};
hs.langDefaults = hs.lang;
// history
var HsExpander = hs.Expander;
if (hs.ie) {
(function () {
try {
document.documentElement.doScroll('left');
} catch (e) {
setTimeout(arguments.callee, 50);
return;
}
hs.ready();
})();
}
hs.addEventListener(document, 'DOMContentLoaded', hs.ready);
hs.addEventListener(window, 'load', hs.ready);
// set handlers
hs.addEventListener(document, 'ready', function() {
if (hs.expandCursor) {
var style = hs.createElement('style', { type: 'text/css' }, null,
document.getElementsByTagName('HEAD')[0]);
function addRule(sel, dec) {
if (!hs.ie) {
style.appendChild(document.createTextNode(sel + " {" + dec + "}"));
} else {
var last = document.styleSheets[document.styleSheets.length - 1];
if (typeof(last.addRule) == "object") last.addRule(sel, dec);
}
}
function fix(prop) {
return 'expression( ( ( ignoreMe = document.documentElement.'+ prop +
' ? document.documentElement.'+ prop +' : document.body.'+ prop +' ) ) + \'px\' );';
}
if (hs.expandCursor) addRule ('.highslide img',
'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;');
}
});
hs.addEventListener(window, 'resize', function() {
hs.getPageSize();
});
hs.addEventListener(document, 'mousemove', function(e) {
hs.mouse = { x: e.clientX, y: e.clientY };
});
hs.addEventListener(document, 'mousedown', hs.mouseClickHandler);
hs.addEventListener(document, 'mouseup', hs.mouseClickHandler);
hs.addEventListener(document, 'ready', hs.getAnchors);
hs.addEventListener(window, 'load', hs.preloadImages);
hs.addEventListener(window, 'load', hs.preloadAjax);
} | 123gohelmetsv2 | trunk/js/highslide/highslide-with-html.js | JavaScript | asf20 | 72,700 |
/**
* @file: highslide.css
* @version: 4.1.8
*/
.highslide-container div {
font-family: Verdana, Helvetica;
font-size: 10pt;
}
.highslide-container table {
background: none;
}
.highslide {
outline: none;
text-decoration: none;
}
.highslide img {
border: 0px solid silver;
}
.highslide:hover img {
border-color: gray;
}
.highslide-active-anchor img {
visibility: hidden;
}
.highslide-gallery .highslide-active-anchor img {
border-color: black;
visibility: visible;
cursor: default;
}
.highslide-image {
border-width: 2px;
border-style: solid;
border-color: white;
background: gray;
}
.highslide-wrapper, .highslide-outline {
background: white;
}
.glossy-dark {
background: #111;
}
.highslide-image-blur {
}
.highslide-number {
font-weight: bold;
color: gray;
font-size: .9em;
}
.highslide-caption {
display: none;
font-size: 1em;
padding: 5px;
/*background: white;*/
}
.highslide-heading {
display: none;
font-weight: bold;
margin: 0.4em;
}
.highslide-dimming {
position: absolute;
background: black;
}
a.highslide-full-expand {
background: url(graphics/fullexpand.gif) no-repeat;
display: block;
margin: 0 10px 10px 0;
width: 34px;
height: 34px;
}
.highslide-loading {
display: block;
color: black;
font-size: 9px;
font-weight: bold;
text-transform: uppercase;
text-decoration: none;
padding: 3px;
border: 1px solid white;
background-color: white;
padding-left: 22px;
background-image: url(graphics/loader.white.gif);
background-repeat: no-repeat;
background-position: 3px 1px;
}
a.highslide-credits,
a.highslide-credits i {
padding: 2px;
color: silver;
text-decoration: none;
font-size: 10px;
}
a.highslide-credits:hover,
a.highslide-credits:hover i {
color: white;
background-color: gray;
}
.highslide-move, .highslide-move * {
cursor: move;
}
.highslide-viewport {
display: none;
position: fixed;
width: 100%;
height: 100%;
z-index: 1;
background: none;
left: 0;
top: 0;
}
.highslide-overlay {
display: none;
}
.hidden-container {
display: none;
}
/* Example of a semitransparent, offset closebutton */
.closebutton {
position: relative;
top: -15px;
left: 15px;
width: 30px;
height: 30px;
cursor: pointer;
background: url(graphics/close.png);
/* NOTE! For IE6, you also need to update the highslide-ie6.css file. */
}
/*****************************************************************************/
/* Thumbnail boxes for the galleries. */
/* Remove these if you are not using a gallery. */
/*****************************************************************************/
.highslide-gallery ul {
list-style-type: none;
margin: 0;
padding: 0;
}
.highslide-gallery ul li {
display: block;
position: relative;
float: left;
width: 106px;
height: 106px;
border: 1px solid silver;
background: #ededed;
margin: 2px;
line-height: 0;
overflow: hidden;
}
.highslide-gallery ul a {
position: absolute;
top: 50%;
left: 50%;
}
.highslide-gallery ul img {
position: relative;
top: -50%;
left: -50%;
}
html>/**/body .highslide-gallery ul li {
display: table;
text-align: center;
}
html>/**/body .highslide-gallery ul li {
text-align: center;
}
html>/**/body .highslide-gallery ul a {
position: static;
display: table-cell;
vertical-align: middle;
}
html>/**/body .highslide-gallery ul img {
position: static;
}
/*****************************************************************************/
/* Controls for the galleries. */
/* Remove these if you are not using a gallery */
/*****************************************************************************/
.highslide-controls {
width: 195px;
height: 40px;
background: url(graphics/controlbar-white.gif) 0 -90px no-repeat;
margin: 20px 15px 10px 0;
}
.highslide-controls ul {
position: relative;
left: 15px;
height: 40px;
list-style: none;
margin: 0;
padding: 0;
background: url(graphics/controlbar-white.gif) right -90px no-repeat;
}
.highslide-controls li {
float: left;
padding: 5px 0;
margin:0;
list-style: none;
}
.highslide-controls a {
background-image: url(graphics/controlbar-white.gif);
display: block;
float: left;
height: 30px;
width: 30px;
outline: none;
}
.highslide-controls a.disabled {
cursor: default;
}
.highslide-controls a.disabled span {
cursor: default;
}
.highslide-controls a span {
/* hide the text for these graphic buttons */
display: none;
cursor: pointer;
}
/* The CSS sprites for the controlbar - see http://www.google.com/search?q=css+sprites */
.highslide-controls .highslide-previous a {
background-position: 0 0;
}
.highslide-controls .highslide-previous a:hover {
background-position: 0 -30px;
}
.highslide-controls .highslide-previous a.disabled {
background-position: 0 -60px !important;
}
.highslide-controls .highslide-play a {
background-position: -30px 0;
}
.highslide-controls .highslide-play a:hover {
background-position: -30px -30px;
}
.highslide-controls .highslide-play a.disabled {
background-position: -30px -60px !important;
}
.highslide-controls .highslide-pause a {
background-position: -60px 0;
}
.highslide-controls .highslide-pause a:hover {
background-position: -60px -30px;
}
.highslide-controls .highslide-next a {
background-position: -90px 0;
}
.highslide-controls .highslide-next a:hover {
background-position: -90px -30px;
}
.highslide-controls .highslide-next a.disabled {
background-position: -90px -60px !important;
}
.highslide-controls .highslide-move a {
background-position: -120px 0;
}
.highslide-controls .highslide-move a:hover {
background-position: -120px -30px;
}
.highslide-controls .highslide-full-expand a {
background-position: -150px 0;
}
.highslide-controls .highslide-full-expand a:hover {
background-position: -150px -30px;
}
.highslide-controls .highslide-full-expand a.disabled {
background-position: -150px -60px !important;
}
.highslide-controls .highslide-close a {
background-position: -180px 0;
}
.highslide-controls .highslide-close a:hover {
background-position: -180px -30px;
}
/*****************************************************************************/
/* Styles for the HTML popups */
/* Remove these if you are not using Highslide HTML */
/*****************************************************************************/
.highslide-maincontent {
display: none;
}
.highslide-html {
background-color: white;
}
.highslide-html-content {
display: none;
width: 400px;
padding: 0 5px 5px 5px;
}
.highslide-header {
padding-bottom: 5px;
}
.highslide-header ul {
margin: 0;
padding: 0;
text-align: right;
}
.highslide-header ul li {
display: inline;
padding-left: 1em;
}
.highslide-header ul li.highslide-previous, .highslide-header ul li.highslide-next {
display: none;
}
.highslide-header a {
font-weight: bold;
color: gray;
text-transform: uppercase;
text-decoration: none;
}
.highslide-header a:hover {
color: black;
}
.highslide-header .highslide-move a {
cursor: move;
}
.highslide-footer {
height: 16px;
}
.highslide-footer .highslide-resize {
display: block;
float: right;
margin-top: 5px;
height: 11px;
width: 11px;
background: url(graphics/resize.gif) no-repeat;
}
.highslide-footer .highslide-resize span {
display: none;
}
.highslide-body {
}
.highslide-resize {
cursor: nw-resize;
}
/*****************************************************************************/
/* Styles for the Individual wrapper class names. */
/* See www.highslide.com/ref/hs.wrapperClassName */
/* You can safely remove the class name themes you don't use */
/*****************************************************************************/
/* hs.wrapperClassName = 'draggable-header' */
.draggable-header .highslide-header {
height: 18px;
border-bottom: 1px solid #dddddd;
}
.draggable-header .highslide-heading {
position: absolute;
margin: 2px 0.4em;
}
.draggable-header .highslide-header .highslide-move {
cursor: move;
display: block;
height: 16px;
position: absolute;
right: 24px;
top: 0;
width: 100%;
z-index: 1;
}
.draggable-header .highslide-header .highslide-move * {
display: none;
}
.draggable-header .highslide-header .highslide-close {
position: absolute;
right: 2px;
top: 2px;
z-index: 5;
padding: 0;
}
.draggable-header .highslide-header .highslide-close a {
display: block;
height: 16px;
width: 16px;
background-image: url(graphics/closeX.png);
}
.draggable-header .highslide-header .highslide-close a:hover {
background-position: 0 16px;
}
.draggable-header .highslide-header .highslide-close span {
display: none;
}
.draggable-header .highslide-maincontent {
padding-top: 1em;
}
/* hs.wrapperClassName = 'titlebar' */
.titlebar .highslide-header {
height: 18px;
border-bottom: 1px solid #dddddd;
}
.titlebar .highslide-heading {
position: absolute;
width: 90%;
margin: 1px 0 1px 5px;
color: #666666;
}
.titlebar .highslide-header .highslide-move {
cursor: move;
display: block;
height: 16px;
position: absolute;
right: 24px;
top: 0;
width: 100%;
z-index: 1;
}
.titlebar .highslide-header .highslide-move * {
display: none;
}
.titlebar .highslide-header li {
position: relative;
top: 3px;
z-index: 2;
padding: 0 0 0 1em;
}
.titlebar .highslide-maincontent {
padding-top: 1em;
}
/* hs.wrapperClassName = 'no-footer' */
.no-footer .highslide-footer {
display: none;
}
/* hs.wrapperClassName = 'wide-border' */
.wide-border {
background: white;
}
.wide-border .highslide-image {
border-width: 10px;
}
.wide-border .highslide-caption {
padding: 0 10px 10px 10px;
}
/* hs.wrapperClassName = 'borderless' */
.borderless .highslide-image {
border: none;
}
.borderless .highslide-caption {
border-bottom: 1px solid white;
border-top: 1px solid white;
background: silver;
}
/* hs.wrapperClassName = 'outer-glow' */
.outer-glow {
background: #444;
}
.outer-glow .highslide-image {
border: 5px solid #444444;
}
.outer-glow .highslide-caption {
border: 5px solid #444444;
border-top: none;
padding: 5px;
background-color: gray;
}
/* hs.wrapperClassName = 'colored-border' */
.colored-border {
background: white;
}
.colored-border .highslide-image {
border: 2px solid green;
}
.colored-border .highslide-caption {
border: 2px solid green;
border-top: none;
}
/* hs.wrapperClassName = 'dark' */
.dark {
background: #111;
}
.dark .highslide-image {
border-color: black black #202020 black;
background: gray;
}
.dark .highslide-caption {
color: white;
background: #111;
}
.dark .highslide-controls,
.dark .highslide-controls ul,
.dark .highslide-controls a {
background-image: url(graphics/controlbar-black-border.gif);
}
/* hs.wrapperClassName = 'floating-caption' */
.floating-caption .highslide-caption {
position: absolute;
padding: 1em 0 0 0;
background: none;
color: white;
border: none;
font-weight: bold;
}
/* hs.wrapperClassName = 'controls-in-heading' */
.controls-in-heading .highslide-heading {
color: gray;
font-weight: bold;
height: 20px;
overflow: hidden;
cursor: default;
padding: 0 0 0 22px;
margin: 0;
background: url(graphics/icon.gif) no-repeat 0 1px;
}
.controls-in-heading .highslide-controls {
width: 105px;
height: 20px;
position: relative;
margin: 0;
top: -23px;
left: 7px;
background: none;
}
.controls-in-heading .highslide-controls ul {
position: static;
height: 20px;
background: none;
}
.controls-in-heading .highslide-controls li {
padding: 0;
}
.controls-in-heading .highslide-controls a {
background-image: url(graphics/controlbar-white-small.gif);
height: 20px;
width: 20px;
}
.controls-in-heading .highslide-controls .highslide-move {
display: none;
}
.controls-in-heading .highslide-controls .highslide-previous a {
background-position: 0 0;
}
.controls-in-heading .highslide-controls .highslide-previous a:hover {
background-position: 0 -20px;
}
.controls-in-heading .highslide-controls .highslide-previous a.disabled {
background-position: 0 -40px !important;
}
.controls-in-heading .highslide-controls .highslide-play a {
background-position: -20px 0;
}
.controls-in-heading .highslide-controls .highslide-play a:hover {
background-position: -20px -20px;
}
.controls-in-heading .highslide-controls .highslide-play a.disabled {
background-position: -20px -40px !important;
}
.controls-in-heading .highslide-controls .highslide-pause a {
background-position: -40px 0;
}
.controls-in-heading .highslide-controls .highslide-pause a:hover {
background-position: -40px -20px;
}
.controls-in-heading .highslide-controls .highslide-next a {
background-position: -60px 0;
}
.controls-in-heading .highslide-controls .highslide-next a:hover {
background-position: -60px -20px;
}
.controls-in-heading .highslide-controls .highslide-next a.disabled {
background-position: -60px -40px !important;
}
.controls-in-heading .highslide-controls .highslide-full-expand a {
background-position: -100px 0;
}
.controls-in-heading .highslide-controls .highslide-full-expand a:hover {
background-position: -100px -20px;
}
.controls-in-heading .highslide-controls .highslide-full-expand a.disabled {
background-position: -100px -40px !important;
}
.controls-in-heading .highslide-controls .highslide-close a {
background-position: -120px 0;
}
.controls-in-heading .highslide-controls .highslide-close a:hover {
background-position: -120px -20px;
}
/*****************************************************************************/
/* Styles for text based controls. */
/* You can safely remove this if you don't use text based controls */
/*****************************************************************************/
.text-controls .highslide-controls {
width: auto;
height: auto;
margin: 0;
text-align: center;
background: none;
}
.text-controls ul {
position: static;
background: none;
height: auto;
left: 0;
}
.text-controls .highslide-move {
display: none;
}
.text-controls li {
background-image: url(graphics/controlbar-text-buttons.png);
background-position: right top !important;
padding: 0;
margin-left: 15px;
display: block;
width: auto;
}
.text-controls a {
background: url(graphics/controlbar-text-buttons.png) no-repeat;
background-position: left top !important;
position: relative;
left: -10px;
display: block;
width: auto;
height: auto;
text-decoration: none !important;
}
.text-controls a span {
background: url(graphics/controlbar-text-buttons.png) no-repeat;
margin: 1px 2px 1px 10px;
display: block;
min-width: 4em;
height: 18px;
line-height: 18px;
padding: 1px 0 1px 18px;
color: #333;
font-family: "Trebuchet MS", Arial, sans-serif;
font-size: 12px;
font-weight: bold;
white-space: nowrap;
}
.text-controls .highslide-next {
margin-right: 1em;
}
.text-controls .highslide-full-expand a span {
min-width: 0;
margin: 1px 0;
padding: 1px 0 1px 10px;
}
.text-controls .highslide-close a span {
min-width: 0;
}
.text-controls a:hover span {
color: black;
}
.text-controls a.disabled span {
color: #999;
}
.text-controls .highslide-previous span {
background-position: 0 -40px;
}
.text-controls .highslide-previous a.disabled {
background-position: left top !important;
}
.text-controls .highslide-previous a.disabled span {
background-position: 0 -140px;
}
.text-controls .highslide-play span {
background-position: 0 -60px;
}
.text-controls .highslide-play a.disabled {
background-position: left top !important;
}
.text-controls .highslide-play a.disabled span {
background-position: 0 -160px;
}
.text-controls .highslide-pause span {
background-position: 0 -80px;
}
.text-controls .highslide-next span {
background-position: 0 -100px;
}
.text-controls .highslide-next a.disabled {
background-position: left top !important;
}
.text-controls .highslide-next a.disabled span {
background-position: 0 -200px;
}
.text-controls .highslide-full-expand span {
background: none;
}
.text-controls .highslide-full-expand a.disabled {
background-position: left top !important;
}
.text-controls .highslide-close span {
background-position: 0 -120px;
}
/*****************************************************************************/
/* Styles for the thumbstrip. */
/* See www.highslide.com/ref/hs.addSlideshow */
/* You can safely remove this if you don't use a thumbstrip */
/*****************************************************************************/
.highslide-thumbstrip {
height: 100%;
}
.highslide-thumbstrip div {
overflow: hidden;
}
.highslide-thumbstrip table {
position: relative;
padding: 0;
border-collapse: collapse;
}
.highslide-thumbstrip td {
padding: 1px;
/*text-align: center;*/
}
.highslide-thumbstrip a {
outline: none;
}
.highslide-thumbstrip img {
display: block;
border: 1px solid gray;
margin: 0 auto;
}
.highslide-thumbstrip .highslide-active-anchor img {
visibility: visible;
}
.highslide-thumbstrip .highslide-marker {
position: absolute;
width: 0;
height: 0;
border-width: 0;
border-style: solid;
border-color: transparent; /* change this to actual background color in highslide-ie6.css */
}
.highslide-thumbstrip-horizontal div {
width: auto;
/* width: 100% breaks in small strips in IE */
}
.highslide-thumbstrip-horizontal .highslide-scroll-up {
display: none;
position: absolute;
top: 3px;
left: 3px;
width: 25px;
height: 42px;
}
.highslide-thumbstrip-horizontal .highslide-scroll-up div {
margin-bottom: 10px;
cursor: pointer;
background: url(graphics/scrollarrows.png) left center no-repeat;
height: 42px;
}
.highslide-thumbstrip-horizontal .highslide-scroll-down {
display: none;
position: absolute;
top: 3px;
right: 3px;
width: 25px;
height: 42px;
}
.highslide-thumbstrip-horizontal .highslide-scroll-down div {
margin-bottom: 10px;
cursor: pointer;
background: url(graphics/scrollarrows.png) center right no-repeat;
height: 42px;
}
.highslide-thumbstrip-horizontal table {
margin: 2px 0 10px 0;
}
.highslide-viewport .highslide-thumbstrip-horizontal table {
margin-left: 10px;
}
.highslide-thumbstrip-horizontal img {
width: auto;
height: 40px;
}
.highslide-thumbstrip-horizontal .highslide-marker {
top: 47px;
border-left-width: 6px;
border-right-width: 6px;
border-bottom: 6px solid gray;
}
.highslide-viewport .highslide-thumbstrip-horizontal .highslide-marker {
margin-left: 10px;
}
.dark .highslide-thumbstrip-horizontal .highslide-marker, .highslide-viewport .highslide-thumbstrip-horizontal .highslide-marker {
border-bottom-color: white !important;
}
.highslide-thumbstrip-vertical-overlay {
overflow: hidden !important;
}
.highslide-thumbstrip-vertical div {
height: 100%;
}
.highslide-thumbstrip-vertical a {
display: block;
}
.highslide-thumbstrip-vertical .highslide-scroll-up {
display: none;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 25px;
}
.highslide-thumbstrip-vertical .highslide-scroll-up div {
margin-left: 10px;
cursor: pointer;
background: url(graphics/scrollarrows.png) top center no-repeat;
height: 25px;
}
.highslide-thumbstrip-vertical .highslide-scroll-down {
display: none;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 25px;
}
.highslide-thumbstrip-vertical .highslide-scroll-down div {
margin-left: 10px;
cursor: pointer;
background: url(graphics/scrollarrows.png) bottom center no-repeat;
height: 25px;
}
.highslide-thumbstrip-vertical table {
margin: 10px 0 0 10px;
}
.highslide-thumbstrip-vertical img {
max-width: 60px;
}
.highslide-thumbstrip-vertical .highslide-marker {
left: 0;
margin-top: 8px;
border-top-width: 6px;
border-bottom-width: 6px;
border-left: 6px solid gray;
}
.dark .highslide-thumbstrip-vertical .highslide-marker, .highslide-viewport .highslide-thumbstrip-vertical .highslide-marker {
border-left-color: white;
}
.highslide-viewport .highslide-thumbstrip-float {
overflow: auto;
}
.highslide-thumbstrip-float ul {
margin: 2px 0;
padding: 0;
}
.highslide-thumbstrip-float li {
display: block;
height: 60px;
margin: 0 2px;
list-style: none;
float: left;
}
.highslide-thumbstrip-float img {
display: inline;
border-color: silver;
max-height: 56px;
}
.highslide-thumbstrip-float .highslide-active-anchor img {
border-color: black;
}
.highslide-thumbstrip-float .highslide-scroll-up div, .highslide-thumbstrip-float .highslide-scroll-down div {
display: none;
}
.highslide-thumbstrip-float .highslide-marker {
display: none;
} | 123gohelmetsv2 | trunk/js/highslide/highslide.css | CSS | asf20 | 21,274 |
/******************************************************************************
Name: Highslide JS
Version: 4.1.8 (October 27 2009)
Config: default +slideshow +positioning +transitions +viewport +thumbstrip
Author: Torstein Hønsi
Support: http://highslide.com/support
Licence:
Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5
License (http://creativecommons.org/licenses/by-nc/2.5/).
You are free:
* to copy, distribute, display, and perform the work
* to make derivative works
Under the following conditions:
* Attribution. You must attribute the work in the manner specified by the
author or licensor.
* Noncommercial. You may not use this work for commercial purposes.
* For any reuse or distribution, you must make clear to others the license
terms of this work.
* Any of these conditions can be waived if you get permission from the
copyright holder.
Your fair use and other rights are in no way affected by the above.
******************************************************************************/
if (!hs) { var hs = {
// Language strings
lang : {
cssDirection: 'ltr',
loadingText : 'Loading...',
loadingTitle : 'Click to cancel',
focusTitle : 'Click to bring to front',
fullExpandTitle : 'Expand to actual size (f)',
creditsText : 'Powered by <i>Highslide JS</i>',
creditsTitle : 'Go to the Highslide JS homepage',
previousText : 'Previous',
nextText : 'Next',
moveText : 'Move',
closeText : 'Close',
closeTitle : 'Close (esc)',
resizeTitle : 'Resize',
playText : 'Play',
playTitle : 'Play slideshow (spacebar)',
pauseText : 'Pause',
pauseTitle : 'Pause slideshow (spacebar)',
previousTitle : 'Previous (arrow left)',
nextTitle : 'Next (arrow right)',
moveTitle : 'Move',
fullExpandText : '1:1',
number: 'Image %1 of %2',
restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.'
},
// See http://highslide.com/ref for examples of settings
graphicsDir : 'highslide/graphics/',
expandCursor : 'zoomin.cur', // null disables
restoreCursor : 'zoomout.cur', // null disables
expandDuration : 250, // milliseconds
restoreDuration : 250,
marginLeft : 15,
marginRight : 15,
marginTop : 15,
marginBottom : 15,
zIndexCounter : 1001, // adjust to other absolutely positioned elements
loadingOpacity : 0.75,
allowMultipleInstances: true,
numberOfImagesToPreload : 5,
outlineWhileAnimating : 2, // 0 = never, 1 = always, 2 = HTML only
outlineStartOffset : 3, // ends at 10
padToMinWidth : false, // pad the popup width to make room for wide caption
fullExpandPosition : 'bottom right',
fullExpandOpacity : 1,
showCredits : true, // you can set this to false if you want
creditsHref : 'http://highslide.com/',
creditsTarget : '_self',
enableKeyListener : true,
openerTagNames : ['a'], // Add more to allow slideshow indexing
transitions : [],
transitionDuration: 250,
dimmingOpacity: 0, // Lightbox style dimming background
dimmingDuration: 50, // 0 for instant dimming
anchor : 'auto', // where the image expands from
align : 'auto', // position in the client (overrides anchor)
targetX: null, // the id of a target element
targetY: null,
dragByHeading: true,
minWidth: 200,
minHeight: 200,
allowSizeReduction: true, // allow the image to reduce to fit client size. If false, this overrides minWidth and minHeight
outlineType : 'drop-shadow', // set null to disable outlines
skin : {
controls:
'<div class="highslide-controls"><ul>'+
'<li class="highslide-previous">'+
'<a href="#" title="{hs.lang.previousTitle}">'+
'<span>{hs.lang.previousText}</span></a>'+
'</li>'+
'<li class="highslide-play">'+
'<a href="#" title="{hs.lang.playTitle}">'+
'<span>{hs.lang.playText}</span></a>'+
'</li>'+
'<li class="highslide-pause">'+
'<a href="#" title="{hs.lang.pauseTitle}">'+
'<span>{hs.lang.pauseText}</span></a>'+
'</li>'+
'<li class="highslide-next">'+
'<a href="#" title="{hs.lang.nextTitle}">'+
'<span>{hs.lang.nextText}</span></a>'+
'</li>'+
'<li class="highslide-move">'+
'<a href="#" title="{hs.lang.moveTitle}">'+
'<span>{hs.lang.moveText}</span></a>'+
'</li>'+
'<li class="highslide-full-expand">'+
'<a href="#" title="{hs.lang.fullExpandTitle}">'+
'<span>{hs.lang.fullExpandText}</span></a>'+
'</li>'+
'<li class="highslide-close">'+
'<a href="#" title="{hs.lang.closeTitle}" >'+
'<span>{hs.lang.closeText}</span></a>'+
'</li>'+
'</ul></div>'
},
// END OF YOUR SETTINGS
// declare internal properties
preloadTheseImages : [],
continuePreloading: true,
expanders : [],
overrides : [
'allowSizeReduction',
'useBox',
'anchor',
'align',
'targetX',
'targetY',
'outlineType',
'outlineWhileAnimating',
'captionId',
'captionText',
'captionEval',
'captionOverlay',
'headingId',
'headingText',
'headingEval',
'headingOverlay',
'creditsPosition',
'dragByHeading',
'autoplay',
'numberPosition',
'transitions',
'dimmingOpacity',
'width',
'height',
'wrapperClassName',
'minWidth',
'minHeight',
'maxWidth',
'maxHeight',
'slideshowGroup',
'easing',
'easingClose',
'fadeInOut',
'src'
],
overlays : [],
idCounter : 0,
oPos : {
x: ['leftpanel', 'left', 'center', 'right', 'rightpanel'],
y: ['above', 'top', 'middle', 'bottom', 'below']
},
mouse: {},
headingOverlay: {},
captionOverlay: {},
timers : [],
slideshows : [],
pendingOutlines : {},
clones : {},
onReady: [],
uaVersion: /Trident\/4\.0/.test(navigator.userAgent) ? 8 :
parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]),
ie : (document.all && !window.opera),
safari : /Safari/.test(navigator.userAgent),
geckoMac : /Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),
$ : function (id) {
if (id) return document.getElementById(id);
},
push : function (arr, val) {
arr[arr.length] = val;
},
createElement : function (tag, attribs, styles, parent, nopad) {
var el = document.createElement(tag);
if (attribs) hs.extend(el, attribs);
if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0});
if (styles) hs.setStyles(el, styles);
if (parent) parent.appendChild(el);
return el;
},
extend : function (el, attribs) {
for (var x in attribs) el[x] = attribs[x];
return el;
},
setStyles : function (el, styles) {
for (var x in styles) {
if (hs.ie && x == 'opacity') {
if (styles[x] > 0.99) el.style.removeAttribute('filter');
else el.style.filter = 'alpha(opacity='+ (styles[x] * 100) +')';
}
else el.style[x] = styles[x];
}
},
animate: function(el, prop, opt) {
var start,
end,
unit;
if (typeof opt != 'object' || opt === null) {
var args = arguments;
opt = {
duration: args[2],
easing: args[3],
complete: args[4]
};
}
if (typeof opt.duration != 'number') opt.duration = 250;
opt.easing = Math[opt.easing] || Math.easeInQuad;
opt.curAnim = hs.extend({}, prop);
for (var name in prop) {
var e = new hs.fx(el, opt , name );
start = parseFloat(hs.css(el, name)) || 0;
end = parseFloat(prop[name]);
unit = name != 'opacity' ? 'px' : '';
e.custom( start, end, unit );
}
},
css: function(el, prop) {
if (document.defaultView) {
return document.defaultView.getComputedStyle(el, null).getPropertyValue(prop);
} else {
if (prop == 'opacity') prop = 'filter';
var val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b){ return b.toUpperCase(); })];
if (prop == 'filter')
val = val.replace(/alpha\(opacity=([0-9]+)\)/,
function (a, b) { return b / 100 });
return val === '' ? 1 : val;
}
},
getPageSize : function () {
var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat'
? d.documentElement : d.body;
var width = hs.ie ? iebody.clientWidth :
(d.documentElement.clientWidth || self.innerWidth),
height = hs.ie ? iebody.clientHeight : self.innerHeight;
hs.page = {
width: width,
height: height,
scrollLeft: hs.ie ? iebody.scrollLeft : pageXOffset,
scrollTop: hs.ie ? iebody.scrollTop : pageYOffset
}
},
getPosition : function(el) {
var p = { x: el.offsetLeft, y: el.offsetTop };
while (el.offsetParent) {
el = el.offsetParent;
p.x += el.offsetLeft;
p.y += el.offsetTop;
if (el != document.body && el != document.documentElement) {
p.x -= el.scrollLeft;
p.y -= el.scrollTop;
}
}
return p;
},
expand : function(a, params, custom, type) {
if (!a) a = hs.createElement('a', null, { display: 'none' }, hs.container);
if (typeof a.getParams == 'function') return params;
try {
new hs.Expander(a, params, custom);
return false;
} catch (e) { return true; }
},
getElementByClass : function (el, tagName, className) {
var els = el.getElementsByTagName(tagName);
for (var i = 0; i < els.length; i++) {
if ((new RegExp(className)).test(els[i].className)) {
return els[i];
}
}
return null;
},
replaceLang : function(s) {
s = s.replace(/\s/g, ' ');
var re = /{hs\.lang\.([^}]+)\}/g,
matches = s.match(re),
lang;
if (matches) for (var i = 0; i < matches.length; i++) {
lang = matches[i].replace(re, "$1");
if (typeof hs.lang[lang] != 'undefined') s = s.replace(matches[i], hs.lang[lang]);
}
return s;
},
focusTopmost : function() {
var topZ = 0,
topmostKey = -1,
expanders = hs.expanders,
exp,
zIndex;
for (var i = 0; i < expanders.length; i++) {
exp = expanders[i];
if (exp) {
zIndex = exp.wrapper.style.zIndex;
if (zIndex && zIndex > topZ) {
topZ = zIndex;
topmostKey = i;
}
}
}
if (topmostKey == -1) hs.focusKey = -1;
else expanders[topmostKey].focus();
},
getParam : function (a, param) {
a.getParams = a.onclick;
var p = a.getParams ? a.getParams() : null;
a.getParams = null;
return (p && typeof p[param] != 'undefined') ? p[param] :
(typeof hs[param] != 'undefined' ? hs[param] : null);
},
getSrc : function (a) {
var src = hs.getParam(a, 'src');
if (src) return src;
return a.href;
},
getNode : function (id) {
var node = hs.$(id), clone = hs.clones[id], a = {};
if (!node && !clone) return null;
if (!clone) {
clone = node.cloneNode(true);
clone.id = '';
hs.clones[id] = clone;
return node;
} else {
return clone.cloneNode(true);
}
},
discardElement : function(d) {
if (d) hs.garbageBin.appendChild(d);
hs.garbageBin.innerHTML = '';
},
dim : function(exp) {
if (!hs.dimmer) {
hs.dimmer = hs.createElement ('div', {
className: 'highslide-dimming highslide-viewport-size',
owner: '',
onclick: function() {
hs.close();
}
}, {
visibility: 'visible',
opacity: 0
}, hs.container, true);
}
hs.dimmer.style.display = '';
hs.dimmer.owner += '|'+ exp.key;
if (hs.geckoMac && hs.dimmingGeckoFix)
hs.setStyles(hs.dimmer, {
background: 'url('+ hs.graphicsDir + 'geckodimmer.png)',
opacity: 1
});
else
hs.animate(hs.dimmer, { opacity: exp.dimmingOpacity }, hs.dimmingDuration);
},
undim : function(key) {
if (!hs.dimmer) return;
if (typeof key != 'undefined') hs.dimmer.owner = hs.dimmer.owner.replace('|'+ key, '');
if (
(typeof key != 'undefined' && hs.dimmer.owner != '')
|| (hs.upcoming && hs.getParam(hs.upcoming, 'dimmingOpacity'))
) return;
if (hs.geckoMac && hs.dimmingGeckoFix) hs.dimmer.style.display = 'none';
else hs.animate(hs.dimmer, { opacity: 0 }, hs.dimmingDuration, null, function() {
hs.dimmer.style.display = 'none';
});
},
transit : function (adj, exp) {
var last = exp = exp || hs.getExpander();
if (hs.upcoming) return false;
else hs.last = last;
try {
hs.upcoming = adj;
adj.onclick();
} catch (e){
hs.last = hs.upcoming = null;
}
try {
if (!adj || exp.transitions[1] != 'crossfade')
exp.close();
} catch (e) {}
return false;
},
previousOrNext : function (el, op) {
var exp = hs.getExpander(el);
if (exp) return hs.transit(exp.getAdjacentAnchor(op), exp);
else return false;
},
previous : function (el) {
return hs.previousOrNext(el, -1);
},
next : function (el) {
return hs.previousOrNext(el, 1);
},
keyHandler : function(e) {
if (!e) e = window.event;
if (!e.target) e.target = e.srcElement; // ie
if (typeof e.target.form != 'undefined') return true; // form element has focus
var exp = hs.getExpander();
var op = null;
switch (e.keyCode) {
case 70: // f
if (exp) exp.doFullExpand();
return true;
case 32: // Space
op = 2;
break;
case 34: // Page Down
case 39: // Arrow right
case 40: // Arrow down
op = 1;
break;
case 8: // Backspace
case 33: // Page Up
case 37: // Arrow left
case 38: // Arrow up
op = -1;
break;
case 27: // Escape
case 13: // Enter
op = 0;
}
if (op !== null) {if (op != 2)hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
if (!hs.enableKeyListener) return true;
if (e.preventDefault) e.preventDefault();
else e.returnValue = false;
if (exp) {
if (op == 0) {
exp.close();
} else if (op == 2) {
if (exp.slideshow) exp.slideshow.hitSpace();
} else {
if (exp.slideshow) exp.slideshow.pause();
hs.previousOrNext(exp.key, op);
}
return false;
}
}
return true;
},
registerOverlay : function (overlay) {
hs.push(hs.overlays, hs.extend(overlay, { hsId: 'hsId'+ hs.idCounter++ } ));
},
addSlideshow : function (options) {
var sg = options.slideshowGroup;
if (typeof sg == 'object') {
for (var i = 0; i < sg.length; i++) {
var o = {};
for (var x in options) o[x] = options[x];
o.slideshowGroup = sg[i];
hs.push(hs.slideshows, o);
}
} else {
hs.push(hs.slideshows, options);
}
},
getWrapperKey : function (element, expOnly) {
var el, re = /^highslide-wrapper-([0-9]+)$/;
// 1. look in open expanders
el = element;
while (el.parentNode) {
if (el.hsKey !== undefined) return el.hsKey;
if (el.id && re.test(el.id)) return el.id.replace(re, "$1");
el = el.parentNode;
}
// 2. look in thumbnail
if (!expOnly) {
el = element;
while (el.parentNode) {
if (el.tagName && hs.isHsAnchor(el)) {
for (var key = 0; key < hs.expanders.length; key++) {
var exp = hs.expanders[key];
if (exp && exp.a == el) return key;
}
}
el = el.parentNode;
}
}
return null;
},
getExpander : function (el, expOnly) {
if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null;
if (typeof el == 'number') return hs.expanders[el] || null;
if (typeof el == 'string') el = hs.$(el);
return hs.expanders[hs.getWrapperKey(el, expOnly)] || null;
},
isHsAnchor : function (a) {
return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/));
},
reOrder : function () {
for (var i = 0; i < hs.expanders.length; i++)
if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost();
},
mouseClickHandler : function(e)
{
if (!e) e = window.event;
if (e.button > 1) return true;
if (!e.target) e.target = e.srcElement;
var el = e.target;
while (el.parentNode
&& !(/highslide-(image|move|html|resize)/.test(el.className)))
{
el = el.parentNode;
}
var exp = hs.getExpander(el);
if (exp && (exp.isClosing || !exp.isExpanded)) return true;
if (exp && e.type == 'mousedown') {
if (e.target.form) return true;
var match = el.className.match(/highslide-(image|move|resize)/);
if (match) {
hs.dragArgs = {
exp: exp ,
type: match[1],
left: exp.x.pos,
width: exp.x.size,
top: exp.y.pos,
height: exp.y.size,
clickX: e.clientX,
clickY: e.clientY
};
hs.addEventListener(document, 'mousemove', hs.dragHandler);
if (e.preventDefault) e.preventDefault(); // FF
if (/highslide-(image|html)-blur/.test(exp.content.className)) {
exp.focus();
hs.hasFocused = true;
}
return false;
}
} else if (e.type == 'mouseup') {
hs.removeEventListener(document, 'mousemove', hs.dragHandler);
if (hs.dragArgs) {
if (hs.styleRestoreCursor && hs.dragArgs.type == 'image')
hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor;
var hasDragged = hs.dragArgs.hasDragged;
if (!hasDragged &&!hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) {
exp.close();
}
else if (hasDragged || (!hasDragged && hs.hasHtmlExpanders)) {
hs.dragArgs.exp.doShowHide('hidden');
}
hs.hasFocused = false;
hs.dragArgs = null;
} else if (/highslide-image-blur/.test(el.className)) {
el.style.cursor = hs.styleRestoreCursor;
}
}
return false;
},
dragHandler : function(e)
{
if (!hs.dragArgs) return true;
if (!e) e = window.event;
var a = hs.dragArgs, exp = a.exp;
a.dX = e.clientX - a.clickX;
a.dY = e.clientY - a.clickY;
var distance = Math.sqrt(Math.pow(a.dX, 2) + Math.pow(a.dY, 2));
if (!a.hasDragged) a.hasDragged = (a.type != 'image' && distance > 0)
|| (distance > (hs.dragSensitivity || 5));
if (a.hasDragged && e.clientX > 5 && e.clientY > 5) {
if (a.type == 'resize') exp.resize(a);
else {
exp.moveTo(a.left + a.dX, a.top + a.dY);
if (a.type == 'image') exp.content.style.cursor = 'move';
}
}
return false;
},
wrapperMouseHandler : function (e) {
try {
if (!e) e = window.event;
var over = /mouseover/i.test(e.type);
if (!e.target) e.target = e.srcElement; // ie
if (hs.ie) e.relatedTarget =
over ? e.fromElement : e.toElement; // ie
var exp = hs.getExpander(e.target);
if (!exp.isExpanded) return;
if (!exp || !e.relatedTarget || hs.getExpander(e.relatedTarget, true) == exp
|| hs.dragArgs) return;
for (var i = 0; i < exp.overlays.length; i++) (function() {
var o = hs.$('hsId'+ exp.overlays[i]);
if (o && o.hideOnMouseOut) {
if (over) hs.setStyles(o, { visibility: 'visible', display: '' });
hs.animate(o, { opacity: over ? o.opacity : 0 }, o.dur);
}
})();
} catch (e) {}
},
addEventListener : function (el, event, func) {
if (el == document && event == 'ready') hs.push(hs.onReady, func);
try {
el.addEventListener(event, func, false);
} catch (e) {
try {
el.detachEvent('on'+ event, func);
el.attachEvent('on'+ event, func);
} catch (e) {
el['on'+ event] = func;
}
}
},
removeEventListener : function (el, event, func) {
try {
el.removeEventListener(event, func, false);
} catch (e) {
try {
el.detachEvent('on'+ event, func);
} catch (e) {
el['on'+ event] = null;
}
}
},
preloadFullImage : function (i) {
if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') {
var img = document.createElement('img');
img.onload = function() {
img = null;
hs.preloadFullImage(i + 1);
};
img.src = hs.preloadTheseImages[i];
}
},
preloadImages : function (number) {
if (number && typeof number != 'object') hs.numberOfImagesToPreload = number;
var arr = hs.getAnchors();
for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) {
hs.push(hs.preloadTheseImages, hs.getSrc(arr.images[i]));
}
// preload outlines
if (hs.outlineType) new hs.Outline(hs.outlineType, function () { hs.preloadFullImage(0)} );
else
hs.preloadFullImage(0);
// preload cursor
if (hs.restoreCursor) var cur = hs.createElement('img', { src: hs.graphicsDir + hs.restoreCursor });
},
init : function () {
if (!hs.container) {
hs.getPageSize();
hs.ieLt7 = hs.ie && hs.uaVersion < 7;
for (var x in hs.langDefaults) {
if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x];
else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined')
hs.lang[x] = hs.langDefaults[x];
}
hs.container = hs.createElement('div', {
className: 'highslide-container'
}, {
position: 'absolute',
left: 0,
top: 0,
width: '100%',
zIndex: hs.zIndexCounter,
direction: 'ltr'
},
document.body,
true
);
hs.loading = hs.createElement('a', {
className: 'highslide-loading',
title: hs.lang.loadingTitle,
innerHTML: hs.lang.loadingText,
href: 'javascript:;'
}, {
position: 'absolute',
top: '-9999px',
opacity: hs.loadingOpacity,
zIndex: 1
}, hs.container
);
hs.garbageBin = hs.createElement('div', null, { display: 'none' }, hs.container);
hs.viewport = hs.createElement('div', {
className: 'highslide-viewport highslide-viewport-size'
}, {
visibility: (hs.safari && hs.uaVersion < 525) ? 'visible' : 'hidden'
}, hs.container, 1
);
// http://www.robertpenner.com/easing/
Math.linearTween = function (t, b, c, d) {
return c*t/d + b;
};
Math.easeInQuad = function (t, b, c, d) {
return c*(t/=d)*t + b;
};
Math.easeOutQuad = function (t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
};
hs.hideSelects = hs.ieLt7;
hs.hideIframes = ((window.opera && hs.uaVersion < 9) || navigator.vendor == 'KDE'
|| (hs.ie && hs.uaVersion < 5.5));
}
},
ready : function() {
if (hs.isReady) return;
hs.isReady = true;
for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i]();
},
updateAnchors : function() {
var el, els, all = [], images = [],groups = {}, re;
for (var i = 0; i < hs.openerTagNames.length; i++) {
els = document.getElementsByTagName(hs.openerTagNames[i]);
for (var j = 0; j < els.length; j++) {
el = els[j];
re = hs.isHsAnchor(el);
if (re) {
hs.push(all, el);
if (re[0] == 'hs.expand') hs.push(images, el);
var g = hs.getParam(el, 'slideshowGroup') || 'none';
if (!groups[g]) groups[g] = [];
hs.push(groups[g], el);
}
}
}
hs.anchors = { all: all, groups: groups, images: images };
return hs.anchors;
},
getAnchors : function() {
return hs.anchors || hs.updateAnchors();
},
close : function(el) {
var exp = hs.getExpander(el);
if (exp) exp.close();
return false;
}
}; // end hs object
hs.fx = function( elem, options, prop ){
this.options = options;
this.elem = elem;
this.prop = prop;
if (!options.orig) options.orig = {};
};
hs.fx.prototype = {
update: function(){
(hs.fx.step[this.prop] || hs.fx.step._default)(this);
if (this.options.step)
this.options.step.call(this.elem, this.now, this);
},
custom: function(from, to, unit){
this.startTime = (new Date()).getTime();
this.start = from;
this.end = to;
this.unit = unit;// || this.unit || "px";
this.now = this.start;
this.pos = this.state = 0;
var self = this;
function t(gotoEnd){
return self.step(gotoEnd);
}
t.elem = this.elem;
if ( t() && hs.timers.push(t) == 1 ) {
hs.timerId = setInterval(function(){
var timers = hs.timers;
for ( var i = 0; i < timers.length; i++ )
if ( !timers[i]() )
timers.splice(i--, 1);
if ( !timers.length ) {
clearInterval(hs.timerId);
}
}, 13);
}
},
step: function(gotoEnd){
var t = (new Date()).getTime();
if ( gotoEnd || t >= this.options.duration + this.startTime ) {
this.now = this.end;
this.pos = this.state = 1;
this.update();
this.options.curAnim[ this.prop ] = true;
var done = true;
for ( var i in this.options.curAnim )
if ( this.options.curAnim[i] !== true )
done = false;
if ( done ) {
if (this.options.complete) this.options.complete.call(this.elem);
}
return false;
} else {
var n = t - this.startTime;
this.state = n / this.options.duration;
this.pos = this.options.easing(n, 0, 1, this.options.duration);
this.now = this.start + ((this.end - this.start) * this.pos);
this.update();
}
return true;
}
};
hs.extend( hs.fx, {
step: {
opacity: function(fx){
hs.setStyles(fx.elem, { opacity: fx.now });
},
_default: function(fx){
try {
if ( fx.elem.style && fx.elem.style[ fx.prop ] != null )
fx.elem.style[ fx.prop ] = fx.now + fx.unit;
else
fx.elem[ fx.prop ] = fx.now;
} catch (e) {}
}
}
});
hs.Outline = function (outlineType, onLoad) {
this.onLoad = onLoad;
this.outlineType = outlineType;
var v = hs.uaVersion, tr;
this.hasAlphaImageLoader = hs.ie && v >= 5.5 && v < 7;
if (!outlineType) {
if (onLoad) onLoad();
return;
}
hs.init();
this.table = hs.createElement(
'table', {
cellSpacing: 0
}, {
visibility: 'hidden',
position: 'absolute',
borderCollapse: 'collapse',
width: 0
},
hs.container,
true
);
var tbody = hs.createElement('tbody', null, null, this.table, 1);
this.td = [];
for (var i = 0; i <= 8; i++) {
if (i % 3 == 0) tr = hs.createElement('tr', null, { height: 'auto' }, tbody, true);
this.td[i] = hs.createElement('td', null, null, tr, true);
var style = i != 4 ? { lineHeight: 0, fontSize: 0} : { position : 'relative' };
hs.setStyles(this.td[i], style);
}
this.td[4].className = outlineType +' highslide-outline';
this.preloadGraphic();
};
hs.Outline.prototype = {
preloadGraphic : function () {
var src = hs.graphicsDir + (hs.outlinesDir || "outlines/")+ this.outlineType +".png";
var appendTo = hs.safari ? hs.container : null;
this.graphic = hs.createElement('img', null, { position: 'absolute',
top: '-9999px' }, appendTo, true); // for onload trigger
var pThis = this;
this.graphic.onload = function() { pThis.onGraphicLoad(); };
this.graphic.src = src;
},
onGraphicLoad : function () {
var o = this.offset = this.graphic.width / 4,
pos = [[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],
dim = { height: (2*o) +'px', width: (2*o) +'px' };
for (var i = 0; i <= 8; i++) {
if (pos[i]) {
if (this.hasAlphaImageLoader) {
var w = (i == 1 || i == 7) ? '100%' : this.graphic.width +'px';
var div = hs.createElement('div', null, { width: '100%', height: '100%', position: 'relative', overflow: 'hidden'}, this.td[i], true);
hs.createElement ('div', null, {
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+ this.graphic.src + "')",
position: 'absolute',
width: w,
height: this.graphic.height +'px',
left: (pos[i][0]*o)+'px',
top: (pos[i][1]*o)+'px'
},
div,
true);
} else {
hs.setStyles(this.td[i], { background: 'url('+ this.graphic.src +') '+ (pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'});
}
if (window.opera && (i == 3 || i ==5))
hs.createElement('div', null, dim, this.td[i], true);
hs.setStyles (this.td[i], dim);
}
}
this.graphic = null;
if (hs.pendingOutlines[this.outlineType]) hs.pendingOutlines[this.outlineType].destroy();
hs.pendingOutlines[this.outlineType] = this;
if (this.onLoad) this.onLoad();
},
setPosition : function (pos, offset, vis, dur, easing) {
var exp = this.exp,
stl = exp.wrapper.style,
offset = offset || 0,
pos = pos || {
x: exp.x.pos + offset,
y: exp.y.pos + offset,
w: exp.x.get('wsize') - 2 * offset,
h: exp.y.get('wsize') - 2 * offset
};
if (vis) this.table.style.visibility = (pos.h >= 4 * this.offset)
? 'visible' : 'hidden';
hs.setStyles(this.table, {
left: (pos.x - this.offset) +'px',
top: (pos.y - this.offset) +'px',
width: (pos.w + 2 * this.offset) +'px'
});
pos.w -= 2 * this.offset;
pos.h -= 2 * this.offset;
hs.setStyles (this.td[4], {
width: pos.w >= 0 ? pos.w +'px' : 0,
height: pos.h >= 0 ? pos.h +'px' : 0
});
if (this.hasAlphaImageLoader) this.td[3].style.height
= this.td[5].style.height = this.td[4].style.height;
},
destroy : function(hide) {
if (hide) this.table.style.visibility = 'hidden';
else hs.discardElement(this.table);
}
};
hs.Dimension = function(exp, dim) {
this.exp = exp;
this.dim = dim;
this.ucwh = dim == 'x' ? 'Width' : 'Height';
this.wh = this.ucwh.toLowerCase();
this.uclt = dim == 'x' ? 'Left' : 'Top';
this.lt = this.uclt.toLowerCase();
this.ucrb = dim == 'x' ? 'Right' : 'Bottom';
this.rb = this.ucrb.toLowerCase();
this.p1 = this.p2 = 0;
};
hs.Dimension.prototype = {
get : function(key) {
switch (key) {
case 'loadingPos':
return this.tpos + this.tb + (this.t - hs.loading['offset'+ this.ucwh]) / 2;
case 'loadingPosXfade':
return this.pos + this.cb+ this.p1 + (this.size - hs.loading['offset'+ this.ucwh]) / 2;
case 'wsize':
return this.size + 2 * this.cb + this.p1 + this.p2;
case 'fitsize':
return this.clientSize - this.marginMin - this.marginMax;
case 'maxsize':
return this.get('fitsize') - 2 * this.cb - this.p1 - this.p2 ;
case 'opos':
return this.pos - (this.exp.outline ? this.exp.outline.offset : 0);
case 'osize':
return this.get('wsize') + (this.exp.outline ? 2*this.exp.outline.offset : 0);
case 'imgPad':
return this.imgSize ? Math.round((this.size - this.imgSize) / 2) : 0;
}
},
calcBorders: function() {
// correct for borders
this.cb = (this.exp.content['offset'+ this.ucwh] - this.t) / 2;
this.marginMax = hs['margin'+ this.ucrb];
},
calcThumb: function() {
this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) :
this.exp.el['offset'+ this.ucwh];
this.tpos = this.exp.tpos[this.dim];
this.tb = (this.exp.el['offset'+ this.ucwh] - this.t) / 2;
if (this.tpos == 0 || this.tpos == -1) {
this.tpos = (hs.page[this.wh] / 2) + hs.page['scroll'+ this.uclt];
};
},
calcExpanded: function() {
var exp = this.exp;
this.justify = 'auto';
// get alignment
if (exp.align == 'center') this.justify = 'center';
else if (new RegExp(this.lt).test(exp.anchor)) this.justify = null;
else if (new RegExp(this.rb).test(exp.anchor)) this.justify = 'max';
// size and position
this.pos = this.tpos - this.cb + this.tb;
if (this.maxHeight && this.dim == 'x')
exp.maxWidth = Math.min(exp.maxWidth || this.full, exp.maxHeight * this.full / exp.y.full);
this.size = Math.min(this.full, exp['max'+ this.ucwh] || this.full);
this.minSize = exp.allowSizeReduction ?
Math.min(exp['min'+ this.ucwh], this.full) :this.full;
if (exp.isImage && exp.useBox) {
this.size = exp[this.wh];
this.imgSize = this.full;
}
if (this.dim == 'x' && hs.padToMinWidth) this.minSize = exp.minWidth;
this.target = exp['target'+ this.dim.toUpperCase()];
this.marginMin = hs['margin'+ this.uclt];
this.scroll = hs.page['scroll'+ this.uclt];
this.clientSize = hs.page[this.wh];
},
setSize: function(i) {
var exp = this.exp;
if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
this.imgSize = i;
this.size = Math.max(this.size, this.imgSize);
exp.content.style[this.lt] = this.get('imgPad')+'px';
} else
this.size = i;
exp.content.style[this.wh] = i +'px';
exp.wrapper.style[this.wh] = this.get('wsize') +'px';
if (exp.outline) exp.outline.setPosition();
if (this.dim == 'x' && exp.overlayBox) exp.sizeOverlayBox(true);
if (this.dim == 'x' && exp.slideshow && exp.isImage) {
if (i == this.full) exp.slideshow.disable('full-expand');
else exp.slideshow.enable('full-expand');
}
},
setPos: function(i) {
this.pos = i;
this.exp.wrapper.style[this.lt] = i +'px';
if (this.exp.outline) this.exp.outline.setPosition();
}
};
hs.Expander = function(a, params, custom, contentType) {
if (document.readyState && hs.ie && !hs.isReady) {
hs.addEventListener(document, 'ready', function() {
new hs.Expander(a, params, custom, contentType);
});
return;
}
this.a = a;
this.custom = custom;
this.contentType = contentType || 'image';
this.isImage = !this.isHtml;
hs.continuePreloading = false;
this.overlays = [];
this.last = hs.last;
hs.last = null;
hs.init();
var key = this.key = hs.expanders.length;
// override inline parameters
for (var i = 0; i < hs.overrides.length; i++) {
var name = hs.overrides[i];
this[name] = params && typeof params[name] != 'undefined' ?
params[name] : hs[name];
}
if (!this.src) this.src = a.href;
// get thumb
var el = (params && params.thumbnailId) ? hs.$(params.thumbnailId) : a;
el = this.thumb = el.getElementsByTagName('img')[0] || el;
this.thumbsUserSetId = el.id || a.id;
// check if already open
for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && hs.expanders[i].a == a
&& !(this.last && this.transitions[1] == 'crossfade')) {
hs.expanders[i].focus();
return false;
}
}
// cancel other
if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) {
hs.expanders[i].cancelLoading();
}
}
hs.expanders[key] = this;
if (!hs.allowMultipleInstances && !hs.upcoming) {
if (hs.expanders[key-1]) hs.expanders[key-1].close();
if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey])
hs.expanders[hs.focusKey].close();
}
// initiate metrics
this.el = el;
this.tpos = hs.getPosition(el);
hs.getPageSize();
var x = this.x = new hs.Dimension(this, 'x');
x.calcThumb();
var y = this.y = new hs.Dimension(this, 'y');
y.calcThumb();
this.wrapper = hs.createElement(
'div', {
id: 'highslide-wrapper-'+ this.key,
className: 'highslide-wrapper '+ this.wrapperClassName
}, {
visibility: 'hidden',
position: 'absolute',
zIndex: hs.zIndexCounter += 2
}, null, true );
this.wrapper.onmouseover = this.wrapper.onmouseout = hs.wrapperMouseHandler;
if (this.contentType == 'image' && this.outlineWhileAnimating == 2)
this.outlineWhileAnimating = 0;
// get the outline
if (!this.outlineType
|| (this.last && this.isImage && this.transitions[1] == 'crossfade')) {
this[this.contentType +'Create']();
} else if (hs.pendingOutlines[this.outlineType]) {
this.connectOutline();
this[this.contentType +'Create']();
} else {
this.showLoading();
var exp = this;
new hs.Outline(this.outlineType,
function () {
exp.connectOutline();
exp[exp.contentType +'Create']();
}
);
}
return true;
};
hs.Expander.prototype = {
error : function(e) {
// alert ('Line '+ e.lineNumber +': '+ e.message);
window.location.href = this.src;
},
connectOutline : function() {
var outline = this.outline = hs.pendingOutlines[this.outlineType];
outline.exp = this;
outline.table.style.zIndex = this.wrapper.style.zIndex - 1;
hs.pendingOutlines[this.outlineType] = null;
},
showLoading : function() {
if (this.onLoadStarted || this.loading) return;
this.loading = hs.loading;
var exp = this;
this.loading.onclick = function() {
exp.cancelLoading();
};
var exp = this,
l = this.x.get('loadingPos') +'px',
t = this.y.get('loadingPos') +'px';
if (!tgt && this.last && this.transitions[1] == 'crossfade')
var tgt = this.last;
if (tgt) {
l = tgt.x.get('loadingPosXfade') +'px';
t = tgt.y.get('loadingPosXfade') +'px';
this.loading.style.zIndex = hs.zIndexCounter++;
}
setTimeout(function () {
if (exp.loading) hs.setStyles(exp.loading, { left: l, top: t, zIndex: hs.zIndexCounter++ })}
, 100);
},
imageCreate : function() {
var exp = this;
var img = document.createElement('img');
this.content = img;
img.onload = function () {
if (hs.expanders[exp.key]) exp.contentLoaded();
};
if (hs.blockRightClick) img.oncontextmenu = function() { return false; };
img.className = 'highslide-image';
hs.setStyles(img, {
visibility: 'hidden',
display: 'block',
position: 'absolute',
maxWidth: '9999px',
zIndex: 3
});
img.title = hs.lang.restoreTitle;
if (hs.safari) hs.container.appendChild(img);
if (hs.ie && hs.flushImgSize) img.src = null;
img.src = this.src;
this.showLoading();
},
contentLoaded : function() {
try {
if (!this.content) return;
this.content.onload = null;
if (this.onLoadStarted) return;
else this.onLoadStarted = true;
var x = this.x, y = this.y;
if (this.loading) {
hs.setStyles(this.loading, { top: '-9999px' });
this.loading = null;
}
x.full = this.content.width;
y.full = this.content.height;
hs.setStyles(this.content, {
width: x.t +'px',
height: y.t +'px'
});
this.wrapper.appendChild(this.content);
hs.container.appendChild(this.wrapper);
x.calcBorders();
y.calcBorders();
hs.setStyles (this.wrapper, {
left: (x.tpos + x.tb - x.cb) +'px',
top: (y.tpos + x.tb - y.cb) +'px'
});
this.initSlideshow();
this.getOverlays();
var ratio = x.full / y.full;
x.calcExpanded();
this.justify(x);
y.calcExpanded();
this.justify(y);
if (this.overlayBox) this.sizeOverlayBox(0, 1);
if (this.allowSizeReduction) {
this.correctRatio(ratio);
var ss = this.slideshow;
if (ss && this.last && ss.controls && ss.fixedControls) {
var pos = ss.overlayOptions.position || '', p;
for (var dim in hs.oPos) for (var i = 0; i < 5; i++) {
p = this[dim];
if (pos.match(hs.oPos[dim][i])) {
p.pos = this.last[dim].pos
+ (this.last[dim].p1 - p.p1)
+ (this.last[dim].size - p.size) * [0, 0, .5, 1, 1][i];
if (ss.fixedControls == 'fit') {
if (p.pos + p.size + p.p1 + p.p2 > p.scroll + p.clientSize - p.marginMax)
p.pos = p.scroll + p.clientSize - p.size - p.marginMin - p.marginMax - p.p1 - p.p2;
if (p.pos < p.scroll + p.marginMin) p.pos = p.scroll + p.marginMin;
}
}
}
}
if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
this.createFullExpand();
if (this.overlays.length == 1) this.sizeOverlayBox();
}
}
this.show();
} catch (e) {
this.error(e);
}
},
justify : function (p, moveOnly) {
var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
if (tgt && tgt.match(/ /)) {
tgtArr = tgt.split(' ');
tgt = tgtArr[0];
}
if (tgt && hs.$(tgt)) {
p.pos = hs.getPosition(hs.$(tgt))[dim];
if (tgtArr && tgtArr[1] && tgtArr[1].match(/^[-]?[0-9]+px$/))
p.pos += parseInt(tgtArr[1]);
if (p.size < p.minSize) p.size = p.minSize;
} else if (p.justify == 'auto' || p.justify == 'center') {
var hasMovedMin = false;
var allowReduce = p.exp.allowSizeReduction;
if (p.justify == 'center')
p.pos = Math.round(p.scroll + (p.clientSize + p.marginMin - p.marginMax - p.get('wsize')) / 2);
else
p.pos = Math.round(p.pos - ((p.get('wsize') - p.t) / 2));
if (p.pos < p.scroll + p.marginMin) {
p.pos = p.scroll + p.marginMin;
hasMovedMin = true;
}
if (!moveOnly && p.size < p.minSize) {
p.size = p.minSize;
allowReduce = false;
}
if (p.pos + p.get('wsize') > p.scroll + p.clientSize - p.marginMax) {
if (!moveOnly && hasMovedMin && allowReduce) {
p.size = Math.min(p.size, p.get(dim == 'y' ? 'fitsize' : 'maxsize'));
} else if (p.get('wsize') < p.get('fitsize')) {
p.pos = p.scroll + p.clientSize - p.marginMax - p.get('wsize');
} else { // image larger than viewport
p.pos = p.scroll + p.marginMin;
if (!moveOnly && allowReduce) p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize');
}
}
if (!moveOnly && p.size < p.minSize) {
p.size = p.minSize;
allowReduce = false;
}
} else if (p.justify == 'max') {
p.pos = Math.floor(p.pos - p.size + p.t);
}
if (p.pos < p.marginMin) {
var tmpMin = p.pos;
p.pos = p.marginMin;
if (allowReduce && !moveOnly) p.size = p.size - (p.pos - tmpMin);
}
},
correctRatio : function(ratio) {
var x = this.x,
y = this.y,
changed = false,
xSize = Math.min(x.full, x.size),
ySize = Math.min(y.full, y.size),
useBox = (this.useBox || hs.padToMinWidth);
if (xSize / ySize > ratio) { // width greater
xSize = ySize * ratio;
if (xSize < x.minSize) { // below minWidth
xSize = x.minSize;
ySize = xSize / ratio;
}
changed = true;
} else if (xSize / ySize < ratio) { // height greater
ySize = xSize / ratio;
changed = true;
}
if (hs.padToMinWidth && x.full < x.minSize) {
x.imgSize = x.full;
y.size = y.imgSize = y.full;
} else if (this.useBox) {
x.imgSize = xSize;
y.imgSize = ySize;
} else {
x.size = xSize;
y.size = ySize;
}
changed = this.fitOverlayBox(useBox ? null : ratio, changed);
if (useBox && y.size < y.imgSize) {
y.imgSize = y.size;
x.imgSize = y.size * ratio;
}
if (changed || useBox) {
x.pos = x.tpos - x.cb + x.tb;
x.minSize = x.size;
this.justify(x, true);
y.pos = y.tpos - y.cb + y.tb;
y.minSize = y.size;
this.justify(y, true);
if (this.overlayBox) this.sizeOverlayBox();
}
},
fitOverlayBox : function(ratio, changed) {
var x = this.x, y = this.y;
if (this.overlayBox) {
while (y.size > this.minHeight && x.size > this.minWidth
&& y.get('wsize') > y.get('fitsize')) {
y.size -= 10;
if (ratio) x.size = y.size * ratio;
this.sizeOverlayBox(0, 1);
changed = true;
}
}
return changed;
},
show : function () {
var x = this.x, y = this.y;
this.doShowHide('hidden');
if (this.slideshow && this.slideshow.thumbstrip) this.slideshow.thumbstrip.selectThumb();
// Apply size change
this.changeSize(
1, {
wrapper: {
width : x.get('wsize'),
height : y.get('wsize'),
left: x.pos,
top: y.pos
},
content: {
left: x.p1 + x.get('imgPad'),
top: y.p1 + y.get('imgPad'),
width:x.imgSize ||x.size,
height:y.imgSize ||y.size
}
},
hs.expandDuration
);
},
changeSize : function(up, to, dur) {
// transition
var trans = this.transitions,
other = up ? (this.last ? this.last.a : null) : hs.upcoming,
t = (trans[1] && other
&& hs.getParam(other, 'transitions')[1] == trans[1]) ?
trans[1] : trans[0];
if (this[t] && t != 'expand') {
this[t](up, to);
return;
}
if (this.outline && !this.outlineWhileAnimating) {
if (up) this.outline.setPosition();
else this.outline.destroy();
}
if (!up) this.destroyOverlays();
var exp = this,
x = exp.x,
y = exp.y,
easing = this.easing;
if (!up) easing = this.easingClose || easing;
var after = up ?
function() {
if (exp.outline) exp.outline.table.style.visibility = "visible";
setTimeout(function() {
exp.afterExpand();
}, 50);
} :
function() {
exp.afterClose();
};
if (up) hs.setStyles( this.wrapper, {
width: x.t +'px',
height: y.t +'px'
});
if (this.fadeInOut) {
hs.setStyles(this.wrapper, { opacity: up ? 0 : 1 });
hs.extend(to.wrapper, { opacity: up });
}
hs.animate( this.wrapper, to.wrapper, {
duration: dur,
easing: easing,
step: function(val, args) {
if (exp.outline && exp.outlineWhileAnimating && args.prop == 'top') {
var fac = up ? args.pos : 1 - args.pos;
var pos = {
w: x.t + (x.get('wsize') - x.t) * fac,
h: y.t + (y.get('wsize') - y.t) * fac,
x: x.tpos + (x.pos - x.tpos) * fac,
y: y.tpos + (y.pos - y.tpos) * fac
};
exp.outline.setPosition(pos, 0, 1);
}
}
});
hs.animate( this.content, to.content, dur, easing, after);
if (up) {
this.wrapper.style.visibility = 'visible';
this.content.style.visibility = 'visible';
this.a.className += ' highslide-active-anchor';
}
},
fade : function(up, to) {
this.outlineWhileAnimating = false;
var exp = this, t = up ? hs.expandDuration : 0;
if (up) {
hs.animate(this.wrapper, to.wrapper, 0);
hs.setStyles(this.wrapper, { opacity: 0, visibility: 'visible' });
hs.animate(this.content, to.content, 0);
this.content.style.visibility = 'visible';
hs.animate(this.wrapper, { opacity: 1 }, t, null,
function() { exp.afterExpand(); });
}
if (this.outline) {
this.outline.table.style.zIndex = this.wrapper.style.zIndex;
var dir = up || -1,
offset = this.outline.offset,
startOff = up ? 3 : offset,
endOff = up? offset : 3;
for (var i = startOff; dir * i <= dir * endOff; i += dir, t += 25) {
(function() {
var o = up ? endOff - i : startOff - i;
setTimeout(function() {
exp.outline.setPosition(0, o, 1);
}, t);
})();
}
}
if (up) {}//setTimeout(function() { exp.afterExpand(); }, t+50);
else {
setTimeout( function() {
if (exp.outline) exp.outline.destroy(exp.preserveContent);
exp.destroyOverlays();
hs.animate( exp.wrapper, { opacity: 0 }, hs.restoreDuration, null, function(){
exp.afterClose();
});
}, t);
}
},
crossfade : function (up, to, from) {
if (!up) return;
var exp = this,
last = this.last,
x = this.x,
y = this.y,
lastX = last.x,
lastY = last.y,
wrapper = this.wrapper,
content = this.content,
overlayBox = this.overlayBox;
hs.removeEventListener(document, 'mousemove', hs.dragHandler);
hs.setStyles(content, {
width: (x.imgSize || x.size) +'px',
height: (y.imgSize || y.size) +'px'
});
if (overlayBox) overlayBox.style.overflow = 'visible';
this.outline = last.outline;
if (this.outline) this.outline.exp = exp;
last.outline = null;
var fadeBox = hs.createElement('div', {
className: 'highslide-image'
}, {
position: 'absolute',
zIndex: 4,
overflow: 'hidden',
display: 'none'
}
);
var names = { oldImg: last, newImg: this };
for (var n in names) {
this[n] = names[n].content.cloneNode(1);
hs.setStyles(this[n], {
position: 'absolute',
border: 0,
visibility: 'visible'
});
fadeBox.appendChild(this[n]);
}
wrapper.appendChild(fadeBox);
if (overlayBox) {
overlayBox.className = '';
wrapper.appendChild(overlayBox);
}
fadeBox.style.display = '';
last.content.style.display = 'none';
if (hs.safari) {
var match = navigator.userAgent.match(/Safari\/([0-9]{3})/);
if (match && parseInt(match[1]) < 525) this.wrapper.style.visibility = 'visible';
}
hs.animate(wrapper, {
width: x.size
}, {
duration: hs.transitionDuration,
step: function(val, args) {
var pos = args.pos,
invPos = 1 - pos;
var prop,
size = {},
props = ['pos', 'size', 'p1', 'p2'];
for (var n in props) {
prop = props[n];
size['x'+ prop] = Math.round(invPos * lastX[prop] + pos * x[prop]);
size['y'+ prop] = Math.round(invPos * lastY[prop] + pos * y[prop]);
size.ximgSize = Math.round(
invPos * (lastX.imgSize || lastX.size) + pos * (x.imgSize || x.size));
size.ximgPad = Math.round(invPos * lastX.get('imgPad') + pos * x.get('imgPad'));
size.yimgSize = Math.round(
invPos * (lastY.imgSize || lastY.size) + pos * (y.imgSize || y.size));
size.yimgPad = Math.round(invPos * lastY.get('imgPad') + pos * y.get('imgPad'));
}
if (exp.outline) exp.outline.setPosition({
x: size.xpos,
y: size.ypos,
w: size.xsize + size.xp1 + size.xp2 + 2 * x.cb,
h: size.ysize + size.yp1 + size.yp2 + 2 * y.cb
});
last.wrapper.style.clip = 'rect('
+ (size.ypos - lastY.pos)+'px, '
+ (size.xsize + size.xp1 + size.xp2 + size.xpos + 2 * lastX.cb - lastX.pos) +'px, '
+ (size.ysize + size.yp1 + size.yp2 + size.ypos + 2 * lastY.cb - lastY.pos) +'px, '
+ (size.xpos - lastX.pos)+'px)';
hs.setStyles(content, {
top: (size.yp1 + y.get('imgPad')) +'px',
left: (size.xp1 + x.get('imgPad')) +'px',
marginTop: (y.pos - size.ypos) +'px',
marginLeft: (x.pos - size.xpos) +'px'
});
hs.setStyles(wrapper, {
top: size.ypos +'px',
left: size.xpos +'px',
width: (size.xp1 + size.xp2 + size.xsize + 2 * x.cb)+ 'px',
height: (size.yp1 + size.yp2 + size.ysize + 2 * y.cb) + 'px'
});
hs.setStyles(fadeBox, {
width: (size.ximgSize || size.xsize) + 'px',
height: (size.yimgSize || size.ysize) +'px',
left: (size.xp1 + size.ximgPad) +'px',
top: (size.yp1 + size.yimgPad) +'px',
visibility: 'visible'
});
hs.setStyles(exp.oldImg, {
top: (lastY.pos - size.ypos + lastY.p1 - size.yp1 + lastY.get('imgPad') - size.yimgPad)+'px',
left: (lastX.pos - size.xpos + lastX.p1 - size.xp1 + lastX.get('imgPad') - size.ximgPad)+'px'
});
hs.setStyles(exp.newImg, {
opacity: pos,
top: (y.pos - size.ypos + y.p1 - size.yp1 + y.get('imgPad') - size.yimgPad) +'px',
left: (x.pos - size.xpos + x.p1 - size.xp1 + x.get('imgPad') - size.ximgPad) +'px'
});
if (overlayBox) hs.setStyles(overlayBox, {
width: size.xsize + 'px',
height: size.ysize +'px',
left: (size.xp1 + x.cb) +'px',
top: (size.yp1 + y.cb) +'px'
});
},
complete: function () {
wrapper.style.visibility = content.style.visibility = 'visible';
content.style.display = 'block';
fadeBox.style.display = 'none';
exp.a.className += ' highslide-active-anchor';
exp.afterExpand();
last.afterClose();
exp.last = null;
}
});
},
reuseOverlay : function(o, el) {
if (!this.last) return false;
for (var i = 0; i < this.last.overlays.length; i++) {
var oDiv = hs.$('hsId'+ this.last.overlays[i]);
if (oDiv && oDiv.hsId == o.hsId) {
this.genOverlayBox();
oDiv.reuse = this.key;
hs.push(this.overlays, this.last.overlays[i]);
return true;
}
}
return false;
},
afterExpand : function() {
this.isExpanded = true;
this.focus();
if (this.dimmingOpacity) hs.dim(this);
if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null;
this.prepareNextOutline();
var p = hs.page, mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop;
this.mouseIsOver = this.x.pos < mX && mX < this.x.pos + this.x.get('wsize')
&& this.y.pos < mY && mY < this.y.pos + this.y.get('wsize');
if (this.overlayBox) this.showOverlays();
},
prepareNextOutline : function() {
var key = this.key;
var outlineType = this.outlineType;
new hs.Outline(outlineType,
function () { try { hs.expanders[key].preloadNext(); } catch (e) {} });
},
preloadNext : function() {
var next = this.getAdjacentAnchor(1);
if (next && next.onclick.toString().match(/hs\.expand/))
var img = hs.createElement('img', { src: hs.getSrc(next) });
},
getAdjacentAnchor : function(op) {
var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none'];
/*< ? if ($cfg->slideshow) : ?>s*/
if (!as[current + op] && this.slideshow && this.slideshow.repeat) {
if (op == 1) return as[0];
else if (op == -1) return as[as.length-1];
}
/*< ? endif ?>s*/
return as[current + op] || null;
},
getAnchorIndex : function() {
var arr = hs.getAnchors().groups[this.slideshowGroup || 'none'];
if (arr) for (var i = 0; i < arr.length; i++) {
if (arr[i] == this.a) return i;
}
return null;
},
getNumber : function() {
if (this[this.numberPosition]) {
var arr = hs.anchors.groups[this.slideshowGroup || 'none'];
if (arr) {
var s = hs.lang.number.replace('%1', this.getAnchorIndex() + 1).replace('%2', arr.length);
this[this.numberPosition].innerHTML =
'<div class="highslide-number">'+ s +'</div>'+ this[this.numberPosition].innerHTML;
}
}
},
initSlideshow : function() {
if (!this.last) {
for (var i = 0; i < hs.slideshows.length; i++) {
var ss = hs.slideshows[i], sg = ss.slideshowGroup;
if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup)
this.slideshow = new hs.Slideshow(this.key, ss);
}
} else {
this.slideshow = this.last.slideshow;
}
var ss = this.slideshow;
if (!ss) return;
var key = ss.expKey = this.key;
ss.checkFirstAndLast();
ss.disable('full-expand');
if (ss.controls) {
var o = ss.overlayOptions || {};
o.overlayId = ss.controls;
o.hsId = 'controls';
this.createOverlay(o);
}
if (ss.thumbstrip) ss.thumbstrip.add(this);
if (!this.last && this.autoplay) ss.play(true);
if (ss.autoplay) {
ss.autoplay = setTimeout(function() {
hs.next(key);
}, (ss.interval || 500));
}
},
cancelLoading : function() {
hs.discardElement (this.wrapper);
hs.expanders[this.key] = null;
if (hs.upcoming == this.a) hs.upcoming = null;
hs.undim(this.key);
if (this.loading) hs.loading.style.left = '-9999px';
},
writeCredits : function () {
if (this.credits) return;
this.credits = hs.createElement('a', {
href: hs.creditsHref,
target: hs.creditsTarget,
className: 'highslide-credits',
innerHTML: hs.lang.creditsText,
title: hs.lang.creditsTitle
});
this.createOverlay({
overlayId: this.credits,
position: this.creditsPosition || 'top left',
hsId: 'credits'
});
},
getInline : function(types, addOverlay) {
for (var i = 0; i < types.length; i++) {
var type = types[i], s = null;
if (!this[type +'Id'] && this.thumbsUserSetId)
this[type +'Id'] = type +'-for-'+ this.thumbsUserSetId;
if (this[type +'Id']) this[type] = hs.getNode(this[type +'Id']);
if (!this[type] && !this[type +'Text'] && this[type +'Eval']) try {
s = eval(this[type +'Eval']);
} catch (e) {}
if (!this[type] && this[type +'Text']) {
s = this[type +'Text'];
}
if (!this[type] && !s) {
this[type] = hs.getNode(this.a['_'+ type + 'Id']);
if (!this[type]) {
var next = this.a.nextSibling;
while (next && !hs.isHsAnchor(next)) {
if ((new RegExp('highslide-'+ type)).test(next.className || null)) {
if (!next.id) this.a['_'+ type + 'Id'] = next.id = 'hsId'+ hs.idCounter++;
this[type] = hs.getNode(next.id);
break;
}
next = next.nextSibling;
}
}
}
if (!this[type] && !s && this.numberPosition == type) s = '\n';
if (!this[type] && s) this[type] = hs.createElement('div',
{ className: 'highslide-'+ type, innerHTML: s } );
if (addOverlay && this[type]) {
var o = { position: (type == 'heading') ? 'above' : 'below' };
for (var x in this[type+'Overlay']) o[x] = this[type+'Overlay'][x];
o.overlayId = this[type];
this.createOverlay(o);
}
}
},
// on end move and resize
doShowHide : function(visibility) {
if (hs.hideSelects) this.showHideElements('SELECT', visibility);
if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
if (hs.geckoMac) this.showHideElements('*', visibility);
},
showHideElements : function (tagName, visibility) {
var els = document.getElementsByTagName(tagName);
var prop = tagName == '*' ? 'overflow' : 'visibility';
for (var i = 0; i < els.length; i++) {
if (prop == 'visibility' || (document.defaultView.getComputedStyle(
els[i], "").getPropertyValue('overflow') == 'auto'
|| els[i].getAttribute('hidden-by') != null)) {
var hiddenBy = els[i].getAttribute('hidden-by');
if (visibility == 'visible' && hiddenBy) {
hiddenBy = hiddenBy.replace('['+ this.key +']', '');
els[i].setAttribute('hidden-by', hiddenBy);
if (!hiddenBy) els[i].style[prop] = els[i].origProp;
} else if (visibility == 'hidden') { // hide if behind
var elPos = hs.getPosition(els[i]);
elPos.w = els[i].offsetWidth;
elPos.h = els[i].offsetHeight;
if (!this.dimmingOpacity) { // hide all if dimming
var clearsX = (elPos.x + elPos.w < this.x.get('opos')
|| elPos.x > this.x.get('opos') + this.x.get('osize'));
var clearsY = (elPos.y + elPos.h < this.y.get('opos')
|| elPos.y > this.y.get('opos') + this.y.get('osize'));
}
var wrapperKey = hs.getWrapperKey(els[i]);
if (!clearsX && !clearsY && wrapperKey != this.key) { // element falls behind image
if (!hiddenBy) {
els[i].setAttribute('hidden-by', '['+ this.key +']');
els[i].origProp = els[i].style[prop];
els[i].style[prop] = 'hidden';
} else if (hiddenBy.indexOf('['+ this.key +']') == -1) {
els[i].setAttribute('hidden-by', hiddenBy + '['+ this.key +']');
}
} else if ((hiddenBy == '['+ this.key +']' || hs.focusKey == wrapperKey)
&& wrapperKey != this.key) { // on move
els[i].setAttribute('hidden-by', '');
els[i].style[prop] = els[i].origProp || '';
} else if (hiddenBy && hiddenBy.indexOf('['+ this.key +']') > -1) {
els[i].setAttribute('hidden-by', hiddenBy.replace('['+ this.key +']', ''));
}
}
}
}
},
focus : function() {
this.wrapper.style.zIndex = hs.zIndexCounter += 2;
// blur others
for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && i == hs.focusKey) {
var blurExp = hs.expanders[i];
blurExp.content.className += ' highslide-'+ blurExp.contentType +'-blur';
blurExp.content.style.cursor = hs.ie ? 'hand' : 'pointer';
blurExp.content.title = hs.lang.focusTitle;
}
}
// focus this
if (this.outline) this.outline.table.style.zIndex
= this.wrapper.style.zIndex - 1;
this.content.className = 'highslide-'+ this.contentType;
this.content.title = hs.lang.restoreTitle;
if (hs.restoreCursor) {
hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ hs.graphicsDir + hs.restoreCursor +'), pointer';
if (hs.ie && hs.uaVersion < 6) hs.styleRestoreCursor = 'hand';
this.content.style.cursor = hs.styleRestoreCursor;
}
hs.focusKey = this.key;
hs.addEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
},
moveTo: function(x, y) {
this.x.setPos(x);
this.y.setPos(y);
},
resize : function (e) {
var w, h, r = e.width / e.height;
w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full));
if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full;
h = w / r;
if (h < Math.min(this.minHeight, this.y.full)) {
h = Math.min(this.minHeight, this.y.full);
if (this.isImage) w = h * r;
}
this.resizeTo(w, h);
},
resizeTo: function(w, h) {
this.y.setSize(h);
this.x.setSize(w);
this.wrapper.style.height = this.y.get('wsize') +'px';
},
close : function() {
if (this.isClosing || !this.isExpanded) return;
if (this.transitions[1] == 'crossfade' && hs.upcoming) {
hs.getExpander(hs.upcoming).cancelLoading();
hs.upcoming = null;
}
this.isClosing = true;
if (this.slideshow && !hs.upcoming) this.slideshow.pause();
hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
try {
this.content.style.cursor = 'default';
this.changeSize(
0, {
wrapper: {
width : this.x.t,
height : this.y.t,
left: this.x.tpos - this.x.cb + this.x.tb,
top: this.y.tpos - this.y.cb + this.y.tb
},
content: {
left: 0,
top: 0,
width: this.x.t,
height: this.y.t
}
}, hs.restoreDuration
);
} catch (e) { this.afterClose(); }
},
createOverlay : function (o) {
var el = o.overlayId,
relToVP = (o.relativeTo == 'viewport' && !/panel$/.test(o.position));
if (typeof el == 'string') el = hs.getNode(el);
if (o.html) el = hs.createElement('div', { innerHTML: o.html });
if (!el || typeof el == 'string') return;
el.style.display = 'block';
o.hsId = o.hsId || o.overlayId;
if (this.transitions[1] == 'crossfade' && this.reuseOverlay(o, el)) return;
this.genOverlayBox();
var width = o.width && /^[0-9]+(px|%)$/.test(o.width) ? o.width : 'auto';
if (/^(left|right)panel$/.test(o.position) && !/^[0-9]+px$/.test(o.width)) width = '200px';
var overlay = hs.createElement(
'div', {
id: 'hsId'+ hs.idCounter++,
hsId: o.hsId
}, {
position: 'absolute',
visibility: 'hidden',
width: width,
direction: hs.lang.cssDirection || '',
opacity: 0
},
relToVP ? hs.viewport :this.overlayBox,
true
);
if (relToVP) overlay.hsKey = this.key;
overlay.appendChild(el);
hs.extend(overlay, {
opacity: 1,
offsetX: 0,
offsetY: 0,
dur: (o.fade === 0 || o.fade === false || (o.fade == 2 && hs.ie)) ? 0 : 250
});
hs.extend(overlay, o);
if (this.gotOverlays) {
this.positionOverlay(overlay);
if (!overlay.hideOnMouseOut || this.mouseIsOver)
hs.animate(overlay, { opacity: overlay.opacity }, overlay.dur);
}
hs.push(this.overlays, hs.idCounter - 1);
},
positionOverlay : function(overlay) {
var p = overlay.position || 'middle center',
relToVP = (overlay.relativeTo == 'viewport'),
offX = overlay.offsetX,
offY = overlay.offsetY;
if (relToVP) {
hs.viewport.style.display = 'block';
overlay.hsKey = this.key;
if (overlay.offsetWidth > overlay.parentNode.offsetWidth)
overlay.style.width = '100%';
} else
if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
if (/left$/.test(p)) overlay.style.left = offX +'px';
if (/center$/.test(p)) hs.setStyles (overlay, {
left: '50%',
marginLeft: (offX - Math.round(overlay.offsetWidth / 2)) +'px'
});
if (/right$/.test(p)) overlay.style.right = - offX +'px';
if (/^leftpanel$/.test(p)) {
hs.setStyles(overlay, {
right: '100%',
marginRight: this.x.cb +'px',
top: - this.y.cb +'px',
bottom: - this.y.cb +'px',
overflow: 'auto'
});
this.x.p1 = overlay.offsetWidth;
} else if (/^rightpanel$/.test(p)) {
hs.setStyles(overlay, {
left: '100%',
marginLeft: this.x.cb +'px',
top: - this.y.cb +'px',
bottom: - this.y.cb +'px',
overflow: 'auto'
});
this.x.p2 = overlay.offsetWidth;
}
var parOff = overlay.parentNode.offsetHeight;
overlay.style.height = 'auto';
if (relToVP && overlay.offsetHeight > parOff)
overlay.style.height = hs.ieLt7 ? parOff +'px' : '100%';
if (/^top/.test(p)) overlay.style.top = offY +'px';
if (/^middle/.test(p)) hs.setStyles (overlay, {
top: '50%',
marginTop: (offY - Math.round(overlay.offsetHeight / 2)) +'px'
});
if (/^bottom/.test(p)) overlay.style.bottom = - offY +'px';
if (/^above$/.test(p)) {
hs.setStyles(overlay, {
left: (- this.x.p1 - this.x.cb) +'px',
right: (- this.x.p2 - this.x.cb) +'px',
bottom: '100%',
marginBottom: this.y.cb +'px',
width: 'auto'
});
this.y.p1 = overlay.offsetHeight;
} else if (/^below$/.test(p)) {
hs.setStyles(overlay, {
position: 'relative',
left: (- this.x.p1 - this.x.cb) +'px',
right: (- this.x.p2 - this.x.cb) +'px',
top: '100%',
marginTop: this.y.cb +'px',
width: 'auto'
});
this.y.p2 = overlay.offsetHeight;
overlay.style.position = 'absolute';
}
},
getOverlays : function() {
this.getInline(['heading', 'caption'], true);
this.getNumber();
if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move';
if (hs.showCredits) this.writeCredits();
for (var i = 0; i < hs.overlays.length; i++) {
var o = hs.overlays[i], tId = o.thumbnailId, sg = o.slideshowGroup;
if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
|| (sg && sg === this.slideshowGroup)) {
this.createOverlay(o);
}
}
var os = [];
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
if (/panel$/.test(o.position)) this.positionOverlay(o);
else hs.push(os, o);
}
for (var i = 0; i < os.length; i++) this.positionOverlay(os[i]);
this.gotOverlays = true;
},
genOverlayBox : function() {
if (!this.overlayBox) this.overlayBox = hs.createElement (
'div', {
className: this.wrapperClassName
}, {
position : 'absolute',
width: (this.x.size || (this.useBox ? this.width : null)
|| this.x.full) +'px',
height: (this.y.size || this.y.full) +'px',
visibility : 'hidden',
overflow : 'hidden',
zIndex : hs.ie ? 4 : 'auto'
},
hs.container,
true
);
},
sizeOverlayBox : function(doWrapper, doPanels) {
var overlayBox = this.overlayBox,
x = this.x,
y = this.y;
hs.setStyles( overlayBox, {
width: x.size +'px',
height: y.size +'px'
});
if (doWrapper || doPanels) {
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
var ie6 = (hs.ieLt7 || document.compatMode == 'BackCompat');
if (o && /^(above|below)$/.test(o.position)) {
if (ie6) {
o.style.width = (overlayBox.offsetWidth + 2 * x.cb
+ x.p1 + x.p2) +'px';
}
y[o.position == 'above' ? 'p1' : 'p2'] = o.offsetHeight;
}
if (o && ie6 && /^(left|right)panel$/.test(o.position)) {
o.style.height = (overlayBox.offsetHeight + 2* y.cb) +'px';
}
}
}
if (doWrapper) {
hs.setStyles(this.content, {
top: y.p1 +'px'
});
hs.setStyles(overlayBox, {
top: (y.p1 + y.cb) +'px'
});
}
},
showOverlays : function() {
var b = this.overlayBox;
b.className = '';
hs.setStyles(b, {
top: (this.y.p1 + this.y.cb) +'px',
left: (this.x.p1 + this.x.cb) +'px',
overflow : 'visible'
});
if (hs.safari) b.style.visibility = 'visible';
this.wrapper.appendChild (b);
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
o.style.zIndex = o.hsId == 'controls' ? 5 : 4;
if (!o.hideOnMouseOut || this.mouseIsOver) {
o.style.visibility = 'visible';
hs.setStyles(o, { visibility: 'visible', display: '' });
hs.animate(o, { opacity: o.opacity }, o.dur);
}
}
},
destroyOverlays : function() {
if (!this.overlays.length) return;
if (this.slideshow) {
var c = this.slideshow.controls;
if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c);
}
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
if (o && o.parentNode == hs.viewport && hs.getExpander(o) == this) hs.discardElement(o);
}
hs.discardElement(this.overlayBox);
},
createFullExpand : function () {
if (this.slideshow && this.slideshow.controls) {
this.slideshow.enable('full-expand');
return;
}
this.fullExpandLabel = hs.createElement(
'a', {
href: 'javascript:hs.expanders['+ this.key +'].doFullExpand();',
title: hs.lang.fullExpandTitle,
className: 'highslide-full-expand'
}
);
this.createOverlay({
overlayId: this.fullExpandLabel,
position: hs.fullExpandPosition,
hideOnMouseOut: true,
opacity: hs.fullExpandOpacity
});
},
doFullExpand : function () {
try {
if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel);
this.focus();
var xSize = this.x.size;
this.resizeTo(this.x.full, this.y.full);
var xpos = this.x.pos - (this.x.size - xSize) / 2;
if (xpos < hs.marginLeft) xpos = hs.marginLeft;
this.moveTo(xpos, this.y.pos);
this.doShowHide('hidden');
} catch (e) {
this.error(e);
}
},
afterClose : function () {
this.a.className = this.a.className.replace('highslide-active-anchor', '');
this.doShowHide('visible');
if (this.outline && this.outlineWhileAnimating) this.outline.destroy();
hs.discardElement(this.wrapper);
this.destroyOverlays();
if (!hs.viewport.childNodes.length) hs.viewport.style.display = 'none';
if (this.dimmingOpacity) hs.undim(this.key);
hs.expanders[this.key] = null;
hs.reOrder();
}
};
hs.Slideshow = function (expKey, options) {
if (hs.dynamicallyUpdateAnchors !== false) hs.updateAnchors();
this.expKey = expKey;
for (var x in options) this[x] = options[x];
if (this.useControls) this.getControls();
if (this.thumbstrip) this.thumbstrip = hs.Thumbstrip(this);
};
hs.Slideshow.prototype = {
getControls: function() {
this.controls = hs.createElement('div', { innerHTML: hs.replaceLang(hs.skin.controls) },
null, hs.container);
var buttons = ['play', 'pause', 'previous', 'next', 'move', 'full-expand', 'close'];
this.btn = {};
var pThis = this;
for (var i = 0; i < buttons.length; i++) {
this.btn[buttons[i]] = hs.getElementByClass(this.controls, 'li', 'highslide-'+ buttons[i]);
this.enable(buttons[i]);
}
this.btn.pause.style.display = 'none';
//this.disable('full-expand');
},
checkFirstAndLast: function() {
if (this.repeat || !this.controls) return;
var exp = hs.expanders[this.expKey],
cur = exp.getAnchorIndex(),
re = /disabled$/;
if (cur == 0)
this.disable('previous');
else if (re.test(this.btn.previous.getElementsByTagName('a')[0].className))
this.enable('previous');
if (cur + 1 == hs.anchors.groups[exp.slideshowGroup || 'none'].length) {
this.disable('next');
this.disable('play');
} else if (re.test(this.btn.next.getElementsByTagName('a')[0].className)) {
this.enable('next');
this.enable('play');
}
},
enable: function(btn) {
if (!this.btn) return;
var sls = this, a = this.btn[btn].getElementsByTagName('a')[0], re = /disabled$/;
a.onclick = function() {
sls[btn]();
return false;
};
if (re.test(a.className)) a.className = a.className.replace(re, '');
},
disable: function(btn) {
if (!this.btn) return;
var a = this.btn[btn].getElementsByTagName('a')[0];
a.onclick = function() { return false; };
if (!/disabled$/.test(a.className)) a.className += ' disabled';
},
hitSpace: function() {
if (this.autoplay) this.pause();
else this.play();
},
play: function(wait) {
if (this.btn) {
this.btn.play.style.display = 'none';
this.btn.pause.style.display = '';
}
this.autoplay = true;
if (!wait) hs.next(this.expKey);
},
pause: function() {
if (this.btn) {
this.btn.pause.style.display = 'none';
this.btn.play.style.display = '';
}
clearTimeout(this.autoplay);
this.autoplay = null;
},
previous: function() {
this.pause();
hs.previous(this.btn.previous);
},
next: function() {
this.pause();
hs.next(this.btn.next);
},
move: function() {},
'full-expand': function() {
hs.getExpander().doFullExpand();
},
close: function() {
hs.close(this.btn.close);
}
};
hs.Thumbstrip = function(slideshow) {
function add (exp) {
hs.extend(options || {}, {
overlayId: dom,
hsId: 'thumbstrip',
className: 'highslide-thumbstrip-'+ mode +'-overlay ' + (options.className || '')
});
if (hs.ieLt7) options.fade = 0;
exp.createOverlay(options);
hs.setStyles(dom.parentNode, { overflow: 'hidden' });
};
function scroll (delta) {
selectThumb(undefined, Math.round(delta * dom[isX ? 'offsetWidth' : 'offsetHeight'] * 0.7));
};
function selectThumb (i, scrollBy) {
if (i === undefined) for (var j = 0; j < group.length; j++) {
if (group[j] == hs.expanders[slideshow.expKey].a) {
i = j;
break;
}
}
if (i === undefined) return;
var as = dom.getElementsByTagName('a'),
active = as[i],
cell = active.parentNode,
left = isX ? 'Left' : 'Top',
right = isX ? 'Right' : 'Bottom',
width = isX ? 'Width' : 'Height',
offsetLeft = 'offset' + left,
offsetWidth = 'offset' + width,
overlayWidth = div.parentNode.parentNode[offsetWidth],
minTblPos = overlayWidth - table[offsetWidth],
curTblPos = parseInt(table.style[isX ? 'left' : 'top']) || 0,
tblPos = curTblPos,
mgnRight = 20;
if (scrollBy !== undefined) {
tblPos = curTblPos - scrollBy;
if (minTblPos > 0) minTblPos = 0;
if (tblPos > 0) tblPos = 0;
if (tblPos < minTblPos) tblPos = minTblPos;
} else {
for (var j = 0; j < as.length; j++) as[j].className = '';
active.className = 'highslide-active-anchor';
var activeLeft = i > 0 ? as[i - 1].parentNode[offsetLeft] : cell[offsetLeft],
activeRight = cell[offsetLeft] + cell[offsetWidth] +
(as[i + 1] ? as[i + 1].parentNode[offsetWidth] : 0);
if (activeRight > overlayWidth - curTblPos) tblPos = overlayWidth - activeRight;
else if (activeLeft < -curTblPos) tblPos = -activeLeft;
}
var markerPos = cell[offsetLeft] + (cell[offsetWidth] - marker[offsetWidth]) / 2 + tblPos;
hs.animate(table, isX ? { left: tblPos } : { top: tblPos }, null, 'easeOutQuad');
hs.animate(marker, isX ? { left: markerPos } : { top: markerPos }, null, 'easeOutQuad');
scrollUp.style.display = tblPos < 0 ? 'block' : 'none';
scrollDown.style.display = (tblPos > minTblPos) ? 'block' : 'none';
};
// initialize
var group = hs.anchors.groups[hs.expanders[slideshow.expKey].slideshowGroup || 'none'],
options = slideshow.thumbstrip,
mode = options.mode || 'horizontal',
floatMode = (mode == 'float'),
tree = floatMode ? ['div', 'ul', 'li', 'span'] : ['table', 'tbody', 'tr', 'td'],
isX = (mode == 'horizontal'),
dom = hs.createElement('div', {
className: 'highslide-thumbstrip highslide-thumbstrip-'+ mode,
innerHTML:
'<div class="highslide-thumbstrip-inner">'+
'<'+ tree[0] +'><'+ tree[1] +'></'+ tree[1] +'></'+ tree[0] +'></div>'+
'<div class="highslide-scroll-up"><div></div></div>'+
'<div class="highslide-scroll-down"><div></div></div>'+
'<div class="highslide-marker"><div></div></div>'
}, {
display: 'none'
}, hs.container),
domCh = dom.childNodes,
div = domCh[0],
scrollUp = domCh[1],
scrollDown = domCh[2],
marker = domCh[3],
table = div.firstChild,
tbody = dom.getElementsByTagName(tree[1])[0],
tr;
for (var i = 0; i < group.length; i++) {
if (i == 0 || !isX) tr = hs.createElement(tree[2], null, null, tbody);
(function(){
var a = group[i],
cell = hs.createElement(tree[3], null, null, tr),
pI = i;
hs.createElement('a', {
href: a.href,
onclick: function() {
hs.getExpander(this).focus();
return hs.transit(a);
},
innerHTML: hs.stripItemFormatter ? hs.stripItemFormatter(a) : a.innerHTML
}, null, cell);
})();
}
if (!floatMode) {
scrollUp.onclick = function () { scroll(-1); };
scrollDown.onclick = function() { scroll(1); };
hs.addEventListener(tbody, document.onmousewheel !== undefined ?
'mousewheel' : 'DOMMouseScroll', function(e) {
var delta = 0;
e = e || window.event;
if (e.wheelDelta) {
delta = e.wheelDelta/120;
if (hs.opera) delta = -delta;
} else if (e.detail) {
delta = -e.detail/3;
}
if (delta) scroll(-delta * 0.2);
if (e.preventDefault) e.preventDefault();
e.returnValue = false;
});
}
return {
add: add,
selectThumb: selectThumb
}
};
hs.langDefaults = hs.lang;
// history
var HsExpander = hs.Expander;
if (hs.ie) {
(function () {
try {
document.documentElement.doScroll('left');
} catch (e) {
setTimeout(arguments.callee, 50);
return;
}
hs.ready();
})();
}
hs.addEventListener(document, 'DOMContentLoaded', hs.ready);
hs.addEventListener(window, 'load', hs.ready);
// set handlers
hs.addEventListener(document, 'ready', function() {
if (hs.expandCursor || hs.dimmingOpacity) {
var style = hs.createElement('style', { type: 'text/css' }, null,
document.getElementsByTagName('HEAD')[0]);
function addRule(sel, dec) {
if (!hs.ie) {
style.appendChild(document.createTextNode(sel + " {" + dec + "}"));
} else {
var last = document.styleSheets[document.styleSheets.length - 1];
if (typeof(last.addRule) == "object") last.addRule(sel, dec);
}
}
function fix(prop) {
return 'expression( ( ( ignoreMe = document.documentElement.'+ prop +
' ? document.documentElement.'+ prop +' : document.body.'+ prop +' ) ) + \'px\' );';
}
if (hs.expandCursor) addRule ('.highslide img',
'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;');
addRule ('.highslide-viewport-size',
hs.ie && (hs.uaVersion < 7 || document.compatMode == 'BackCompat') ?
'position: absolute; '+
'left:'+ fix('scrollLeft') +
'top:'+ fix('scrollTop') +
'width:'+ fix('clientWidth') +
'height:'+ fix('clientHeight') :
'position: fixed; width: 100%; height: 100%; left: 0; top: 0');
}
});
hs.addEventListener(window, 'resize', function() {
hs.getPageSize();
if (hs.viewport) for (var i = 0; i < hs.viewport.childNodes.length; i++) {
var node = hs.viewport.childNodes[i],
exp = hs.getExpander(node);
exp.positionOverlay(node);
if (node.hsId == 'thumbstrip') exp.slideshow.thumbstrip.selectThumb();
}
});
hs.addEventListener(document, 'mousemove', function(e) {
hs.mouse = { x: e.clientX, y: e.clientY };
});
hs.addEventListener(document, 'mousedown', hs.mouseClickHandler);
hs.addEventListener(document, 'mouseup', hs.mouseClickHandler);
hs.addEventListener(document, 'ready', hs.getAnchors);
hs.addEventListener(window, 'load', hs.preloadImages);
} | 123gohelmetsv2 | trunk/js/highslide/highslide-with-gallery.js | JavaScript | asf20 | 76,966 |
/******************************************************************************
Name: Highslide JS
Version: 4.1.8 (October 27 2009)
Config: default
Author: Torstein Hønsi
Support: http://highslide.com/support
Licence:
Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5
License (http://creativecommons.org/licenses/by-nc/2.5/).
You are free:
* to copy, distribute, display, and perform the work
* to make derivative works
Under the following conditions:
* Attribution. You must attribute the work in the manner specified by the
author or licensor.
* Noncommercial. You may not use this work for commercial purposes.
* For any reuse or distribution, you must make clear to others the license
terms of this work.
* Any of these conditions can be waived if you get permission from the
copyright holder.
Your fair use and other rights are in no way affected by the above.
******************************************************************************/
if (!hs) { var hs = {
// Language strings
lang : {
cssDirection: 'ltr',
loadingText : 'Loading...',
loadingTitle : 'Click to cancel',
focusTitle : 'Click to bring to front',
fullExpandTitle : 'Expand to actual size (f)',
creditsText : 'Powered by <i>Highslide JS</i>',
creditsTitle : 'Go to the Highslide JS homepage',
restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.'
},
// See http://highslide.com/ref for examples of settings
graphicsDir : 'highslide/graphics/',
expandCursor : 'zoomin.cur', // null disables
restoreCursor : 'zoomout.cur', // null disables
expandDuration : 250, // milliseconds
restoreDuration : 250,
marginLeft : 15,
marginRight : 15,
marginTop : 15,
marginBottom : 15,
zIndexCounter : 1001, // adjust to other absolutely positioned elements
loadingOpacity : 0.75,
allowMultipleInstances: true,
numberOfImagesToPreload : 5,
outlineWhileAnimating : 2, // 0 = never, 1 = always, 2 = HTML only
outlineStartOffset : 3, // ends at 10
padToMinWidth : false, // pad the popup width to make room for wide caption
fullExpandPosition : 'bottom right',
fullExpandOpacity : 1,
showCredits : true, // you can set this to false if you want
creditsHref : 'http://highslide.com/',
creditsTarget : '_self',
enableKeyListener : true,
openerTagNames : ['a'], // Add more to allow slideshow indexing
dragByHeading: true,
minWidth: 200,
minHeight: 200,
allowSizeReduction: true, // allow the image to reduce to fit client size. If false, this overrides minWidth and minHeight
outlineType : 'drop-shadow', // set null to disable outlines
// END OF YOUR SETTINGS
// declare internal properties
preloadTheseImages : [],
continuePreloading: true,
expanders : [],
overrides : [
'allowSizeReduction',
'useBox',
'outlineType',
'outlineWhileAnimating',
'captionId',
'captionText',
'captionEval',
'captionOverlay',
'headingId',
'headingText',
'headingEval',
'headingOverlay',
'creditsPosition',
'dragByHeading',
'width',
'height',
'wrapperClassName',
'minWidth',
'minHeight',
'maxWidth',
'maxHeight',
'slideshowGroup',
'easing',
'easingClose',
'fadeInOut',
'src'
],
overlays : [],
idCounter : 0,
oPos : {
x: ['leftpanel', 'left', 'center', 'right', 'rightpanel'],
y: ['above', 'top', 'middle', 'bottom', 'below']
},
mouse: {},
headingOverlay: {},
captionOverlay: {},
timers : [],
pendingOutlines : {},
clones : {},
onReady: [],
uaVersion: /Trident\/4\.0/.test(navigator.userAgent) ? 8 :
parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]),
ie : (document.all && !window.opera),
safari : /Safari/.test(navigator.userAgent),
geckoMac : /Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),
$ : function (id) {
if (id) return document.getElementById(id);
},
push : function (arr, val) {
arr[arr.length] = val;
},
createElement : function (tag, attribs, styles, parent, nopad) {
var el = document.createElement(tag);
if (attribs) hs.extend(el, attribs);
if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0});
if (styles) hs.setStyles(el, styles);
if (parent) parent.appendChild(el);
return el;
},
extend : function (el, attribs) {
for (var x in attribs) el[x] = attribs[x];
return el;
},
setStyles : function (el, styles) {
for (var x in styles) {
if (hs.ie && x == 'opacity') {
if (styles[x] > 0.99) el.style.removeAttribute('filter');
else el.style.filter = 'alpha(opacity='+ (styles[x] * 100) +')';
}
else el.style[x] = styles[x];
}
},
animate: function(el, prop, opt) {
var start,
end,
unit;
if (typeof opt != 'object' || opt === null) {
var args = arguments;
opt = {
duration: args[2],
easing: args[3],
complete: args[4]
};
}
if (typeof opt.duration != 'number') opt.duration = 250;
opt.easing = Math[opt.easing] || Math.easeInQuad;
opt.curAnim = hs.extend({}, prop);
for (var name in prop) {
var e = new hs.fx(el, opt , name );
start = parseFloat(hs.css(el, name)) || 0;
end = parseFloat(prop[name]);
unit = name != 'opacity' ? 'px' : '';
e.custom( start, end, unit );
}
},
css: function(el, prop) {
if (document.defaultView) {
return document.defaultView.getComputedStyle(el, null).getPropertyValue(prop);
} else {
if (prop == 'opacity') prop = 'filter';
var val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b){ return b.toUpperCase(); })];
if (prop == 'filter')
val = val.replace(/alpha\(opacity=([0-9]+)\)/,
function (a, b) { return b / 100 });
return val === '' ? 1 : val;
}
},
getPageSize : function () {
var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat'
? d.documentElement : d.body;
var width = hs.ie ? iebody.clientWidth :
(d.documentElement.clientWidth || self.innerWidth),
height = hs.ie ? iebody.clientHeight : self.innerHeight;
hs.page = {
width: width,
height: height,
scrollLeft: hs.ie ? iebody.scrollLeft : pageXOffset,
scrollTop: hs.ie ? iebody.scrollTop : pageYOffset
}
},
getPosition : function(el) {
var p = { x: el.offsetLeft, y: el.offsetTop };
while (el.offsetParent) {
el = el.offsetParent;
p.x += el.offsetLeft;
p.y += el.offsetTop;
if (el != document.body && el != document.documentElement) {
p.x -= el.scrollLeft;
p.y -= el.scrollTop;
}
}
return p;
},
expand : function(a, params, custom, type) {
if (!a) a = hs.createElement('a', null, { display: 'none' }, hs.container);
if (typeof a.getParams == 'function') return params;
try {
new hs.Expander(a, params, custom);
return false;
} catch (e) { return true; }
},
focusTopmost : function() {
var topZ = 0,
topmostKey = -1,
expanders = hs.expanders,
exp,
zIndex;
for (var i = 0; i < expanders.length; i++) {
exp = expanders[i];
if (exp) {
zIndex = exp.wrapper.style.zIndex;
if (zIndex && zIndex > topZ) {
topZ = zIndex;
topmostKey = i;
}
}
}
if (topmostKey == -1) hs.focusKey = -1;
else expanders[topmostKey].focus();
},
getParam : function (a, param) {
a.getParams = a.onclick;
var p = a.getParams ? a.getParams() : null;
a.getParams = null;
return (p && typeof p[param] != 'undefined') ? p[param] :
(typeof hs[param] != 'undefined' ? hs[param] : null);
},
getSrc : function (a) {
var src = hs.getParam(a, 'src');
if (src) return src;
return a.href;
},
getNode : function (id) {
var node = hs.$(id), clone = hs.clones[id], a = {};
if (!node && !clone) return null;
if (!clone) {
clone = node.cloneNode(true);
clone.id = '';
hs.clones[id] = clone;
return node;
} else {
return clone.cloneNode(true);
}
},
discardElement : function(d) {
if (d) hs.garbageBin.appendChild(d);
hs.garbageBin.innerHTML = '';
},
transit : function (adj, exp) {
var last = exp = exp || hs.getExpander();
if (hs.upcoming) return false;
else hs.last = last;
try {
hs.upcoming = adj;
adj.onclick();
} catch (e){
hs.last = hs.upcoming = null;
}
try {
exp.close();
} catch (e) {}
return false;
},
previousOrNext : function (el, op) {
var exp = hs.getExpander(el);
if (exp) return hs.transit(exp.getAdjacentAnchor(op), exp);
else return false;
},
previous : function (el) {
return hs.previousOrNext(el, -1);
},
next : function (el) {
return hs.previousOrNext(el, 1);
},
keyHandler : function(e) {
if (!e) e = window.event;
if (!e.target) e.target = e.srcElement; // ie
if (typeof e.target.form != 'undefined') return true; // form element has focus
var exp = hs.getExpander();
var op = null;
switch (e.keyCode) {
case 70: // f
if (exp) exp.doFullExpand();
return true;
case 32: // Space
case 34: // Page Down
case 39: // Arrow right
case 40: // Arrow down
op = 1;
break;
case 8: // Backspace
case 33: // Page Up
case 37: // Arrow left
case 38: // Arrow up
op = -1;
break;
case 27: // Escape
case 13: // Enter
op = 0;
}
if (op !== null) {hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
if (!hs.enableKeyListener) return true;
if (e.preventDefault) e.preventDefault();
else e.returnValue = false;
if (exp) {
if (op == 0) {
exp.close();
} else {
hs.previousOrNext(exp.key, op);
}
return false;
}
}
return true;
},
registerOverlay : function (overlay) {
hs.push(hs.overlays, hs.extend(overlay, { hsId: 'hsId'+ hs.idCounter++ } ));
},
getWrapperKey : function (element, expOnly) {
var el, re = /^highslide-wrapper-([0-9]+)$/;
// 1. look in open expanders
el = element;
while (el.parentNode) {
if (el.id && re.test(el.id)) return el.id.replace(re, "$1");
el = el.parentNode;
}
// 2. look in thumbnail
if (!expOnly) {
el = element;
while (el.parentNode) {
if (el.tagName && hs.isHsAnchor(el)) {
for (var key = 0; key < hs.expanders.length; key++) {
var exp = hs.expanders[key];
if (exp && exp.a == el) return key;
}
}
el = el.parentNode;
}
}
return null;
},
getExpander : function (el, expOnly) {
if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null;
if (typeof el == 'number') return hs.expanders[el] || null;
if (typeof el == 'string') el = hs.$(el);
return hs.expanders[hs.getWrapperKey(el, expOnly)] || null;
},
isHsAnchor : function (a) {
return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/));
},
reOrder : function () {
for (var i = 0; i < hs.expanders.length; i++)
if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost();
},
mouseClickHandler : function(e)
{
if (!e) e = window.event;
if (e.button > 1) return true;
if (!e.target) e.target = e.srcElement;
var el = e.target;
while (el.parentNode
&& !(/highslide-(image|move|html|resize)/.test(el.className)))
{
el = el.parentNode;
}
var exp = hs.getExpander(el);
if (exp && (exp.isClosing || !exp.isExpanded)) return true;
if (exp && e.type == 'mousedown') {
if (e.target.form) return true;
var match = el.className.match(/highslide-(image|move|resize)/);
if (match) {
hs.dragArgs = {
exp: exp ,
type: match[1],
left: exp.x.pos,
width: exp.x.size,
top: exp.y.pos,
height: exp.y.size,
clickX: e.clientX,
clickY: e.clientY
};
hs.addEventListener(document, 'mousemove', hs.dragHandler);
if (e.preventDefault) e.preventDefault(); // FF
if (/highslide-(image|html)-blur/.test(exp.content.className)) {
exp.focus();
hs.hasFocused = true;
}
return false;
}
} else if (e.type == 'mouseup') {
hs.removeEventListener(document, 'mousemove', hs.dragHandler);
if (hs.dragArgs) {
if (hs.styleRestoreCursor && hs.dragArgs.type == 'image')
hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor;
var hasDragged = hs.dragArgs.hasDragged;
if (!hasDragged &&!hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) {
exp.close();
}
else if (hasDragged || (!hasDragged && hs.hasHtmlExpanders)) {
hs.dragArgs.exp.doShowHide('hidden');
}
hs.hasFocused = false;
hs.dragArgs = null;
} else if (/highslide-image-blur/.test(el.className)) {
el.style.cursor = hs.styleRestoreCursor;
}
}
return false;
},
dragHandler : function(e)
{
if (!hs.dragArgs) return true;
if (!e) e = window.event;
var a = hs.dragArgs, exp = a.exp;
a.dX = e.clientX - a.clickX;
a.dY = e.clientY - a.clickY;
var distance = Math.sqrt(Math.pow(a.dX, 2) + Math.pow(a.dY, 2));
if (!a.hasDragged) a.hasDragged = (a.type != 'image' && distance > 0)
|| (distance > (hs.dragSensitivity || 5));
if (a.hasDragged && e.clientX > 5 && e.clientY > 5) {
if (a.type == 'resize') exp.resize(a);
else {
exp.moveTo(a.left + a.dX, a.top + a.dY);
if (a.type == 'image') exp.content.style.cursor = 'move';
}
}
return false;
},
wrapperMouseHandler : function (e) {
try {
if (!e) e = window.event;
var over = /mouseover/i.test(e.type);
if (!e.target) e.target = e.srcElement; // ie
if (hs.ie) e.relatedTarget =
over ? e.fromElement : e.toElement; // ie
var exp = hs.getExpander(e.target);
if (!exp.isExpanded) return;
if (!exp || !e.relatedTarget || hs.getExpander(e.relatedTarget, true) == exp
|| hs.dragArgs) return;
for (var i = 0; i < exp.overlays.length; i++) (function() {
var o = hs.$('hsId'+ exp.overlays[i]);
if (o && o.hideOnMouseOut) {
if (over) hs.setStyles(o, { visibility: 'visible', display: '' });
hs.animate(o, { opacity: over ? o.opacity : 0 }, o.dur);
}
})();
} catch (e) {}
},
addEventListener : function (el, event, func) {
if (el == document && event == 'ready') hs.push(hs.onReady, func);
try {
el.addEventListener(event, func, false);
} catch (e) {
try {
el.detachEvent('on'+ event, func);
el.attachEvent('on'+ event, func);
} catch (e) {
el['on'+ event] = func;
}
}
},
removeEventListener : function (el, event, func) {
try {
el.removeEventListener(event, func, false);
} catch (e) {
try {
el.detachEvent('on'+ event, func);
} catch (e) {
el['on'+ event] = null;
}
}
},
preloadFullImage : function (i) {
if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') {
var img = document.createElement('img');
img.onload = function() {
img = null;
hs.preloadFullImage(i + 1);
};
img.src = hs.preloadTheseImages[i];
}
},
preloadImages : function (number) {
if (number && typeof number != 'object') hs.numberOfImagesToPreload = number;
var arr = hs.getAnchors();
for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) {
hs.push(hs.preloadTheseImages, hs.getSrc(arr.images[i]));
}
// preload outlines
if (hs.outlineType) new hs.Outline(hs.outlineType, function () { hs.preloadFullImage(0)} );
else
hs.preloadFullImage(0);
// preload cursor
if (hs.restoreCursor) var cur = hs.createElement('img', { src: hs.graphicsDir + hs.restoreCursor });
},
init : function () {
if (!hs.container) {
hs.getPageSize();
hs.ieLt7 = hs.ie && hs.uaVersion < 7;
for (var x in hs.langDefaults) {
if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x];
else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined')
hs.lang[x] = hs.langDefaults[x];
}
hs.container = hs.createElement('div', {
className: 'highslide-container'
}, {
position: 'absolute',
left: 0,
top: 0,
width: '100%',
zIndex: hs.zIndexCounter,
direction: 'ltr'
},
document.body,
true
);
hs.loading = hs.createElement('a', {
className: 'highslide-loading',
title: hs.lang.loadingTitle,
innerHTML: hs.lang.loadingText,
href: 'javascript:;'
}, {
position: 'absolute',
top: '-9999px',
opacity: hs.loadingOpacity,
zIndex: 1
}, hs.container
);
hs.garbageBin = hs.createElement('div', null, { display: 'none' }, hs.container);
// http://www.robertpenner.com/easing/
Math.linearTween = function (t, b, c, d) {
return c*t/d + b;
};
Math.easeInQuad = function (t, b, c, d) {
return c*(t/=d)*t + b;
};
hs.hideSelects = hs.ieLt7;
hs.hideIframes = ((window.opera && hs.uaVersion < 9) || navigator.vendor == 'KDE'
|| (hs.ie && hs.uaVersion < 5.5));
}
},
ready : function() {
if (hs.isReady) return;
hs.isReady = true;
for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i]();
},
updateAnchors : function() {
var el, els, all = [], images = [],groups = {}, re;
for (var i = 0; i < hs.openerTagNames.length; i++) {
els = document.getElementsByTagName(hs.openerTagNames[i]);
for (var j = 0; j < els.length; j++) {
el = els[j];
re = hs.isHsAnchor(el);
if (re) {
hs.push(all, el);
if (re[0] == 'hs.expand') hs.push(images, el);
var g = hs.getParam(el, 'slideshowGroup') || 'none';
if (!groups[g]) groups[g] = [];
hs.push(groups[g], el);
}
}
}
hs.anchors = { all: all, groups: groups, images: images };
return hs.anchors;
},
getAnchors : function() {
return hs.anchors || hs.updateAnchors();
},
close : function(el) {
var exp = hs.getExpander(el);
if (exp) exp.close();
return false;
}
}; // end hs object
hs.fx = function( elem, options, prop ){
this.options = options;
this.elem = elem;
this.prop = prop;
if (!options.orig) options.orig = {};
};
hs.fx.prototype = {
update: function(){
(hs.fx.step[this.prop] || hs.fx.step._default)(this);
if (this.options.step)
this.options.step.call(this.elem, this.now, this);
},
custom: function(from, to, unit){
this.startTime = (new Date()).getTime();
this.start = from;
this.end = to;
this.unit = unit;// || this.unit || "px";
this.now = this.start;
this.pos = this.state = 0;
var self = this;
function t(gotoEnd){
return self.step(gotoEnd);
}
t.elem = this.elem;
if ( t() && hs.timers.push(t) == 1 ) {
hs.timerId = setInterval(function(){
var timers = hs.timers;
for ( var i = 0; i < timers.length; i++ )
if ( !timers[i]() )
timers.splice(i--, 1);
if ( !timers.length ) {
clearInterval(hs.timerId);
}
}, 13);
}
},
step: function(gotoEnd){
var t = (new Date()).getTime();
if ( gotoEnd || t >= this.options.duration + this.startTime ) {
this.now = this.end;
this.pos = this.state = 1;
this.update();
this.options.curAnim[ this.prop ] = true;
var done = true;
for ( var i in this.options.curAnim )
if ( this.options.curAnim[i] !== true )
done = false;
if ( done ) {
if (this.options.complete) this.options.complete.call(this.elem);
}
return false;
} else {
var n = t - this.startTime;
this.state = n / this.options.duration;
this.pos = this.options.easing(n, 0, 1, this.options.duration);
this.now = this.start + ((this.end - this.start) * this.pos);
this.update();
}
return true;
}
};
hs.extend( hs.fx, {
step: {
opacity: function(fx){
hs.setStyles(fx.elem, { opacity: fx.now });
},
_default: function(fx){
try {
if ( fx.elem.style && fx.elem.style[ fx.prop ] != null )
fx.elem.style[ fx.prop ] = fx.now + fx.unit;
else
fx.elem[ fx.prop ] = fx.now;
} catch (e) {}
}
}
});
hs.Outline = function (outlineType, onLoad) {
this.onLoad = onLoad;
this.outlineType = outlineType;
var v = hs.uaVersion, tr;
this.hasAlphaImageLoader = hs.ie && v >= 5.5 && v < 7;
if (!outlineType) {
if (onLoad) onLoad();
return;
}
hs.init();
this.table = hs.createElement(
'table', {
cellSpacing: 0
}, {
visibility: 'hidden',
position: 'absolute',
borderCollapse: 'collapse',
width: 0
},
hs.container,
true
);
var tbody = hs.createElement('tbody', null, null, this.table, 1);
this.td = [];
for (var i = 0; i <= 8; i++) {
if (i % 3 == 0) tr = hs.createElement('tr', null, { height: 'auto' }, tbody, true);
this.td[i] = hs.createElement('td', null, null, tr, true);
var style = i != 4 ? { lineHeight: 0, fontSize: 0} : { position : 'relative' };
hs.setStyles(this.td[i], style);
}
this.td[4].className = outlineType +' highslide-outline';
this.preloadGraphic();
};
hs.Outline.prototype = {
preloadGraphic : function () {
var src = hs.graphicsDir + (hs.outlinesDir || "outlines/")+ this.outlineType +".png";
var appendTo = hs.safari ? hs.container : null;
this.graphic = hs.createElement('img', null, { position: 'absolute',
top: '-9999px' }, appendTo, true); // for onload trigger
var pThis = this;
this.graphic.onload = function() { pThis.onGraphicLoad(); };
this.graphic.src = src;
},
onGraphicLoad : function () {
var o = this.offset = this.graphic.width / 4,
pos = [[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],
dim = { height: (2*o) +'px', width: (2*o) +'px' };
for (var i = 0; i <= 8; i++) {
if (pos[i]) {
if (this.hasAlphaImageLoader) {
var w = (i == 1 || i == 7) ? '100%' : this.graphic.width +'px';
var div = hs.createElement('div', null, { width: '100%', height: '100%', position: 'relative', overflow: 'hidden'}, this.td[i], true);
hs.createElement ('div', null, {
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+ this.graphic.src + "')",
position: 'absolute',
width: w,
height: this.graphic.height +'px',
left: (pos[i][0]*o)+'px',
top: (pos[i][1]*o)+'px'
},
div,
true);
} else {
hs.setStyles(this.td[i], { background: 'url('+ this.graphic.src +') '+ (pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'});
}
if (window.opera && (i == 3 || i ==5))
hs.createElement('div', null, dim, this.td[i], true);
hs.setStyles (this.td[i], dim);
}
}
this.graphic = null;
if (hs.pendingOutlines[this.outlineType]) hs.pendingOutlines[this.outlineType].destroy();
hs.pendingOutlines[this.outlineType] = this;
if (this.onLoad) this.onLoad();
},
setPosition : function (pos, offset, vis, dur, easing) {
var exp = this.exp,
stl = exp.wrapper.style,
offset = offset || 0,
pos = pos || {
x: exp.x.pos + offset,
y: exp.y.pos + offset,
w: exp.x.get('wsize') - 2 * offset,
h: exp.y.get('wsize') - 2 * offset
};
if (vis) this.table.style.visibility = (pos.h >= 4 * this.offset)
? 'visible' : 'hidden';
hs.setStyles(this.table, {
left: (pos.x - this.offset) +'px',
top: (pos.y - this.offset) +'px',
width: (pos.w + 2 * this.offset) +'px'
});
pos.w -= 2 * this.offset;
pos.h -= 2 * this.offset;
hs.setStyles (this.td[4], {
width: pos.w >= 0 ? pos.w +'px' : 0,
height: pos.h >= 0 ? pos.h +'px' : 0
});
if (this.hasAlphaImageLoader) this.td[3].style.height
= this.td[5].style.height = this.td[4].style.height;
},
destroy : function(hide) {
if (hide) this.table.style.visibility = 'hidden';
else hs.discardElement(this.table);
}
};
hs.Dimension = function(exp, dim) {
this.exp = exp;
this.dim = dim;
this.ucwh = dim == 'x' ? 'Width' : 'Height';
this.wh = this.ucwh.toLowerCase();
this.uclt = dim == 'x' ? 'Left' : 'Top';
this.lt = this.uclt.toLowerCase();
this.ucrb = dim == 'x' ? 'Right' : 'Bottom';
this.rb = this.ucrb.toLowerCase();
this.p1 = this.p2 = 0;
};
hs.Dimension.prototype = {
get : function(key) {
switch (key) {
case 'loadingPos':
return this.tpos + this.tb + (this.t - hs.loading['offset'+ this.ucwh]) / 2;
case 'wsize':
return this.size + 2 * this.cb + this.p1 + this.p2;
case 'fitsize':
return this.clientSize - this.marginMin - this.marginMax;
case 'maxsize':
return this.get('fitsize') - 2 * this.cb - this.p1 - this.p2 ;
case 'opos':
return this.pos - (this.exp.outline ? this.exp.outline.offset : 0);
case 'osize':
return this.get('wsize') + (this.exp.outline ? 2*this.exp.outline.offset : 0);
case 'imgPad':
return this.imgSize ? Math.round((this.size - this.imgSize) / 2) : 0;
}
},
calcBorders: function() {
// correct for borders
this.cb = (this.exp.content['offset'+ this.ucwh] - this.t) / 2;
this.marginMax = hs['margin'+ this.ucrb];
},
calcThumb: function() {
this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) :
this.exp.el['offset'+ this.ucwh];
this.tpos = this.exp.tpos[this.dim];
this.tb = (this.exp.el['offset'+ this.ucwh] - this.t) / 2;
if (this.tpos == 0 || this.tpos == -1) {
this.tpos = (hs.page[this.wh] / 2) + hs.page['scroll'+ this.uclt];
};
},
calcExpanded: function() {
var exp = this.exp;
this.justify = 'auto';
// size and position
this.pos = this.tpos - this.cb + this.tb;
if (this.maxHeight && this.dim == 'x')
exp.maxWidth = Math.min(exp.maxWidth || this.full, exp.maxHeight * this.full / exp.y.full);
this.size = Math.min(this.full, exp['max'+ this.ucwh] || this.full);
this.minSize = exp.allowSizeReduction ?
Math.min(exp['min'+ this.ucwh], this.full) :this.full;
if (exp.isImage && exp.useBox) {
this.size = exp[this.wh];
this.imgSize = this.full;
}
if (this.dim == 'x' && hs.padToMinWidth) this.minSize = exp.minWidth;
this.marginMin = hs['margin'+ this.uclt];
this.scroll = hs.page['scroll'+ this.uclt];
this.clientSize = hs.page[this.wh];
},
setSize: function(i) {
var exp = this.exp;
if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
this.imgSize = i;
this.size = Math.max(this.size, this.imgSize);
exp.content.style[this.lt] = this.get('imgPad')+'px';
} else
this.size = i;
exp.content.style[this.wh] = i +'px';
exp.wrapper.style[this.wh] = this.get('wsize') +'px';
if (exp.outline) exp.outline.setPosition();
if (this.dim == 'x' && exp.overlayBox) exp.sizeOverlayBox(true);
},
setPos: function(i) {
this.pos = i;
this.exp.wrapper.style[this.lt] = i +'px';
if (this.exp.outline) this.exp.outline.setPosition();
}
};
hs.Expander = function(a, params, custom, contentType) {
if (document.readyState && hs.ie && !hs.isReady) {
hs.addEventListener(document, 'ready', function() {
new hs.Expander(a, params, custom, contentType);
});
return;
}
this.a = a;
this.custom = custom;
this.contentType = contentType || 'image';
this.isImage = !this.isHtml;
hs.continuePreloading = false;
this.overlays = [];
hs.init();
var key = this.key = hs.expanders.length;
// override inline parameters
for (var i = 0; i < hs.overrides.length; i++) {
var name = hs.overrides[i];
this[name] = params && typeof params[name] != 'undefined' ?
params[name] : hs[name];
}
if (!this.src) this.src = a.href;
// get thumb
var el = (params && params.thumbnailId) ? hs.$(params.thumbnailId) : a;
el = this.thumb = el.getElementsByTagName('img')[0] || el;
this.thumbsUserSetId = el.id || a.id;
// check if already open
for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && hs.expanders[i].a == a) {
hs.expanders[i].focus();
return false;
}
}
// cancel other
if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) {
hs.expanders[i].cancelLoading();
}
}
hs.expanders[key] = this;
if (!hs.allowMultipleInstances && !hs.upcoming) {
if (hs.expanders[key-1]) hs.expanders[key-1].close();
if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey])
hs.expanders[hs.focusKey].close();
}
// initiate metrics
this.el = el;
this.tpos = hs.getPosition(el);
hs.getPageSize();
var x = this.x = new hs.Dimension(this, 'x');
x.calcThumb();
var y = this.y = new hs.Dimension(this, 'y');
y.calcThumb();
this.wrapper = hs.createElement(
'div', {
id: 'highslide-wrapper-'+ this.key,
className: 'highslide-wrapper '+ this.wrapperClassName
}, {
visibility: 'hidden',
position: 'absolute',
zIndex: hs.zIndexCounter += 2
}, null, true );
this.wrapper.onmouseover = this.wrapper.onmouseout = hs.wrapperMouseHandler;
if (this.contentType == 'image' && this.outlineWhileAnimating == 2)
this.outlineWhileAnimating = 0;
// get the outline
if (!this.outlineType) {
this[this.contentType +'Create']();
} else if (hs.pendingOutlines[this.outlineType]) {
this.connectOutline();
this[this.contentType +'Create']();
} else {
this.showLoading();
var exp = this;
new hs.Outline(this.outlineType,
function () {
exp.connectOutline();
exp[exp.contentType +'Create']();
}
);
}
return true;
};
hs.Expander.prototype = {
error : function(e) {
// alert ('Line '+ e.lineNumber +': '+ e.message);
window.location.href = this.src;
},
connectOutline : function() {
var outline = this.outline = hs.pendingOutlines[this.outlineType];
outline.exp = this;
outline.table.style.zIndex = this.wrapper.style.zIndex - 1;
hs.pendingOutlines[this.outlineType] = null;
},
showLoading : function() {
if (this.onLoadStarted || this.loading) return;
this.loading = hs.loading;
var exp = this;
this.loading.onclick = function() {
exp.cancelLoading();
};
var exp = this,
l = this.x.get('loadingPos') +'px',
t = this.y.get('loadingPos') +'px';
setTimeout(function () {
if (exp.loading) hs.setStyles(exp.loading, { left: l, top: t, zIndex: hs.zIndexCounter++ })}
, 100);
},
imageCreate : function() {
var exp = this;
var img = document.createElement('img');
this.content = img;
img.onload = function () {
if (hs.expanders[exp.key]) exp.contentLoaded();
};
if (hs.blockRightClick) img.oncontextmenu = function() { return false; };
img.className = 'highslide-image';
hs.setStyles(img, {
visibility: 'hidden',
display: 'block',
position: 'absolute',
maxWidth: '9999px',
zIndex: 3
});
img.title = hs.lang.restoreTitle;
if (hs.safari) hs.container.appendChild(img);
if (hs.ie && hs.flushImgSize) img.src = null;
img.src = this.src;
this.showLoading();
},
contentLoaded : function() {
try {
if (!this.content) return;
this.content.onload = null;
if (this.onLoadStarted) return;
else this.onLoadStarted = true;
var x = this.x, y = this.y;
if (this.loading) {
hs.setStyles(this.loading, { top: '-9999px' });
this.loading = null;
}
x.full = this.content.width;
y.full = this.content.height;
hs.setStyles(this.content, {
width: x.t +'px',
height: y.t +'px'
});
this.wrapper.appendChild(this.content);
hs.container.appendChild(this.wrapper);
x.calcBorders();
y.calcBorders();
hs.setStyles (this.wrapper, {
left: (x.tpos + x.tb - x.cb) +'px',
top: (y.tpos + x.tb - y.cb) +'px'
});
this.getOverlays();
var ratio = x.full / y.full;
x.calcExpanded();
this.justify(x);
y.calcExpanded();
this.justify(y);
if (this.overlayBox) this.sizeOverlayBox(0, 1);
if (this.allowSizeReduction) {
this.correctRatio(ratio);
if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
this.createFullExpand();
if (this.overlays.length == 1) this.sizeOverlayBox();
}
}
this.show();
} catch (e) {
this.error(e);
}
},
justify : function (p, moveOnly) {
var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
var hasMovedMin = false;
var allowReduce = p.exp.allowSizeReduction;
p.pos = Math.round(p.pos - ((p.get('wsize') - p.t) / 2));
if (p.pos < p.scroll + p.marginMin) {
p.pos = p.scroll + p.marginMin;
hasMovedMin = true;
}
if (!moveOnly && p.size < p.minSize) {
p.size = p.minSize;
allowReduce = false;
}
if (p.pos + p.get('wsize') > p.scroll + p.clientSize - p.marginMax) {
if (!moveOnly && hasMovedMin && allowReduce) {
p.size = Math.min(p.size, p.get(dim == 'y' ? 'fitsize' : 'maxsize'));
} else if (p.get('wsize') < p.get('fitsize')) {
p.pos = p.scroll + p.clientSize - p.marginMax - p.get('wsize');
} else { // image larger than viewport
p.pos = p.scroll + p.marginMin;
if (!moveOnly && allowReduce) p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize');
}
}
if (!moveOnly && p.size < p.minSize) {
p.size = p.minSize;
allowReduce = false;
}
if (p.pos < p.marginMin) {
var tmpMin = p.pos;
p.pos = p.marginMin;
if (allowReduce && !moveOnly) p.size = p.size - (p.pos - tmpMin);
}
},
correctRatio : function(ratio) {
var x = this.x,
y = this.y,
changed = false,
xSize = Math.min(x.full, x.size),
ySize = Math.min(y.full, y.size),
useBox = (this.useBox || hs.padToMinWidth);
if (xSize / ySize > ratio) { // width greater
xSize = ySize * ratio;
if (xSize < x.minSize) { // below minWidth
xSize = x.minSize;
ySize = xSize / ratio;
}
changed = true;
} else if (xSize / ySize < ratio) { // height greater
ySize = xSize / ratio;
changed = true;
}
if (hs.padToMinWidth && x.full < x.minSize) {
x.imgSize = x.full;
y.size = y.imgSize = y.full;
} else if (this.useBox) {
x.imgSize = xSize;
y.imgSize = ySize;
} else {
x.size = xSize;
y.size = ySize;
}
changed = this.fitOverlayBox(useBox ? null : ratio, changed);
if (useBox && y.size < y.imgSize) {
y.imgSize = y.size;
x.imgSize = y.size * ratio;
}
if (changed || useBox) {
x.pos = x.tpos - x.cb + x.tb;
x.minSize = x.size;
this.justify(x, true);
y.pos = y.tpos - y.cb + y.tb;
y.minSize = y.size;
this.justify(y, true);
if (this.overlayBox) this.sizeOverlayBox();
}
},
fitOverlayBox : function(ratio, changed) {
var x = this.x, y = this.y;
if (this.overlayBox) {
while (y.size > this.minHeight && x.size > this.minWidth
&& y.get('wsize') > y.get('fitsize')) {
y.size -= 10;
if (ratio) x.size = y.size * ratio;
this.sizeOverlayBox(0, 1);
changed = true;
}
}
return changed;
},
show : function () {
var x = this.x, y = this.y;
this.doShowHide('hidden');
// Apply size change
this.changeSize(
1, {
wrapper: {
width : x.get('wsize'),
height : y.get('wsize'),
left: x.pos,
top: y.pos
},
content: {
left: x.p1 + x.get('imgPad'),
top: y.p1 + y.get('imgPad'),
width:x.imgSize ||x.size,
height:y.imgSize ||y.size
}
},
hs.expandDuration
);
},
changeSize : function(up, to, dur) {
if (this.outline && !this.outlineWhileAnimating) {
if (up) this.outline.setPosition();
else this.outline.destroy();
}
if (!up) this.destroyOverlays();
var exp = this,
x = exp.x,
y = exp.y,
easing = this.easing;
if (!up) easing = this.easingClose || easing;
var after = up ?
function() {
if (exp.outline) exp.outline.table.style.visibility = "visible";
setTimeout(function() {
exp.afterExpand();
}, 50);
} :
function() {
exp.afterClose();
};
if (up) hs.setStyles( this.wrapper, {
width: x.t +'px',
height: y.t +'px'
});
if (this.fadeInOut) {
hs.setStyles(this.wrapper, { opacity: up ? 0 : 1 });
hs.extend(to.wrapper, { opacity: up });
}
hs.animate( this.wrapper, to.wrapper, {
duration: dur,
easing: easing,
step: function(val, args) {
if (exp.outline && exp.outlineWhileAnimating && args.prop == 'top') {
var fac = up ? args.pos : 1 - args.pos;
var pos = {
w: x.t + (x.get('wsize') - x.t) * fac,
h: y.t + (y.get('wsize') - y.t) * fac,
x: x.tpos + (x.pos - x.tpos) * fac,
y: y.tpos + (y.pos - y.tpos) * fac
};
exp.outline.setPosition(pos, 0, 1);
}
}
});
hs.animate( this.content, to.content, dur, easing, after);
if (up) {
this.wrapper.style.visibility = 'visible';
this.content.style.visibility = 'visible';
this.a.className += ' highslide-active-anchor';
}
},
afterExpand : function() {
this.isExpanded = true;
this.focus();
if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null;
this.prepareNextOutline();
var p = hs.page, mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop;
this.mouseIsOver = this.x.pos < mX && mX < this.x.pos + this.x.get('wsize')
&& this.y.pos < mY && mY < this.y.pos + this.y.get('wsize');
if (this.overlayBox) this.showOverlays();
},
prepareNextOutline : function() {
var key = this.key;
var outlineType = this.outlineType;
new hs.Outline(outlineType,
function () { try { hs.expanders[key].preloadNext(); } catch (e) {} });
},
preloadNext : function() {
var next = this.getAdjacentAnchor(1);
if (next && next.onclick.toString().match(/hs\.expand/))
var img = hs.createElement('img', { src: hs.getSrc(next) });
},
getAdjacentAnchor : function(op) {
var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none'];
/*< ? if ($cfg->slideshow) : ?>s*/
if (!as[current + op] && this.slideshow && this.slideshow.repeat) {
if (op == 1) return as[0];
else if (op == -1) return as[as.length-1];
}
/*< ? endif ?>s*/
return as[current + op] || null;
},
getAnchorIndex : function() {
var arr = hs.getAnchors().groups[this.slideshowGroup || 'none'];
if (arr) for (var i = 0; i < arr.length; i++) {
if (arr[i] == this.a) return i;
}
return null;
},
cancelLoading : function() {
hs.discardElement (this.wrapper);
hs.expanders[this.key] = null;
if (this.loading) hs.loading.style.left = '-9999px';
},
writeCredits : function () {
this.credits = hs.createElement('a', {
href: hs.creditsHref,
target: hs.creditsTarget,
className: 'highslide-credits',
innerHTML: hs.lang.creditsText,
title: hs.lang.creditsTitle
});
this.createOverlay({
overlayId: this.credits,
position: this.creditsPosition || 'top left'
});
},
getInline : function(types, addOverlay) {
for (var i = 0; i < types.length; i++) {
var type = types[i], s = null;
if (!this[type +'Id'] && this.thumbsUserSetId)
this[type +'Id'] = type +'-for-'+ this.thumbsUserSetId;
if (this[type +'Id']) this[type] = hs.getNode(this[type +'Id']);
if (!this[type] && !this[type +'Text'] && this[type +'Eval']) try {
s = eval(this[type +'Eval']);
} catch (e) {}
if (!this[type] && this[type +'Text']) {
s = this[type +'Text'];
}
if (!this[type] && !s) {
this[type] = hs.getNode(this.a['_'+ type + 'Id']);
if (!this[type]) {
var next = this.a.nextSibling;
while (next && !hs.isHsAnchor(next)) {
if ((new RegExp('highslide-'+ type)).test(next.className || null)) {
if (!next.id) this.a['_'+ type + 'Id'] = next.id = 'hsId'+ hs.idCounter++;
this[type] = hs.getNode(next.id);
break;
}
next = next.nextSibling;
}
}
}
if (!this[type] && s) this[type] = hs.createElement('div',
{ className: 'highslide-'+ type, innerHTML: s } );
if (addOverlay && this[type]) {
var o = { position: (type == 'heading') ? 'above' : 'below' };
for (var x in this[type+'Overlay']) o[x] = this[type+'Overlay'][x];
o.overlayId = this[type];
this.createOverlay(o);
}
}
},
// on end move and resize
doShowHide : function(visibility) {
if (hs.hideSelects) this.showHideElements('SELECT', visibility);
if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
if (hs.geckoMac) this.showHideElements('*', visibility);
},
showHideElements : function (tagName, visibility) {
var els = document.getElementsByTagName(tagName);
var prop = tagName == '*' ? 'overflow' : 'visibility';
for (var i = 0; i < els.length; i++) {
if (prop == 'visibility' || (document.defaultView.getComputedStyle(
els[i], "").getPropertyValue('overflow') == 'auto'
|| els[i].getAttribute('hidden-by') != null)) {
var hiddenBy = els[i].getAttribute('hidden-by');
if (visibility == 'visible' && hiddenBy) {
hiddenBy = hiddenBy.replace('['+ this.key +']', '');
els[i].setAttribute('hidden-by', hiddenBy);
if (!hiddenBy) els[i].style[prop] = els[i].origProp;
} else if (visibility == 'hidden') { // hide if behind
var elPos = hs.getPosition(els[i]);
elPos.w = els[i].offsetWidth;
elPos.h = els[i].offsetHeight;
var clearsX = (elPos.x + elPos.w < this.x.get('opos')
|| elPos.x > this.x.get('opos') + this.x.get('osize'));
var clearsY = (elPos.y + elPos.h < this.y.get('opos')
|| elPos.y > this.y.get('opos') + this.y.get('osize'));
var wrapperKey = hs.getWrapperKey(els[i]);
if (!clearsX && !clearsY && wrapperKey != this.key) { // element falls behind image
if (!hiddenBy) {
els[i].setAttribute('hidden-by', '['+ this.key +']');
els[i].origProp = els[i].style[prop];
els[i].style[prop] = 'hidden';
} else if (hiddenBy.indexOf('['+ this.key +']') == -1) {
els[i].setAttribute('hidden-by', hiddenBy + '['+ this.key +']');
}
} else if ((hiddenBy == '['+ this.key +']' || hs.focusKey == wrapperKey)
&& wrapperKey != this.key) { // on move
els[i].setAttribute('hidden-by', '');
els[i].style[prop] = els[i].origProp || '';
} else if (hiddenBy && hiddenBy.indexOf('['+ this.key +']') > -1) {
els[i].setAttribute('hidden-by', hiddenBy.replace('['+ this.key +']', ''));
}
}
}
}
},
focus : function() {
this.wrapper.style.zIndex = hs.zIndexCounter += 2;
// blur others
for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && i == hs.focusKey) {
var blurExp = hs.expanders[i];
blurExp.content.className += ' highslide-'+ blurExp.contentType +'-blur';
blurExp.content.style.cursor = hs.ie ? 'hand' : 'pointer';
blurExp.content.title = hs.lang.focusTitle;
}
}
// focus this
if (this.outline) this.outline.table.style.zIndex
= this.wrapper.style.zIndex - 1;
this.content.className = 'highslide-'+ this.contentType;
this.content.title = hs.lang.restoreTitle;
if (hs.restoreCursor) {
hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ hs.graphicsDir + hs.restoreCursor +'), pointer';
if (hs.ie && hs.uaVersion < 6) hs.styleRestoreCursor = 'hand';
this.content.style.cursor = hs.styleRestoreCursor;
}
hs.focusKey = this.key;
hs.addEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
},
moveTo: function(x, y) {
this.x.setPos(x);
this.y.setPos(y);
},
resize : function (e) {
var w, h, r = e.width / e.height;
w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full));
if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full;
h = w / r;
if (h < Math.min(this.minHeight, this.y.full)) {
h = Math.min(this.minHeight, this.y.full);
if (this.isImage) w = h * r;
}
this.resizeTo(w, h);
},
resizeTo: function(w, h) {
this.y.setSize(h);
this.x.setSize(w);
this.wrapper.style.height = this.y.get('wsize') +'px';
},
close : function() {
if (this.isClosing || !this.isExpanded) return;
this.isClosing = true;
hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
try {
this.content.style.cursor = 'default';
this.changeSize(
0, {
wrapper: {
width : this.x.t,
height : this.y.t,
left: this.x.tpos - this.x.cb + this.x.tb,
top: this.y.tpos - this.y.cb + this.y.tb
},
content: {
left: 0,
top: 0,
width: this.x.t,
height: this.y.t
}
}, hs.restoreDuration
);
} catch (e) { this.afterClose(); }
},
createOverlay : function (o) {
var el = o.overlayId;
if (typeof el == 'string') el = hs.getNode(el);
if (o.html) el = hs.createElement('div', { innerHTML: o.html });
if (!el || typeof el == 'string') return;
el.style.display = 'block';
this.genOverlayBox();
var width = o.width && /^[0-9]+(px|%)$/.test(o.width) ? o.width : 'auto';
if (/^(left|right)panel$/.test(o.position) && !/^[0-9]+px$/.test(o.width)) width = '200px';
var overlay = hs.createElement(
'div', {
id: 'hsId'+ hs.idCounter++,
hsId: o.hsId
}, {
position: 'absolute',
visibility: 'hidden',
width: width,
direction: hs.lang.cssDirection || '',
opacity: 0
},this.overlayBox,
true
);
overlay.appendChild(el);
hs.extend(overlay, {
opacity: 1,
offsetX: 0,
offsetY: 0,
dur: (o.fade === 0 || o.fade === false || (o.fade == 2 && hs.ie)) ? 0 : 250
});
hs.extend(overlay, o);
if (this.gotOverlays) {
this.positionOverlay(overlay);
if (!overlay.hideOnMouseOut || this.mouseIsOver)
hs.animate(overlay, { opacity: overlay.opacity }, overlay.dur);
}
hs.push(this.overlays, hs.idCounter - 1);
},
positionOverlay : function(overlay) {
var p = overlay.position || 'middle center',
offX = overlay.offsetX,
offY = overlay.offsetY;
if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
if (/left$/.test(p)) overlay.style.left = offX +'px';
if (/center$/.test(p)) hs.setStyles (overlay, {
left: '50%',
marginLeft: (offX - Math.round(overlay.offsetWidth / 2)) +'px'
});
if (/right$/.test(p)) overlay.style.right = - offX +'px';
if (/^leftpanel$/.test(p)) {
hs.setStyles(overlay, {
right: '100%',
marginRight: this.x.cb +'px',
top: - this.y.cb +'px',
bottom: - this.y.cb +'px',
overflow: 'auto'
});
this.x.p1 = overlay.offsetWidth;
} else if (/^rightpanel$/.test(p)) {
hs.setStyles(overlay, {
left: '100%',
marginLeft: this.x.cb +'px',
top: - this.y.cb +'px',
bottom: - this.y.cb +'px',
overflow: 'auto'
});
this.x.p2 = overlay.offsetWidth;
}
if (/^top/.test(p)) overlay.style.top = offY +'px';
if (/^middle/.test(p)) hs.setStyles (overlay, {
top: '50%',
marginTop: (offY - Math.round(overlay.offsetHeight / 2)) +'px'
});
if (/^bottom/.test(p)) overlay.style.bottom = - offY +'px';
if (/^above$/.test(p)) {
hs.setStyles(overlay, {
left: (- this.x.p1 - this.x.cb) +'px',
right: (- this.x.p2 - this.x.cb) +'px',
bottom: '100%',
marginBottom: this.y.cb +'px',
width: 'auto'
});
this.y.p1 = overlay.offsetHeight;
} else if (/^below$/.test(p)) {
hs.setStyles(overlay, {
position: 'relative',
left: (- this.x.p1 - this.x.cb) +'px',
right: (- this.x.p2 - this.x.cb) +'px',
top: '100%',
marginTop: this.y.cb +'px',
width: 'auto'
});
this.y.p2 = overlay.offsetHeight;
overlay.style.position = 'absolute';
}
},
getOverlays : function() {
this.getInline(['heading', 'caption'], true);
if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move';
if (hs.showCredits) this.writeCredits();
for (var i = 0; i < hs.overlays.length; i++) {
var o = hs.overlays[i], tId = o.thumbnailId, sg = o.slideshowGroup;
if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
|| (sg && sg === this.slideshowGroup)) {
this.createOverlay(o);
}
}
var os = [];
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
if (/panel$/.test(o.position)) this.positionOverlay(o);
else hs.push(os, o);
}
for (var i = 0; i < os.length; i++) this.positionOverlay(os[i]);
this.gotOverlays = true;
},
genOverlayBox : function() {
if (!this.overlayBox) this.overlayBox = hs.createElement (
'div', {
className: this.wrapperClassName
}, {
position : 'absolute',
width: (this.x.size || (this.useBox ? this.width : null)
|| this.x.full) +'px',
height: (this.y.size || this.y.full) +'px',
visibility : 'hidden',
overflow : 'hidden',
zIndex : hs.ie ? 4 : 'auto'
},
hs.container,
true
);
},
sizeOverlayBox : function(doWrapper, doPanels) {
var overlayBox = this.overlayBox,
x = this.x,
y = this.y;
hs.setStyles( overlayBox, {
width: x.size +'px',
height: y.size +'px'
});
if (doWrapper || doPanels) {
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
var ie6 = (hs.ieLt7 || document.compatMode == 'BackCompat');
if (o && /^(above|below)$/.test(o.position)) {
if (ie6) {
o.style.width = (overlayBox.offsetWidth + 2 * x.cb
+ x.p1 + x.p2) +'px';
}
y[o.position == 'above' ? 'p1' : 'p2'] = o.offsetHeight;
}
if (o && ie6 && /^(left|right)panel$/.test(o.position)) {
o.style.height = (overlayBox.offsetHeight + 2* y.cb) +'px';
}
}
}
if (doWrapper) {
hs.setStyles(this.content, {
top: y.p1 +'px'
});
hs.setStyles(overlayBox, {
top: (y.p1 + y.cb) +'px'
});
}
},
showOverlays : function() {
var b = this.overlayBox;
b.className = '';
hs.setStyles(b, {
top: (this.y.p1 + this.y.cb) +'px',
left: (this.x.p1 + this.x.cb) +'px',
overflow : 'visible'
});
if (hs.safari) b.style.visibility = 'visible';
this.wrapper.appendChild (b);
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
o.style.zIndex = 4;
if (!o.hideOnMouseOut || this.mouseIsOver) {
o.style.visibility = 'visible';
hs.setStyles(o, { visibility: 'visible', display: '' });
hs.animate(o, { opacity: o.opacity }, o.dur);
}
}
},
destroyOverlays : function() {
if (!this.overlays.length) return;
hs.discardElement(this.overlayBox);
},
createFullExpand : function () {
this.fullExpandLabel = hs.createElement(
'a', {
href: 'javascript:hs.expanders['+ this.key +'].doFullExpand();',
title: hs.lang.fullExpandTitle,
className: 'highslide-full-expand'
}
);
this.createOverlay({
overlayId: this.fullExpandLabel,
position: hs.fullExpandPosition,
hideOnMouseOut: true,
opacity: hs.fullExpandOpacity
});
},
doFullExpand : function () {
try {
if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel);
this.focus();
var xSize = this.x.size;
this.resizeTo(this.x.full, this.y.full);
var xpos = this.x.pos - (this.x.size - xSize) / 2;
if (xpos < hs.marginLeft) xpos = hs.marginLeft;
this.moveTo(xpos, this.y.pos);
this.doShowHide('hidden');
} catch (e) {
this.error(e);
}
},
afterClose : function () {
this.a.className = this.a.className.replace('highslide-active-anchor', '');
this.doShowHide('visible');
if (this.outline && this.outlineWhileAnimating) this.outline.destroy();
hs.discardElement(this.wrapper);
hs.expanders[this.key] = null;
hs.reOrder();
}
};
hs.langDefaults = hs.lang;
// history
var HsExpander = hs.Expander;
if (hs.ie) {
(function () {
try {
document.documentElement.doScroll('left');
} catch (e) {
setTimeout(arguments.callee, 50);
return;
}
hs.ready();
})();
}
hs.addEventListener(document, 'DOMContentLoaded', hs.ready);
hs.addEventListener(window, 'load', hs.ready);
// set handlers
hs.addEventListener(document, 'ready', function() {
if (hs.expandCursor) {
var style = hs.createElement('style', { type: 'text/css' }, null,
document.getElementsByTagName('HEAD')[0]);
function addRule(sel, dec) {
if (!hs.ie) {
style.appendChild(document.createTextNode(sel + " {" + dec + "}"));
} else {
var last = document.styleSheets[document.styleSheets.length - 1];
if (typeof(last.addRule) == "object") last.addRule(sel, dec);
}
}
function fix(prop) {
return 'expression( ( ( ignoreMe = document.documentElement.'+ prop +
' ? document.documentElement.'+ prop +' : document.body.'+ prop +' ) ) + \'px\' );';
}
if (hs.expandCursor) addRule ('.highslide img',
'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;');
}
});
hs.addEventListener(window, 'resize', function() {
hs.getPageSize();
});
hs.addEventListener(document, 'mousemove', function(e) {
hs.mouse = { x: e.clientX, y: e.clientY };
});
hs.addEventListener(document, 'mousedown', hs.mouseClickHandler);
hs.addEventListener(document, 'mouseup', hs.mouseClickHandler);
hs.addEventListener(document, 'ready', hs.getAnchors);
hs.addEventListener(window, 'load', hs.preloadImages);
} | 123gohelmetsv2 | trunk/js/highslide/highslide.js | JavaScript | asf20 | 52,901 |
/******************************************************************************
Name: Highslide JS
Version: 4.1.8 (October 27 2009)
Config: default +events +unobtrusive +imagemap +slideshow +positioning +transitions +viewport +thumbstrip +inline +ajax +iframe +flash
Author: Torstein Hønsi
Support: http://highslide.com/support
Licence:
Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5
License (http://creativecommons.org/licenses/by-nc/2.5/).
You are free:
* to copy, distribute, display, and perform the work
* to make derivative works
Under the following conditions:
* Attribution. You must attribute the work in the manner specified by the
author or licensor.
* Noncommercial. You may not use this work for commercial purposes.
* For any reuse or distribution, you must make clear to others the license
terms of this work.
* Any of these conditions can be waived if you get permission from the
copyright holder.
Your fair use and other rights are in no way affected by the above.
******************************************************************************/
if (!hs) { var hs = {
// Language strings
lang : {
cssDirection: 'ltr',
loadingText : 'Loading...',
loadingTitle : 'Click to cancel',
focusTitle : 'Click to bring to front',
fullExpandTitle : 'Expand to actual size (f)',
creditsText : 'Powered by <i>Highslide JS</i>',
creditsTitle : 'Go to the Highslide JS homepage',
previousText : 'Previous',
nextText : 'Next',
moveText : 'Move',
closeText : 'Close',
closeTitle : 'Close (esc)',
resizeTitle : 'Resize',
playText : 'Play',
playTitle : 'Play slideshow (spacebar)',
pauseText : 'Pause',
pauseTitle : 'Pause slideshow (spacebar)',
previousTitle : 'Previous (arrow left)',
nextTitle : 'Next (arrow right)',
moveTitle : 'Move',
fullExpandText : '1:1',
number: 'Image %1 of %2',
restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.'
},
// See http://highslide.com/ref for examples of settings
graphicsDir : 'highslide/graphics/',
expandCursor : 'zoomin.cur', // null disables
restoreCursor : 'zoomout.cur', // null disables
expandDuration : 250, // milliseconds
restoreDuration : 250,
marginLeft : 15,
marginRight : 15,
marginTop : 15,
marginBottom : 15,
zIndexCounter : 1001, // adjust to other absolutely positioned elements
loadingOpacity : 0.75,
allowMultipleInstances: true,
numberOfImagesToPreload : 5,
outlineWhileAnimating : 2, // 0 = never, 1 = always, 2 = HTML only
outlineStartOffset : 3, // ends at 10
padToMinWidth : false, // pad the popup width to make room for wide caption
fullExpandPosition : 'bottom right',
fullExpandOpacity : 1,
showCredits : true, // you can set this to false if you want
creditsHref : 'http://highslide.com/',
creditsTarget : '_self',
enableKeyListener : true,
openerTagNames : ['a', 'area'], // Add more to allow slideshow indexing
transitions : [],
transitionDuration: 250,
dimmingOpacity: 0, // Lightbox style dimming background
dimmingDuration: 50, // 0 for instant dimming
allowWidthReduction : false,
allowHeightReduction : true,
preserveContent : true, // Preserve changes made to the content and position of HTML popups.
objectLoadTime : 'before', // Load iframes 'before' or 'after' expansion.
cacheAjax : true, // Cache ajax popups for instant display. Can be overridden for each popup.
anchor : 'auto', // where the image expands from
align : 'auto', // position in the client (overrides anchor)
targetX: null, // the id of a target element
targetY: null,
dragByHeading: true,
minWidth: 200,
minHeight: 200,
allowSizeReduction: true, // allow the image to reduce to fit client size. If false, this overrides minWidth and minHeight
outlineType : 'drop-shadow', // set null to disable outlines
skin : {
controls:
'<div class="highslide-controls"><ul>'+
'<li class="highslide-previous">'+
'<a href="#" title="{hs.lang.previousTitle}">'+
'<span>{hs.lang.previousText}</span></a>'+
'</li>'+
'<li class="highslide-play">'+
'<a href="#" title="{hs.lang.playTitle}">'+
'<span>{hs.lang.playText}</span></a>'+
'</li>'+
'<li class="highslide-pause">'+
'<a href="#" title="{hs.lang.pauseTitle}">'+
'<span>{hs.lang.pauseText}</span></a>'+
'</li>'+
'<li class="highslide-next">'+
'<a href="#" title="{hs.lang.nextTitle}">'+
'<span>{hs.lang.nextText}</span></a>'+
'</li>'+
'<li class="highslide-move">'+
'<a href="#" title="{hs.lang.moveTitle}">'+
'<span>{hs.lang.moveText}</span></a>'+
'</li>'+
'<li class="highslide-full-expand">'+
'<a href="#" title="{hs.lang.fullExpandTitle}">'+
'<span>{hs.lang.fullExpandText}</span></a>'+
'</li>'+
'<li class="highslide-close">'+
'<a href="#" title="{hs.lang.closeTitle}" >'+
'<span>{hs.lang.closeText}</span></a>'+
'</li>'+
'</ul></div>'
,
contentWrapper:
'<div class="highslide-header"><ul>'+
'<li class="highslide-previous">'+
'<a href="#" title="{hs.lang.previousTitle}" onclick="return hs.previous(this)">'+
'<span>{hs.lang.previousText}</span></a>'+
'</li>'+
'<li class="highslide-next">'+
'<a href="#" title="{hs.lang.nextTitle}" onclick="return hs.next(this)">'+
'<span>{hs.lang.nextText}</span></a>'+
'</li>'+
'<li class="highslide-move">'+
'<a href="#" title="{hs.lang.moveTitle}" onclick="return false">'+
'<span>{hs.lang.moveText}</span></a>'+
'</li>'+
'<li class="highslide-close">'+
'<a href="#" title="{hs.lang.closeTitle}" onclick="return hs.close(this)">'+
'<span>{hs.lang.closeText}</span></a>'+
'</li>'+
'</ul></div>'+
'<div class="highslide-body"></div>'+
'<div class="highslide-footer"><div>'+
'<span class="highslide-resize" title="{hs.lang.resizeTitle}"><span></span></span>'+
'</div></div>'
},
// END OF YOUR SETTINGS
// declare internal properties
preloadTheseImages : [],
continuePreloading: true,
expanders : [],
overrides : [
'allowSizeReduction',
'useBox',
'anchor',
'align',
'targetX',
'targetY',
'outlineType',
'outlineWhileAnimating',
'captionId',
'captionText',
'captionEval',
'captionOverlay',
'headingId',
'headingText',
'headingEval',
'headingOverlay',
'creditsPosition',
'dragByHeading',
'autoplay',
'numberPosition',
'transitions',
'dimmingOpacity',
'width',
'height',
'contentId',
'allowWidthReduction',
'allowHeightReduction',
'preserveContent',
'maincontentId',
'maincontentText',
'maincontentEval',
'objectType',
'cacheAjax',
'objectWidth',
'objectHeight',
'objectLoadTime',
'swfOptions',
'wrapperClassName',
'minWidth',
'minHeight',
'maxWidth',
'maxHeight',
'slideshowGroup',
'easing',
'easingClose',
'fadeInOut',
'src'
],
overlays : [],
idCounter : 0,
oPos : {
x: ['leftpanel', 'left', 'center', 'right', 'rightpanel'],
y: ['above', 'top', 'middle', 'bottom', 'below']
},
mouse: {},
headingOverlay: {},
captionOverlay: {},
swfOptions: { flashvars: {}, params: {}, attributes: {} },
timers : [],
slideshows : [],
pendingOutlines : {},
sleeping : [],
preloadTheseAjax : [],
cacheBindings : [],
cachedGets : {},
clones : {},
onReady: [],
uaVersion: /Trident\/4\.0/.test(navigator.userAgent) ? 8 :
parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]),
ie : (document.all && !window.opera),
safari : /Safari/.test(navigator.userAgent),
geckoMac : /Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),
$ : function (id) {
if (id) return document.getElementById(id);
},
push : function (arr, val) {
arr[arr.length] = val;
},
createElement : function (tag, attribs, styles, parent, nopad) {
var el = document.createElement(tag);
if (attribs) hs.extend(el, attribs);
if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0});
if (styles) hs.setStyles(el, styles);
if (parent) parent.appendChild(el);
return el;
},
extend : function (el, attribs) {
for (var x in attribs) el[x] = attribs[x];
return el;
},
setStyles : function (el, styles) {
for (var x in styles) {
if (hs.ie && x == 'opacity') {
if (styles[x] > 0.99) el.style.removeAttribute('filter');
else el.style.filter = 'alpha(opacity='+ (styles[x] * 100) +')';
}
else el.style[x] = styles[x];
}
},
animate: function(el, prop, opt) {
var start,
end,
unit;
if (typeof opt != 'object' || opt === null) {
var args = arguments;
opt = {
duration: args[2],
easing: args[3],
complete: args[4]
};
}
if (typeof opt.duration != 'number') opt.duration = 250;
opt.easing = Math[opt.easing] || Math.easeInQuad;
opt.curAnim = hs.extend({}, prop);
for (var name in prop) {
var e = new hs.fx(el, opt , name );
start = parseFloat(hs.css(el, name)) || 0;
end = parseFloat(prop[name]);
unit = name != 'opacity' ? 'px' : '';
e.custom( start, end, unit );
}
},
css: function(el, prop) {
if (document.defaultView) {
return document.defaultView.getComputedStyle(el, null).getPropertyValue(prop);
} else {
if (prop == 'opacity') prop = 'filter';
var val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b){ return b.toUpperCase(); })];
if (prop == 'filter')
val = val.replace(/alpha\(opacity=([0-9]+)\)/,
function (a, b) { return b / 100 });
return val === '' ? 1 : val;
}
},
getPageSize : function () {
var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat'
? d.documentElement : d.body;
var width = hs.ie ? iebody.clientWidth :
(d.documentElement.clientWidth || self.innerWidth),
height = hs.ie ? iebody.clientHeight : self.innerHeight;
hs.page = {
width: width,
height: height,
scrollLeft: hs.ie ? iebody.scrollLeft : pageXOffset,
scrollTop: hs.ie ? iebody.scrollTop : pageYOffset
}
},
getPosition : function(el) {
if (/area/i.test(el.tagName)) {
var imgs = document.getElementsByTagName('img');
for (var i = 0; i < imgs.length; i++) {
var u = imgs[i].useMap;
if (u && u.replace(/^.*?#/, '') == el.parentNode.name) {
el = imgs[i];
break;
}
}
}
var p = { x: el.offsetLeft, y: el.offsetTop };
while (el.offsetParent) {
el = el.offsetParent;
p.x += el.offsetLeft;
p.y += el.offsetTop;
if (el != document.body && el != document.documentElement) {
p.x -= el.scrollLeft;
p.y -= el.scrollTop;
}
}
return p;
},
expand : function(a, params, custom, type) {
if (!a) a = hs.createElement('a', null, { display: 'none' }, hs.container);
if (typeof a.getParams == 'function') return params;
if (type == 'html') {
for (var i = 0; i < hs.sleeping.length; i++) {
if (hs.sleeping[i] && hs.sleeping[i].a == a) {
hs.sleeping[i].awake();
hs.sleeping[i] = null;
return false;
}
}
hs.hasHtmlExpanders = true;
}
try {
new hs.Expander(a, params, custom, type);
return false;
} catch (e) { return true; }
},
htmlExpand : function(a, params, custom) {
return hs.expand(a, params, custom, 'html');
},
getSelfRendered : function() {
return hs.createElement('div', {
className: 'highslide-html-content',
innerHTML: hs.replaceLang(hs.skin.contentWrapper)
});
},
getElementByClass : function (el, tagName, className) {
var els = el.getElementsByTagName(tagName);
for (var i = 0; i < els.length; i++) {
if ((new RegExp(className)).test(els[i].className)) {
return els[i];
}
}
return null;
},
replaceLang : function(s) {
s = s.replace(/\s/g, ' ');
var re = /{hs\.lang\.([^}]+)\}/g,
matches = s.match(re),
lang;
if (matches) for (var i = 0; i < matches.length; i++) {
lang = matches[i].replace(re, "$1");
if (typeof hs.lang[lang] != 'undefined') s = s.replace(matches[i], hs.lang[lang]);
}
return s;
},
setClickEvents : function () {
var els = document.getElementsByTagName('a');
for (var i = 0; i < els.length; i++) {
var type = hs.isUnobtrusiveAnchor(els[i]);
if (type && !els[i].hsHasSetClick) {
(function(){
var t = type;
if (hs.fireEvent(hs, 'onSetClickEvent', { element: els[i], type: t })) {
els[i].onclick =(type == 'image') ?function() { return hs.expand(this) }:
function() { return hs.htmlExpand(this, { objectType: t } );};
}
})();
els[i].hsHasSetClick = true;
}
}
hs.getAnchors();
},
isUnobtrusiveAnchor: function(el) {
if (el.rel == 'highslide') return 'image';
else if (el.rel == 'highslide-ajax') return 'ajax';
else if (el.rel == 'highslide-iframe') return 'iframe';
else if (el.rel == 'highslide-swf') return 'swf';
},
getCacheBinding : function (a) {
for (var i = 0; i < hs.cacheBindings.length; i++) {
if (hs.cacheBindings[i][0] == a) {
var c = hs.cacheBindings[i][1];
hs.cacheBindings[i][1] = c.cloneNode(1);
return c;
}
}
return null;
},
preloadAjax : function (e) {
var arr = hs.getAnchors();
for (var i = 0; i < arr.htmls.length; i++) {
var a = arr.htmls[i];
if (hs.getParam(a, 'objectType') == 'ajax' && hs.getParam(a, 'cacheAjax'))
hs.push(hs.preloadTheseAjax, a);
}
hs.preloadAjaxElement(0);
},
preloadAjaxElement : function (i) {
if (!hs.preloadTheseAjax[i]) return;
var a = hs.preloadTheseAjax[i];
var cache = hs.getNode(hs.getParam(a, 'contentId'));
if (!cache) cache = hs.getSelfRendered();
var ajax = new hs.Ajax(a, cache, 1);
ajax.onError = function () { };
ajax.onLoad = function () {
hs.push(hs.cacheBindings, [a, cache]);
hs.preloadAjaxElement(i + 1);
};
ajax.run();
},
focusTopmost : function() {
var topZ = 0,
topmostKey = -1,
expanders = hs.expanders,
exp,
zIndex;
for (var i = 0; i < expanders.length; i++) {
exp = expanders[i];
if (exp) {
zIndex = exp.wrapper.style.zIndex;
if (zIndex && zIndex > topZ) {
topZ = zIndex;
topmostKey = i;
}
}
}
if (topmostKey == -1) hs.focusKey = -1;
else expanders[topmostKey].focus();
},
getParam : function (a, param) {
a.getParams = a.onclick;
var p = a.getParams ? a.getParams() : null;
a.getParams = null;
return (p && typeof p[param] != 'undefined') ? p[param] :
(typeof hs[param] != 'undefined' ? hs[param] : null);
},
getSrc : function (a) {
var src = hs.getParam(a, 'src');
if (src) return src;
return a.href;
},
getNode : function (id) {
var node = hs.$(id), clone = hs.clones[id], a = {};
if (!node && !clone) return null;
if (!clone) {
clone = node.cloneNode(true);
clone.id = '';
hs.clones[id] = clone;
return node;
} else {
return clone.cloneNode(true);
}
},
discardElement : function(d) {
if (d) hs.garbageBin.appendChild(d);
hs.garbageBin.innerHTML = '';
},
dim : function(exp) {
if (!hs.dimmer) {
hs.dimmer = hs.createElement ('div', {
className: 'highslide-dimming highslide-viewport-size',
owner: '',
onclick: function() {
if (hs.fireEvent(hs, 'onDimmerClick'))
hs.close();
}
}, {
visibility: 'visible',
opacity: 0
}, hs.container, true);
}
hs.dimmer.style.display = '';
hs.dimmer.owner += '|'+ exp.key;
if (hs.geckoMac && hs.dimmingGeckoFix)
hs.setStyles(hs.dimmer, {
background: 'url('+ hs.graphicsDir + 'geckodimmer.png)',
opacity: 1
});
else
hs.animate(hs.dimmer, { opacity: exp.dimmingOpacity }, hs.dimmingDuration);
},
undim : function(key) {
if (!hs.dimmer) return;
if (typeof key != 'undefined') hs.dimmer.owner = hs.dimmer.owner.replace('|'+ key, '');
if (
(typeof key != 'undefined' && hs.dimmer.owner != '')
|| (hs.upcoming && hs.getParam(hs.upcoming, 'dimmingOpacity'))
) return;
if (hs.geckoMac && hs.dimmingGeckoFix) hs.dimmer.style.display = 'none';
else hs.animate(hs.dimmer, { opacity: 0 }, hs.dimmingDuration, null, function() {
hs.dimmer.style.display = 'none';
});
},
transit : function (adj, exp) {
var last = exp = exp || hs.getExpander();
if (hs.upcoming) return false;
else hs.last = last;
try {
hs.upcoming = adj;
adj.onclick();
} catch (e){
hs.last = hs.upcoming = null;
}
try {
if (!adj || exp.transitions[1] != 'crossfade')
exp.close();
} catch (e) {}
return false;
},
previousOrNext : function (el, op) {
var exp = hs.getExpander(el);
if (exp) return hs.transit(exp.getAdjacentAnchor(op), exp);
else return false;
},
previous : function (el) {
return hs.previousOrNext(el, -1);
},
next : function (el) {
return hs.previousOrNext(el, 1);
},
keyHandler : function(e) {
if (!e) e = window.event;
if (!e.target) e.target = e.srcElement; // ie
if (typeof e.target.form != 'undefined') return true; // form element has focus
if (!hs.fireEvent(hs, 'onKeyDown', e)) return true;
var exp = hs.getExpander();
var op = null;
switch (e.keyCode) {
case 70: // f
if (exp) exp.doFullExpand();
return true;
case 32: // Space
op = 2;
break;
case 34: // Page Down
case 39: // Arrow right
case 40: // Arrow down
op = 1;
break;
case 8: // Backspace
case 33: // Page Up
case 37: // Arrow left
case 38: // Arrow up
op = -1;
break;
case 27: // Escape
case 13: // Enter
op = 0;
}
if (op !== null) {if (op != 2)hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
if (!hs.enableKeyListener) return true;
if (e.preventDefault) e.preventDefault();
else e.returnValue = false;
if (exp) {
if (op == 0) {
exp.close();
} else if (op == 2) {
if (exp.slideshow) exp.slideshow.hitSpace();
} else {
if (exp.slideshow) exp.slideshow.pause();
hs.previousOrNext(exp.key, op);
}
return false;
}
}
return true;
},
registerOverlay : function (overlay) {
hs.push(hs.overlays, hs.extend(overlay, { hsId: 'hsId'+ hs.idCounter++ } ));
},
addSlideshow : function (options) {
var sg = options.slideshowGroup;
if (typeof sg == 'object') {
for (var i = 0; i < sg.length; i++) {
var o = {};
for (var x in options) o[x] = options[x];
o.slideshowGroup = sg[i];
hs.push(hs.slideshows, o);
}
} else {
hs.push(hs.slideshows, options);
}
},
getWrapperKey : function (element, expOnly) {
var el, re = /^highslide-wrapper-([0-9]+)$/;
// 1. look in open expanders
el = element;
while (el.parentNode) {
if (el.hsKey !== undefined) return el.hsKey;
if (el.id && re.test(el.id)) return el.id.replace(re, "$1");
el = el.parentNode;
}
// 2. look in thumbnail
if (!expOnly) {
el = element;
while (el.parentNode) {
if (el.tagName && hs.isHsAnchor(el)) {
for (var key = 0; key < hs.expanders.length; key++) {
var exp = hs.expanders[key];
if (exp && exp.a == el) return key;
}
}
el = el.parentNode;
}
}
return null;
},
getExpander : function (el, expOnly) {
if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null;
if (typeof el == 'number') return hs.expanders[el] || null;
if (typeof el == 'string') el = hs.$(el);
return hs.expanders[hs.getWrapperKey(el, expOnly)] || null;
},
isHsAnchor : function (a) {
return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/));
},
reOrder : function () {
for (var i = 0; i < hs.expanders.length; i++)
if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost();
},
fireEvent : function (obj, evt, args) {
return obj && obj[evt] ? (obj[evt](obj, args) !== false) : true;
},
mouseClickHandler : function(e)
{
if (!e) e = window.event;
if (e.button > 1) return true;
if (!e.target) e.target = e.srcElement;
var el = e.target;
while (el.parentNode
&& !(/highslide-(image|move|html|resize)/.test(el.className)))
{
el = el.parentNode;
}
var exp = hs.getExpander(el);
if (exp && (exp.isClosing || !exp.isExpanded)) return true;
if (exp && e.type == 'mousedown') {
if (e.target.form) return true;
var match = el.className.match(/highslide-(image|move|resize)/);
if (match) {
hs.dragArgs = {
exp: exp ,
type: match[1],
left: exp.x.pos,
width: exp.x.size,
top: exp.y.pos,
height: exp.y.size,
clickX: e.clientX,
clickY: e.clientY
};
hs.addEventListener(document, 'mousemove', hs.dragHandler);
if (e.preventDefault) e.preventDefault(); // FF
if (/highslide-(image|html)-blur/.test(exp.content.className)) {
exp.focus();
hs.hasFocused = true;
}
return false;
}
else if (/highslide-html/.test(el.className) && hs.focusKey != exp.key) {
exp.focus();
exp.doShowHide('hidden');
}
} else if (e.type == 'mouseup') {
hs.removeEventListener(document, 'mousemove', hs.dragHandler);
if (hs.dragArgs) {
if (hs.styleRestoreCursor && hs.dragArgs.type == 'image')
hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor;
var hasDragged = hs.dragArgs.hasDragged;
if (!hasDragged &&!hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) {
if (hs.fireEvent(exp, 'onImageClick'))
exp.close();
}
else if (hasDragged || (!hasDragged && hs.hasHtmlExpanders)) {
hs.dragArgs.exp.doShowHide('hidden');
}
if (hs.dragArgs.exp.releaseMask)
hs.dragArgs.exp.releaseMask.style.display = 'none';
if (hasDragged) hs.fireEvent(hs.dragArgs.exp, 'onDrop', hs.dragArgs);
hs.hasFocused = false;
hs.dragArgs = null;
} else if (/highslide-image-blur/.test(el.className)) {
el.style.cursor = hs.styleRestoreCursor;
}
}
return false;
},
dragHandler : function(e)
{
if (!hs.dragArgs) return true;
if (!e) e = window.event;
var a = hs.dragArgs, exp = a.exp;
if (exp.iframe) {
if (!exp.releaseMask) exp.releaseMask = hs.createElement('div', null,
{ position: 'absolute', width: exp.x.size+'px', height: exp.y.size+'px',
left: exp.x.cb+'px', top: exp.y.cb+'px', zIndex: 4, background: (hs.ie ? 'white' : 'none'),
opacity: .01 },
exp.wrapper, true);
if (exp.releaseMask.style.display == 'none')
exp.releaseMask.style.display = '';
}
a.dX = e.clientX - a.clickX;
a.dY = e.clientY - a.clickY;
var distance = Math.sqrt(Math.pow(a.dX, 2) + Math.pow(a.dY, 2));
if (!a.hasDragged) a.hasDragged = (a.type != 'image' && distance > 0)
|| (distance > (hs.dragSensitivity || 5));
if (a.hasDragged && e.clientX > 5 && e.clientY > 5) {
if (!hs.fireEvent(exp, 'onDrag', a)) return false;
if (a.type == 'resize') exp.resize(a);
else {
exp.moveTo(a.left + a.dX, a.top + a.dY);
if (a.type == 'image') exp.content.style.cursor = 'move';
}
}
return false;
},
wrapperMouseHandler : function (e) {
try {
if (!e) e = window.event;
var over = /mouseover/i.test(e.type);
if (!e.target) e.target = e.srcElement; // ie
if (hs.ie) e.relatedTarget =
over ? e.fromElement : e.toElement; // ie
var exp = hs.getExpander(e.target);
if (!exp.isExpanded) return;
if (!exp || !e.relatedTarget || hs.getExpander(e.relatedTarget, true) == exp
|| hs.dragArgs) return;
hs.fireEvent(exp, over ? 'onMouseOver' : 'onMouseOut', e);
for (var i = 0; i < exp.overlays.length; i++) (function() {
var o = hs.$('hsId'+ exp.overlays[i]);
if (o && o.hideOnMouseOut) {
if (over) hs.setStyles(o, { visibility: 'visible', display: '' });
hs.animate(o, { opacity: over ? o.opacity : 0 }, o.dur);
}
})();
} catch (e) {}
},
addEventListener : function (el, event, func) {
if (el == document && event == 'ready') hs.push(hs.onReady, func);
try {
el.addEventListener(event, func, false);
} catch (e) {
try {
el.detachEvent('on'+ event, func);
el.attachEvent('on'+ event, func);
} catch (e) {
el['on'+ event] = func;
}
}
},
removeEventListener : function (el, event, func) {
try {
el.removeEventListener(event, func, false);
} catch (e) {
try {
el.detachEvent('on'+ event, func);
} catch (e) {
el['on'+ event] = null;
}
}
},
preloadFullImage : function (i) {
if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') {
var img = document.createElement('img');
img.onload = function() {
img = null;
hs.preloadFullImage(i + 1);
};
img.src = hs.preloadTheseImages[i];
}
},
preloadImages : function (number) {
if (number && typeof number != 'object') hs.numberOfImagesToPreload = number;
var arr = hs.getAnchors();
for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) {
hs.push(hs.preloadTheseImages, hs.getSrc(arr.images[i]));
}
// preload outlines
if (hs.outlineType) new hs.Outline(hs.outlineType, function () { hs.preloadFullImage(0)} );
else
hs.preloadFullImage(0);
// preload cursor
if (hs.restoreCursor) var cur = hs.createElement('img', { src: hs.graphicsDir + hs.restoreCursor });
},
init : function () {
if (!hs.container) {
hs.getPageSize();
hs.ieLt7 = hs.ie && hs.uaVersion < 7;
hs.ie6SSL = hs.ieLt7 && location.protocol == 'https:';
for (var x in hs.langDefaults) {
if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x];
else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined')
hs.lang[x] = hs.langDefaults[x];
}
hs.container = hs.createElement('div', {
className: 'highslide-container'
}, {
position: 'absolute',
left: 0,
top: 0,
width: '100%',
zIndex: hs.zIndexCounter,
direction: 'ltr'
},
document.body,
true
);
hs.loading = hs.createElement('a', {
className: 'highslide-loading',
title: hs.lang.loadingTitle,
innerHTML: hs.lang.loadingText,
href: 'javascript:;'
}, {
position: 'absolute',
top: '-9999px',
opacity: hs.loadingOpacity,
zIndex: 1
}, hs.container
);
hs.garbageBin = hs.createElement('div', null, { display: 'none' }, hs.container);
hs.viewport = hs.createElement('div', {
className: 'highslide-viewport highslide-viewport-size'
}, {
visibility: (hs.safari && hs.uaVersion < 525) ? 'visible' : 'hidden'
}, hs.container, 1
);
hs.clearing = hs.createElement('div', null,
{ clear: 'both', paddingTop: '1px' }, null, true);
// http://www.robertpenner.com/easing/
Math.linearTween = function (t, b, c, d) {
return c*t/d + b;
};
Math.easeInQuad = function (t, b, c, d) {
return c*(t/=d)*t + b;
};
Math.easeOutQuad = function (t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
};
hs.hideSelects = hs.ieLt7;
hs.hideIframes = ((window.opera && hs.uaVersion < 9) || navigator.vendor == 'KDE'
|| (hs.ie && hs.uaVersion < 5.5));
hs.fireEvent(this, 'onActivate');
}
},
ready : function() {
if (hs.isReady) return;
hs.isReady = true;
for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i]();
},
updateAnchors : function() {
var el, els, all = [], images = [], htmls = [],groups = {}, re;
for (var i = 0; i < hs.openerTagNames.length; i++) {
els = document.getElementsByTagName(hs.openerTagNames[i]);
for (var j = 0; j < els.length; j++) {
el = els[j];
re = hs.isHsAnchor(el);
if (re) {
hs.push(all, el);
if (re[0] == 'hs.expand') hs.push(images, el);
else if (re[0] == 'hs.htmlExpand') hs.push(htmls, el);
var g = hs.getParam(el, 'slideshowGroup') || 'none';
if (!groups[g]) groups[g] = [];
hs.push(groups[g], el);
}
}
}
hs.anchors = { all: all, groups: groups, images: images, htmls: htmls };
return hs.anchors;
},
getAnchors : function() {
return hs.anchors || hs.updateAnchors();
},
close : function(el) {
var exp = hs.getExpander(el);
if (exp) exp.close();
return false;
}
}; // end hs object
hs.fx = function( elem, options, prop ){
this.options = options;
this.elem = elem;
this.prop = prop;
if (!options.orig) options.orig = {};
};
hs.fx.prototype = {
update: function(){
(hs.fx.step[this.prop] || hs.fx.step._default)(this);
if (this.options.step)
this.options.step.call(this.elem, this.now, this);
},
custom: function(from, to, unit){
this.startTime = (new Date()).getTime();
this.start = from;
this.end = to;
this.unit = unit;// || this.unit || "px";
this.now = this.start;
this.pos = this.state = 0;
var self = this;
function t(gotoEnd){
return self.step(gotoEnd);
}
t.elem = this.elem;
if ( t() && hs.timers.push(t) == 1 ) {
hs.timerId = setInterval(function(){
var timers = hs.timers;
for ( var i = 0; i < timers.length; i++ )
if ( !timers[i]() )
timers.splice(i--, 1);
if ( !timers.length ) {
clearInterval(hs.timerId);
}
}, 13);
}
},
step: function(gotoEnd){
var t = (new Date()).getTime();
if ( gotoEnd || t >= this.options.duration + this.startTime ) {
this.now = this.end;
this.pos = this.state = 1;
this.update();
this.options.curAnim[ this.prop ] = true;
var done = true;
for ( var i in this.options.curAnim )
if ( this.options.curAnim[i] !== true )
done = false;
if ( done ) {
if (this.options.complete) this.options.complete.call(this.elem);
}
return false;
} else {
var n = t - this.startTime;
this.state = n / this.options.duration;
this.pos = this.options.easing(n, 0, 1, this.options.duration);
this.now = this.start + ((this.end - this.start) * this.pos);
this.update();
}
return true;
}
};
hs.extend( hs.fx, {
step: {
opacity: function(fx){
hs.setStyles(fx.elem, { opacity: fx.now });
},
_default: function(fx){
try {
if ( fx.elem.style && fx.elem.style[ fx.prop ] != null )
fx.elem.style[ fx.prop ] = fx.now + fx.unit;
else
fx.elem[ fx.prop ] = fx.now;
} catch (e) {}
}
}
});
hs.Outline = function (outlineType, onLoad) {
this.onLoad = onLoad;
this.outlineType = outlineType;
var v = hs.uaVersion, tr;
this.hasAlphaImageLoader = hs.ie && v >= 5.5 && v < 7;
if (!outlineType) {
if (onLoad) onLoad();
return;
}
hs.init();
this.table = hs.createElement(
'table', {
cellSpacing: 0
}, {
visibility: 'hidden',
position: 'absolute',
borderCollapse: 'collapse',
width: 0
},
hs.container,
true
);
var tbody = hs.createElement('tbody', null, null, this.table, 1);
this.td = [];
for (var i = 0; i <= 8; i++) {
if (i % 3 == 0) tr = hs.createElement('tr', null, { height: 'auto' }, tbody, true);
this.td[i] = hs.createElement('td', null, null, tr, true);
var style = i != 4 ? { lineHeight: 0, fontSize: 0} : { position : 'relative' };
hs.setStyles(this.td[i], style);
}
this.td[4].className = outlineType +' highslide-outline';
this.preloadGraphic();
};
hs.Outline.prototype = {
preloadGraphic : function () {
var src = hs.graphicsDir + (hs.outlinesDir || "outlines/")+ this.outlineType +".png";
var appendTo = hs.safari ? hs.container : null;
this.graphic = hs.createElement('img', null, { position: 'absolute',
top: '-9999px' }, appendTo, true); // for onload trigger
var pThis = this;
this.graphic.onload = function() { pThis.onGraphicLoad(); };
this.graphic.src = src;
},
onGraphicLoad : function () {
var o = this.offset = this.graphic.width / 4,
pos = [[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],
dim = { height: (2*o) +'px', width: (2*o) +'px' };
for (var i = 0; i <= 8; i++) {
if (pos[i]) {
if (this.hasAlphaImageLoader) {
var w = (i == 1 || i == 7) ? '100%' : this.graphic.width +'px';
var div = hs.createElement('div', null, { width: '100%', height: '100%', position: 'relative', overflow: 'hidden'}, this.td[i], true);
hs.createElement ('div', null, {
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+ this.graphic.src + "')",
position: 'absolute',
width: w,
height: this.graphic.height +'px',
left: (pos[i][0]*o)+'px',
top: (pos[i][1]*o)+'px'
},
div,
true);
} else {
hs.setStyles(this.td[i], { background: 'url('+ this.graphic.src +') '+ (pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'});
}
if (window.opera && (i == 3 || i ==5))
hs.createElement('div', null, dim, this.td[i], true);
hs.setStyles (this.td[i], dim);
}
}
this.graphic = null;
if (hs.pendingOutlines[this.outlineType]) hs.pendingOutlines[this.outlineType].destroy();
hs.pendingOutlines[this.outlineType] = this;
if (this.onLoad) this.onLoad();
},
setPosition : function (pos, offset, vis, dur, easing) {
var exp = this.exp,
stl = exp.wrapper.style,
offset = offset || 0,
pos = pos || {
x: exp.x.pos + offset,
y: exp.y.pos + offset,
w: exp.x.get('wsize') - 2 * offset,
h: exp.y.get('wsize') - 2 * offset
};
if (vis) this.table.style.visibility = (pos.h >= 4 * this.offset)
? 'visible' : 'hidden';
hs.setStyles(this.table, {
left: (pos.x - this.offset) +'px',
top: (pos.y - this.offset) +'px',
width: (pos.w + 2 * this.offset) +'px'
});
pos.w -= 2 * this.offset;
pos.h -= 2 * this.offset;
hs.setStyles (this.td[4], {
width: pos.w >= 0 ? pos.w +'px' : 0,
height: pos.h >= 0 ? pos.h +'px' : 0
});
if (this.hasAlphaImageLoader) this.td[3].style.height
= this.td[5].style.height = this.td[4].style.height;
},
destroy : function(hide) {
if (hide) this.table.style.visibility = 'hidden';
else hs.discardElement(this.table);
}
};
hs.Dimension = function(exp, dim) {
this.exp = exp;
this.dim = dim;
this.ucwh = dim == 'x' ? 'Width' : 'Height';
this.wh = this.ucwh.toLowerCase();
this.uclt = dim == 'x' ? 'Left' : 'Top';
this.lt = this.uclt.toLowerCase();
this.ucrb = dim == 'x' ? 'Right' : 'Bottom';
this.rb = this.ucrb.toLowerCase();
this.p1 = this.p2 = 0;
};
hs.Dimension.prototype = {
get : function(key) {
switch (key) {
case 'loadingPos':
return this.tpos + this.tb + (this.t - hs.loading['offset'+ this.ucwh]) / 2;
case 'loadingPosXfade':
return this.pos + this.cb+ this.p1 + (this.size - hs.loading['offset'+ this.ucwh]) / 2;
case 'wsize':
return this.size + 2 * this.cb + this.p1 + this.p2;
case 'fitsize':
return this.clientSize - this.marginMin - this.marginMax;
case 'maxsize':
return this.get('fitsize') - 2 * this.cb - this.p1 - this.p2 ;
case 'opos':
return this.pos - (this.exp.outline ? this.exp.outline.offset : 0);
case 'osize':
return this.get('wsize') + (this.exp.outline ? 2*this.exp.outline.offset : 0);
case 'imgPad':
return this.imgSize ? Math.round((this.size - this.imgSize) / 2) : 0;
}
},
calcBorders: function() {
// correct for borders
this.cb = (this.exp.content['offset'+ this.ucwh] - this.t) / 2;
this.marginMax = hs['margin'+ this.ucrb];
},
calcThumb: function() {
this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) :
this.exp.el['offset'+ this.ucwh];
this.tpos = this.exp.tpos[this.dim];
this.tb = (this.exp.el['offset'+ this.ucwh] - this.t) / 2;
if (this.tpos == 0 || this.tpos == -1) {
this.tpos = (hs.page[this.wh] / 2) + hs.page['scroll'+ this.uclt];
};
},
calcExpanded: function() {
var exp = this.exp;
this.justify = 'auto';
// get alignment
if (exp.align == 'center') this.justify = 'center';
else if (new RegExp(this.lt).test(exp.anchor)) this.justify = null;
else if (new RegExp(this.rb).test(exp.anchor)) this.justify = 'max';
// size and position
this.pos = this.tpos - this.cb + this.tb;
if (this.maxHeight && this.dim == 'x')
exp.maxWidth = Math.min(exp.maxWidth || this.full, exp.maxHeight * this.full / exp.y.full);
this.size = Math.min(this.full, exp['max'+ this.ucwh] || this.full);
this.minSize = exp.allowSizeReduction ?
Math.min(exp['min'+ this.ucwh], this.full) :this.full;
if (exp.isImage && exp.useBox) {
this.size = exp[this.wh];
this.imgSize = this.full;
}
if (this.dim == 'x' && hs.padToMinWidth) this.minSize = exp.minWidth;
this.target = exp['target'+ this.dim.toUpperCase()];
this.marginMin = hs['margin'+ this.uclt];
this.scroll = hs.page['scroll'+ this.uclt];
this.clientSize = hs.page[this.wh];
},
setSize: function(i) {
var exp = this.exp;
if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
this.imgSize = i;
this.size = Math.max(this.size, this.imgSize);
exp.content.style[this.lt] = this.get('imgPad')+'px';
} else
this.size = i;
exp.content.style[this.wh] = i +'px';
exp.wrapper.style[this.wh] = this.get('wsize') +'px';
if (exp.outline) exp.outline.setPosition();
if (exp.releaseMask) exp.releaseMask.style[this.wh] = i +'px';
if (this.dim == 'y' && exp.iDoc && exp.body.style.height != 'auto') try {
exp.iDoc.body.style.overflow = 'auto';
} catch (e) {}
if (exp.isHtml) {
var d = exp.scrollerDiv;
if (this.sizeDiff === undefined)
this.sizeDiff = exp.innerContent['offset'+ this.ucwh] - d['offset'+ this.ucwh];
d.style[this.wh] = (this.size - this.sizeDiff) +'px';
if (this.dim == 'x') exp.mediumContent.style.width = 'auto';
if (exp.body) exp.body.style[this.wh] = 'auto';
}
if (this.dim == 'x' && exp.overlayBox) exp.sizeOverlayBox(true);
if (this.dim == 'x' && exp.slideshow && exp.isImage) {
if (i == this.full) exp.slideshow.disable('full-expand');
else exp.slideshow.enable('full-expand');
}
},
setPos: function(i) {
this.pos = i;
this.exp.wrapper.style[this.lt] = i +'px';
if (this.exp.outline) this.exp.outline.setPosition();
}
};
hs.Expander = function(a, params, custom, contentType) {
if (document.readyState && hs.ie && !hs.isReady) {
hs.addEventListener(document, 'ready', function() {
new hs.Expander(a, params, custom, contentType);
});
return;
}
this.a = a;
this.custom = custom;
this.contentType = contentType || 'image';
this.isHtml = (contentType == 'html');
this.isImage = !this.isHtml;
hs.continuePreloading = false;
this.overlays = [];
this.last = hs.last;
hs.last = null;
hs.init();
var key = this.key = hs.expanders.length;
// override inline parameters
for (var i = 0; i < hs.overrides.length; i++) {
var name = hs.overrides[i];
this[name] = params && typeof params[name] != 'undefined' ?
params[name] : hs[name];
}
if (!this.src) this.src = a.href;
// get thumb
var el = (params && params.thumbnailId) ? hs.$(params.thumbnailId) : a;
el = this.thumb = el.getElementsByTagName('img')[0] || el;
this.thumbsUserSetId = el.id || a.id;
if (!hs.fireEvent(this, 'onInit')) return true;
// check if already open
for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && hs.expanders[i].a == a
&& !(this.last && this.transitions[1] == 'crossfade')) {
hs.expanders[i].focus();
return false;
}
}
// cancel other
if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) {
hs.expanders[i].cancelLoading();
}
}
hs.expanders[key] = this;
if (!hs.allowMultipleInstances && !hs.upcoming) {
if (hs.expanders[key-1]) hs.expanders[key-1].close();
if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey])
hs.expanders[hs.focusKey].close();
}
// initiate metrics
this.el = el;
this.tpos = hs.getPosition(el);
hs.getPageSize();
var x = this.x = new hs.Dimension(this, 'x');
x.calcThumb();
var y = this.y = new hs.Dimension(this, 'y');
y.calcThumb();
if (/area/i.test(el.tagName)) this.getImageMapAreaCorrection(el);
this.wrapper = hs.createElement(
'div', {
id: 'highslide-wrapper-'+ this.key,
className: 'highslide-wrapper '+ this.wrapperClassName
}, {
visibility: 'hidden',
position: 'absolute',
zIndex: hs.zIndexCounter += 2
}, null, true );
this.wrapper.onmouseover = this.wrapper.onmouseout = hs.wrapperMouseHandler;
if (this.contentType == 'image' && this.outlineWhileAnimating == 2)
this.outlineWhileAnimating = 0;
// get the outline
if (!this.outlineType
|| (this.last && this.isImage && this.transitions[1] == 'crossfade')) {
this[this.contentType +'Create']();
} else if (hs.pendingOutlines[this.outlineType]) {
this.connectOutline();
this[this.contentType +'Create']();
} else {
this.showLoading();
var exp = this;
new hs.Outline(this.outlineType,
function () {
exp.connectOutline();
exp[exp.contentType +'Create']();
}
);
}
return true;
};
hs.Expander.prototype = {
error : function(e) {
// alert ('Line '+ e.lineNumber +': '+ e.message);
window.location.href = this.src;
},
connectOutline : function() {
var outline = this.outline = hs.pendingOutlines[this.outlineType];
outline.exp = this;
outline.table.style.zIndex = this.wrapper.style.zIndex - 1;
hs.pendingOutlines[this.outlineType] = null;
},
showLoading : function() {
if (this.onLoadStarted || this.loading) return;
this.loading = hs.loading;
var exp = this;
this.loading.onclick = function() {
exp.cancelLoading();
};
if (!hs.fireEvent(this, 'onShowLoading')) return;
var exp = this,
l = this.x.get('loadingPos') +'px',
t = this.y.get('loadingPos') +'px';
if (!tgt && this.last && this.transitions[1] == 'crossfade')
var tgt = this.last;
if (tgt) {
l = tgt.x.get('loadingPosXfade') +'px';
t = tgt.y.get('loadingPosXfade') +'px';
this.loading.style.zIndex = hs.zIndexCounter++;
}
setTimeout(function () {
if (exp.loading) hs.setStyles(exp.loading, { left: l, top: t, zIndex: hs.zIndexCounter++ })}
, 100);
},
imageCreate : function() {
var exp = this;
var img = document.createElement('img');
this.content = img;
img.onload = function () {
if (hs.expanders[exp.key]) exp.contentLoaded();
};
if (hs.blockRightClick) img.oncontextmenu = function() { return false; };
img.className = 'highslide-image';
hs.setStyles(img, {
visibility: 'hidden',
display: 'block',
position: 'absolute',
maxWidth: '9999px',
zIndex: 3
});
img.title = hs.lang.restoreTitle;
if (hs.safari) hs.container.appendChild(img);
if (hs.ie && hs.flushImgSize) img.src = null;
img.src = this.src;
this.showLoading();
},
htmlCreate : function () {
if (!hs.fireEvent(this, 'onBeforeGetContent')) return;
this.content = hs.getCacheBinding(this.a);
if (!this.content)
this.content = hs.getNode(this.contentId);
if (!this.content)
this.content = hs.getSelfRendered();
this.getInline(['maincontent']);
if (this.maincontent) {
var body = hs.getElementByClass(this.content, 'div', 'highslide-body');
if (body) body.appendChild(this.maincontent);
this.maincontent.style.display = 'block';
}
hs.fireEvent(this, 'onAfterGetContent');
var innerContent = this.innerContent = this.content;
if (/(swf|iframe)/.test(this.objectType)) this.setObjContainerSize(innerContent);
// the content tree
hs.container.appendChild(this.wrapper);
hs.setStyles( this.wrapper, {
position: 'static',
padding: '0 '+ hs.marginRight +'px 0 '+ hs.marginLeft +'px'
});
this.content = hs.createElement(
'div', {
className: 'highslide-html'
}, {
position: 'relative',
zIndex: 3,
overflow: 'hidden'
},
this.wrapper
);
this.mediumContent = hs.createElement('div', null, null, this.content, 1);
this.mediumContent.appendChild(innerContent);
hs.setStyles (innerContent, {
position: 'relative',
display: 'block',
direction: hs.lang.cssDirection || ''
});
if (this.width) innerContent.style.width = this.width +'px';
if (this.height) hs.setStyles(innerContent, {
height: this.height +'px',
overflow: 'hidden'
});
if (innerContent.offsetWidth < this.minWidth)
innerContent.style.width = this.minWidth +'px';
if (this.objectType == 'ajax' && !hs.getCacheBinding(this.a)) {
this.showLoading();
var exp = this;
var ajax = new hs.Ajax(this.a, innerContent);
ajax.src = this.src;
ajax.onLoad = function () { if (hs.expanders[exp.key]) exp.contentLoaded(); };
ajax.onError = function () { location.href = exp.src; };
ajax.run();
}
else
if (this.objectType == 'iframe' && this.objectLoadTime == 'before') {
this.writeExtendedContent();
}
else
this.contentLoaded();
},
contentLoaded : function() {
try {
if (!this.content) return;
this.content.onload = null;
if (this.onLoadStarted) return;
else this.onLoadStarted = true;
var x = this.x, y = this.y;
if (this.loading) {
hs.setStyles(this.loading, { top: '-9999px' });
this.loading = null;
hs.fireEvent(this, 'onHideLoading');
}
if (this.isImage) {
x.full = this.content.width;
y.full = this.content.height;
hs.setStyles(this.content, {
width: x.t +'px',
height: y.t +'px'
});
this.wrapper.appendChild(this.content);
hs.container.appendChild(this.wrapper);
} else if (this.htmlGetSize) this.htmlGetSize();
x.calcBorders();
y.calcBorders();
hs.setStyles (this.wrapper, {
left: (x.tpos + x.tb - x.cb) +'px',
top: (y.tpos + x.tb - y.cb) +'px'
});
this.initSlideshow();
this.getOverlays();
var ratio = x.full / y.full;
x.calcExpanded();
this.justify(x);
y.calcExpanded();
this.justify(y);
if (this.isHtml) this.htmlSizeOperations();
if (this.overlayBox) this.sizeOverlayBox(0, 1);
if (this.allowSizeReduction) {
if (this.isImage)
this.correctRatio(ratio);
else this.fitOverlayBox();
var ss = this.slideshow;
if (ss && this.last && ss.controls && ss.fixedControls) {
var pos = ss.overlayOptions.position || '', p;
for (var dim in hs.oPos) for (var i = 0; i < 5; i++) {
p = this[dim];
if (pos.match(hs.oPos[dim][i])) {
p.pos = this.last[dim].pos
+ (this.last[dim].p1 - p.p1)
+ (this.last[dim].size - p.size) * [0, 0, .5, 1, 1][i];
if (ss.fixedControls == 'fit') {
if (p.pos + p.size + p.p1 + p.p2 > p.scroll + p.clientSize - p.marginMax)
p.pos = p.scroll + p.clientSize - p.size - p.marginMin - p.marginMax - p.p1 - p.p2;
if (p.pos < p.scroll + p.marginMin) p.pos = p.scroll + p.marginMin;
}
}
}
}
if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
this.createFullExpand();
if (this.overlays.length == 1) this.sizeOverlayBox();
}
}
this.show();
} catch (e) {
this.error(e);
}
},
setObjContainerSize : function(parent, auto) {
var c = hs.getElementByClass(parent, 'DIV', 'highslide-body');
if (/(iframe|swf)/.test(this.objectType)) {
if (this.objectWidth) c.style.width = this.objectWidth +'px';
if (this.objectHeight) c.style.height = this.objectHeight +'px';
}
},
writeExtendedContent : function () {
if (this.hasExtendedContent) return;
var exp = this;
this.body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body');
if (this.objectType == 'iframe') {
this.showLoading();
var ruler = hs.clearing.cloneNode(1);
this.body.appendChild(ruler);
this.newWidth = this.innerContent.offsetWidth;
if (!this.objectWidth) this.objectWidth = ruler.offsetWidth;
var hDiff = this.innerContent.offsetHeight - this.body.offsetHeight,
h = this.objectHeight || hs.page.height - hDiff - hs.marginTop - hs.marginBottom,
onload = this.objectLoadTime == 'before' ?
' onload="if (hs.expanders['+ this.key +']) hs.expanders['+ this.key +'].contentLoaded()" ' : '';
this.body.innerHTML += '<iframe name="hs'+ (new Date()).getTime() +'" frameborder="0" key="'+ this.key +'" '
+' style="width:'+ this.objectWidth +'px; height:'+ h +'px" '
+ onload +' src="'+ this.src +'" ></iframe>';
this.ruler = this.body.getElementsByTagName('div')[0];
this.iframe = this.body.getElementsByTagName('iframe')[0];
if (this.objectLoadTime == 'after') this.correctIframeSize();
}
if (this.objectType == 'swf') {
this.body.id = this.body.id || 'hs-flash-id-' + this.key;
var a = this.swfOptions;
if (!a.params) a.params = {};
if (typeof a.params.wmode == 'undefined') a.params.wmode = 'transparent';
if (swfobject) swfobject.embedSWF(this.src, this.body.id, this.objectWidth, this.objectHeight,
a.version || '7', a.expressInstallSwfurl, a.flashvars, a.params, a.attributes);
}
this.hasExtendedContent = true;
},
htmlGetSize : function() {
if (this.iframe && !this.objectHeight) { // loadtime before
this.iframe.style.height = this.body.style.height = this.getIframePageHeight() +'px';
}
this.innerContent.appendChild(hs.clearing);
if (!this.x.full) this.x.full = this.innerContent.offsetWidth;
this.y.full = this.innerContent.offsetHeight;
this.innerContent.removeChild(hs.clearing);
if (hs.ie && this.newHeight > parseInt(this.innerContent.currentStyle.height)) { // ie css bug
this.newHeight = parseInt(this.innerContent.currentStyle.height);
}
hs.setStyles( this.wrapper, { position: 'absolute', padding: '0'});
hs.setStyles( this.content, { width: this.x.t +'px', height: this.y.t +'px'});
},
getIframePageHeight : function() {
var h;
try {
var doc = this.iDoc = this.iframe.contentDocument || this.iframe.contentWindow.document;
var clearing = doc.createElement('div');
clearing.style.clear = 'both';
doc.body.appendChild(clearing);
h = clearing.offsetTop;
if (hs.ie) h += parseInt(doc.body.currentStyle.marginTop)
+ parseInt(doc.body.currentStyle.marginBottom) - 1;
} catch (e) { // other domain
h = 300;
}
return h;
},
correctIframeSize : function () {
var wDiff = this.innerContent.offsetWidth - this.ruler.offsetWidth;
hs.discardElement(this.ruler);
if (wDiff < 0) wDiff = 0;
var hDiff = this.innerContent.offsetHeight - this.iframe.offsetHeight;
if (this.iDoc && !this.objectHeight && !this.height && this.y.size == this.y.full) try {
this.iDoc.body.style.overflow = 'hidden';
} catch (e) {}
hs.setStyles(this.iframe, {
width: Math.abs(this.x.size - wDiff) +'px',
height: Math.abs(this.y.size - hDiff) +'px'
});
hs.setStyles(this.body, {
width: this.iframe.style.width,
height: this.iframe.style.height
});
this.scrollingContent = this.iframe;
this.scrollerDiv = this.scrollingContent;
},
htmlSizeOperations : function () {
this.setObjContainerSize(this.innerContent);
if (this.objectType == 'swf' && this.objectLoadTime == 'before') this.writeExtendedContent();
// handle minimum size
if (this.x.size < this.x.full && !this.allowWidthReduction) this.x.size = this.x.full;
if (this.y.size < this.y.full && !this.allowHeightReduction) this.y.size = this.y.full;
this.scrollerDiv = this.innerContent;
hs.setStyles(this.mediumContent, {
position: 'relative',
width: this.x.size +'px'
});
hs.setStyles(this.innerContent, {
border: 'none',
width: 'auto',
height: 'auto'
});
var node = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body');
if (node && !/(iframe|swf)/.test(this.objectType)) {
var cNode = node; // wrap to get true size
node = hs.createElement(cNode.nodeName, null, {overflow: 'hidden'}, null, true);
cNode.parentNode.insertBefore(node, cNode);
node.appendChild(hs.clearing); // IE6
node.appendChild(cNode);
var wDiff = this.innerContent.offsetWidth - node.offsetWidth;
var hDiff = this.innerContent.offsetHeight - node.offsetHeight;
node.removeChild(hs.clearing);
var kdeBugCorr = hs.safari || navigator.vendor == 'KDE' ? 1 : 0; // KDE repainting bug
hs.setStyles(node, {
width: (this.x.size - wDiff - kdeBugCorr) +'px',
height: (this.y.size - hDiff) +'px',
overflow: 'auto',
position: 'relative'
}
);
if (kdeBugCorr && cNode.offsetHeight > node.offsetHeight) {
node.style.width = (parseInt(node.style.width) + kdeBugCorr) + 'px';
}
this.scrollingContent = node;
this.scrollerDiv = this.scrollingContent;
}
if (this.iframe && this.objectLoadTime == 'before') this.correctIframeSize();
if (!this.scrollingContent && this.y.size < this.mediumContent.offsetHeight) this.scrollerDiv = this.content;
if (this.scrollerDiv == this.content && !this.allowWidthReduction && !/(iframe|swf)/.test(this.objectType)) {
this.x.size += 17; // room for scrollbars
}
if (this.scrollerDiv && this.scrollerDiv.offsetHeight > this.scrollerDiv.parentNode.offsetHeight) {
setTimeout("try { hs.expanders["+ this.key +"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}",
hs.expandDuration);
}
},
getImageMapAreaCorrection : function(area) {
var c = area.coords.split(',');
for (var i = 0; i < c.length; i++) c[i] = parseInt(c[i]);
if (area.shape.toLowerCase() == 'circle') {
this.x.tpos += c[0] - c[2];
this.y.tpos += c[1] - c[2];
this.x.t = this.y.t = 2 * c[2];
} else {
var maxX, maxY, minX = maxX = c[0], minY = maxY = c[1];
for (var i = 0; i < c.length; i++) {
if (i % 2 == 0) {
minX = Math.min(minX, c[i]);
maxX = Math.max(maxX, c[i]);
} else {
minY = Math.min(minY, c[i]);
maxY = Math.max(maxY, c[i]);
}
}
this.x.tpos += minX;
this.x.t = maxX - minX;
this.y.tpos += minY;
this.y.t = maxY - minY;
}
},
justify : function (p, moveOnly) {
var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
if (tgt && tgt.match(/ /)) {
tgtArr = tgt.split(' ');
tgt = tgtArr[0];
}
if (tgt && hs.$(tgt)) {
p.pos = hs.getPosition(hs.$(tgt))[dim];
if (tgtArr && tgtArr[1] && tgtArr[1].match(/^[-]?[0-9]+px$/))
p.pos += parseInt(tgtArr[1]);
if (p.size < p.minSize) p.size = p.minSize;
} else if (p.justify == 'auto' || p.justify == 'center') {
var hasMovedMin = false;
var allowReduce = p.exp.allowSizeReduction;
if (p.justify == 'center')
p.pos = Math.round(p.scroll + (p.clientSize + p.marginMin - p.marginMax - p.get('wsize')) / 2);
else
p.pos = Math.round(p.pos - ((p.get('wsize') - p.t) / 2));
if (p.pos < p.scroll + p.marginMin) {
p.pos = p.scroll + p.marginMin;
hasMovedMin = true;
}
if (!moveOnly && p.size < p.minSize) {
p.size = p.minSize;
allowReduce = false;
}
if (p.pos + p.get('wsize') > p.scroll + p.clientSize - p.marginMax) {
if (!moveOnly && hasMovedMin && allowReduce) {
p.size = Math.min(p.size, p.get(dim == 'y' ? 'fitsize' : 'maxsize'));
} else if (p.get('wsize') < p.get('fitsize')) {
p.pos = p.scroll + p.clientSize - p.marginMax - p.get('wsize');
} else { // image larger than viewport
p.pos = p.scroll + p.marginMin;
if (!moveOnly && allowReduce) p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize');
}
}
if (!moveOnly && p.size < p.minSize) {
p.size = p.minSize;
allowReduce = false;
}
} else if (p.justify == 'max') {
p.pos = Math.floor(p.pos - p.size + p.t);
}
if (p.pos < p.marginMin) {
var tmpMin = p.pos;
p.pos = p.marginMin;
if (allowReduce && !moveOnly) p.size = p.size - (p.pos - tmpMin);
}
},
correctRatio : function(ratio) {
var x = this.x,
y = this.y,
changed = false,
xSize = Math.min(x.full, x.size),
ySize = Math.min(y.full, y.size),
useBox = (this.useBox || hs.padToMinWidth);
if (xSize / ySize > ratio) { // width greater
xSize = ySize * ratio;
if (xSize < x.minSize) { // below minWidth
xSize = x.minSize;
ySize = xSize / ratio;
}
changed = true;
} else if (xSize / ySize < ratio) { // height greater
ySize = xSize / ratio;
changed = true;
}
if (hs.padToMinWidth && x.full < x.minSize) {
x.imgSize = x.full;
y.size = y.imgSize = y.full;
} else if (this.useBox) {
x.imgSize = xSize;
y.imgSize = ySize;
} else {
x.size = xSize;
y.size = ySize;
}
changed = this.fitOverlayBox(useBox ? null : ratio, changed);
if (useBox && y.size < y.imgSize) {
y.imgSize = y.size;
x.imgSize = y.size * ratio;
}
if (changed || useBox) {
x.pos = x.tpos - x.cb + x.tb;
x.minSize = x.size;
this.justify(x, true);
y.pos = y.tpos - y.cb + y.tb;
y.minSize = y.size;
this.justify(y, true);
if (this.overlayBox) this.sizeOverlayBox();
}
},
fitOverlayBox : function(ratio, changed) {
var x = this.x, y = this.y;
if (this.overlayBox && (this.isImage || this.allowHeightReduction)) {
while (y.size > this.minHeight && x.size > this.minWidth
&& y.get('wsize') > y.get('fitsize')) {
y.size -= 10;
if (ratio) x.size = y.size * ratio;
this.sizeOverlayBox(0, 1);
changed = true;
}
}
return changed;
},
reflow : function () {
if (this.scrollerDiv) {
var h = /iframe/i.test(this.scrollerDiv.tagName) ? (this.getIframePageHeight() + 1) +'px' : 'auto';
if (this.body) this.body.style.height = h;
this.scrollerDiv.style.height = h;
this.y.setSize(this.innerContent.offsetHeight);
}
},
show : function () {
var x = this.x, y = this.y;
this.doShowHide('hidden');
hs.fireEvent(this, 'onBeforeExpand');
if (this.slideshow && this.slideshow.thumbstrip) this.slideshow.thumbstrip.selectThumb();
// Apply size change
this.changeSize(
1, {
wrapper: {
width : x.get('wsize'),
height : y.get('wsize'),
left: x.pos,
top: y.pos
},
content: {
left: x.p1 + x.get('imgPad'),
top: y.p1 + y.get('imgPad'),
width:x.imgSize ||x.size,
height:y.imgSize ||y.size
}
},
hs.expandDuration
);
},
changeSize : function(up, to, dur) {
// transition
var trans = this.transitions,
other = up ? (this.last ? this.last.a : null) : hs.upcoming,
t = (trans[1] && other
&& hs.getParam(other, 'transitions')[1] == trans[1]) ?
trans[1] : trans[0];
if (this[t] && t != 'expand') {
this[t](up, to);
return;
}
if (this.outline && !this.outlineWhileAnimating) {
if (up) this.outline.setPosition();
else this.outline.destroy(
(this.isHtml && this.preserveContent));
}
if (!up) this.destroyOverlays();
var exp = this,
x = exp.x,
y = exp.y,
easing = this.easing;
if (!up) easing = this.easingClose || easing;
var after = up ?
function() {
if (exp.outline) exp.outline.table.style.visibility = "visible";
setTimeout(function() {
exp.afterExpand();
}, 50);
} :
function() {
exp.afterClose();
};
if (up) hs.setStyles( this.wrapper, {
width: x.t +'px',
height: y.t +'px'
});
if (up && this.isHtml) {
hs.setStyles(this.wrapper, {
left: (x.tpos - x.cb + x.tb) +'px',
top: (y.tpos - y.cb + y.tb) +'px'
});
}
if (this.fadeInOut) {
hs.setStyles(this.wrapper, { opacity: up ? 0 : 1 });
hs.extend(to.wrapper, { opacity: up });
}
hs.animate( this.wrapper, to.wrapper, {
duration: dur,
easing: easing,
step: function(val, args) {
if (exp.outline && exp.outlineWhileAnimating && args.prop == 'top') {
var fac = up ? args.pos : 1 - args.pos;
var pos = {
w: x.t + (x.get('wsize') - x.t) * fac,
h: y.t + (y.get('wsize') - y.t) * fac,
x: x.tpos + (x.pos - x.tpos) * fac,
y: y.tpos + (y.pos - y.tpos) * fac
};
exp.outline.setPosition(pos, 0, 1);
}
if (exp.isHtml) {
if (args.prop == 'left')
exp.mediumContent.style.left = (x.pos - val) +'px';
if (args.prop == 'top')
exp.mediumContent.style.top = (y.pos - val) +'px';
}
}
});
hs.animate( this.content, to.content, dur, easing, after);
if (up) {
this.wrapper.style.visibility = 'visible';
this.content.style.visibility = 'visible';
if (this.isHtml) this.innerContent.style.visibility = 'visible';
this.a.className += ' highslide-active-anchor';
}
},
fade : function(up, to) {
this.outlineWhileAnimating = false;
var exp = this, t = up ? hs.expandDuration : 0;
if (up) {
hs.animate(this.wrapper, to.wrapper, 0);
hs.setStyles(this.wrapper, { opacity: 0, visibility: 'visible' });
hs.animate(this.content, to.content, 0);
this.content.style.visibility = 'visible';
hs.animate(this.wrapper, { opacity: 1 }, t, null,
function() { exp.afterExpand(); });
}
if (this.outline) {
this.outline.table.style.zIndex = this.wrapper.style.zIndex;
var dir = up || -1,
offset = this.outline.offset,
startOff = up ? 3 : offset,
endOff = up? offset : 3;
for (var i = startOff; dir * i <= dir * endOff; i += dir, t += 25) {
(function() {
var o = up ? endOff - i : startOff - i;
setTimeout(function() {
exp.outline.setPosition(0, o, 1);
}, t);
})();
}
}
if (up) {}//setTimeout(function() { exp.afterExpand(); }, t+50);
else {
setTimeout( function() {
if (exp.outline) exp.outline.destroy(exp.preserveContent);
exp.destroyOverlays();
hs.animate( exp.wrapper, { opacity: 0 }, hs.restoreDuration, null, function(){
exp.afterClose();
});
}, t);
}
},
crossfade : function (up, to, from) {
if (!up) return;
var exp = this,
last = this.last,
x = this.x,
y = this.y,
lastX = last.x,
lastY = last.y,
wrapper = this.wrapper,
content = this.content,
overlayBox = this.overlayBox;
hs.removeEventListener(document, 'mousemove', hs.dragHandler);
hs.setStyles(content, {
width: (x.imgSize || x.size) +'px',
height: (y.imgSize || y.size) +'px'
});
if (overlayBox) overlayBox.style.overflow = 'visible';
this.outline = last.outline;
if (this.outline) this.outline.exp = exp;
last.outline = null;
var fadeBox = hs.createElement('div', {
className: 'highslide-image'
}, {
position: 'absolute',
zIndex: 4,
overflow: 'hidden',
display: 'none'
}
);
var names = { oldImg: last, newImg: this };
for (var n in names) {
this[n] = names[n].content.cloneNode(1);
hs.setStyles(this[n], {
position: 'absolute',
border: 0,
visibility: 'visible'
});
fadeBox.appendChild(this[n]);
}
wrapper.appendChild(fadeBox);
if (this.isHtml) hs.setStyles(this.mediumContent, {
left: 0,
top: 0
});
if (overlayBox) {
overlayBox.className = '';
wrapper.appendChild(overlayBox);
}
fadeBox.style.display = '';
last.content.style.display = 'none';
if (hs.safari) {
var match = navigator.userAgent.match(/Safari\/([0-9]{3})/);
if (match && parseInt(match[1]) < 525) this.wrapper.style.visibility = 'visible';
}
hs.animate(wrapper, {
width: x.size
}, {
duration: hs.transitionDuration,
step: function(val, args) {
var pos = args.pos,
invPos = 1 - pos;
var prop,
size = {},
props = ['pos', 'size', 'p1', 'p2'];
for (var n in props) {
prop = props[n];
size['x'+ prop] = Math.round(invPos * lastX[prop] + pos * x[prop]);
size['y'+ prop] = Math.round(invPos * lastY[prop] + pos * y[prop]);
size.ximgSize = Math.round(
invPos * (lastX.imgSize || lastX.size) + pos * (x.imgSize || x.size));
size.ximgPad = Math.round(invPos * lastX.get('imgPad') + pos * x.get('imgPad'));
size.yimgSize = Math.round(
invPos * (lastY.imgSize || lastY.size) + pos * (y.imgSize || y.size));
size.yimgPad = Math.round(invPos * lastY.get('imgPad') + pos * y.get('imgPad'));
}
if (exp.outline) exp.outline.setPosition({
x: size.xpos,
y: size.ypos,
w: size.xsize + size.xp1 + size.xp2 + 2 * x.cb,
h: size.ysize + size.yp1 + size.yp2 + 2 * y.cb
});
last.wrapper.style.clip = 'rect('
+ (size.ypos - lastY.pos)+'px, '
+ (size.xsize + size.xp1 + size.xp2 + size.xpos + 2 * lastX.cb - lastX.pos) +'px, '
+ (size.ysize + size.yp1 + size.yp2 + size.ypos + 2 * lastY.cb - lastY.pos) +'px, '
+ (size.xpos - lastX.pos)+'px)';
hs.setStyles(content, {
top: (size.yp1 + y.get('imgPad')) +'px',
left: (size.xp1 + x.get('imgPad')) +'px',
marginTop: (y.pos - size.ypos) +'px',
marginLeft: (x.pos - size.xpos) +'px'
});
hs.setStyles(wrapper, {
top: size.ypos +'px',
left: size.xpos +'px',
width: (size.xp1 + size.xp2 + size.xsize + 2 * x.cb)+ 'px',
height: (size.yp1 + size.yp2 + size.ysize + 2 * y.cb) + 'px'
});
hs.setStyles(fadeBox, {
width: (size.ximgSize || size.xsize) + 'px',
height: (size.yimgSize || size.ysize) +'px',
left: (size.xp1 + size.ximgPad) +'px',
top: (size.yp1 + size.yimgPad) +'px',
visibility: 'visible'
});
hs.setStyles(exp.oldImg, {
top: (lastY.pos - size.ypos + lastY.p1 - size.yp1 + lastY.get('imgPad') - size.yimgPad)+'px',
left: (lastX.pos - size.xpos + lastX.p1 - size.xp1 + lastX.get('imgPad') - size.ximgPad)+'px'
});
hs.setStyles(exp.newImg, {
opacity: pos,
top: (y.pos - size.ypos + y.p1 - size.yp1 + y.get('imgPad') - size.yimgPad) +'px',
left: (x.pos - size.xpos + x.p1 - size.xp1 + x.get('imgPad') - size.ximgPad) +'px'
});
if (overlayBox) hs.setStyles(overlayBox, {
width: size.xsize + 'px',
height: size.ysize +'px',
left: (size.xp1 + x.cb) +'px',
top: (size.yp1 + y.cb) +'px'
});
},
complete: function () {
wrapper.style.visibility = content.style.visibility = 'visible';
content.style.display = 'block';
fadeBox.style.display = 'none';
exp.a.className += ' highslide-active-anchor';
exp.afterExpand();
last.afterClose();
exp.last = null;
}
});
},
reuseOverlay : function(o, el) {
if (!this.last) return false;
for (var i = 0; i < this.last.overlays.length; i++) {
var oDiv = hs.$('hsId'+ this.last.overlays[i]);
if (oDiv && oDiv.hsId == o.hsId) {
this.genOverlayBox();
oDiv.reuse = this.key;
hs.push(this.overlays, this.last.overlays[i]);
return true;
}
}
return false;
},
afterExpand : function() {
this.isExpanded = true;
this.focus();
if (this.isHtml && this.objectLoadTime == 'after') this.writeExtendedContent();
if (this.iframe) {
try {
var exp = this,
doc = this.iframe.contentDocument || this.iframe.contentWindow.document;
hs.addEventListener(doc, 'mousedown', function () {
if (hs.focusKey != exp.key) exp.focus();
});
} catch(e) {}
if (hs.ie && typeof this.isClosing != 'boolean') // first open
this.iframe.style.width = (this.objectWidth - 1) +'px'; // hasLayout
}
if (this.dimmingOpacity) hs.dim(this);
if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null;
this.prepareNextOutline();
var p = hs.page, mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop;
this.mouseIsOver = this.x.pos < mX && mX < this.x.pos + this.x.get('wsize')
&& this.y.pos < mY && mY < this.y.pos + this.y.get('wsize');
if (this.overlayBox) this.showOverlays();
hs.fireEvent(this, 'onAfterExpand');
},
prepareNextOutline : function() {
var key = this.key;
var outlineType = this.outlineType;
new hs.Outline(outlineType,
function () { try { hs.expanders[key].preloadNext(); } catch (e) {} });
},
preloadNext : function() {
var next = this.getAdjacentAnchor(1);
if (next && next.onclick.toString().match(/hs\.expand/))
var img = hs.createElement('img', { src: hs.getSrc(next) });
},
getAdjacentAnchor : function(op) {
var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none'];
/*< ? if ($cfg->slideshow) : ?>s*/
if (!as[current + op] && this.slideshow && this.slideshow.repeat) {
if (op == 1) return as[0];
else if (op == -1) return as[as.length-1];
}
/*< ? endif ?>s*/
return as[current + op] || null;
},
getAnchorIndex : function() {
var arr = hs.getAnchors().groups[this.slideshowGroup || 'none'];
if (arr) for (var i = 0; i < arr.length; i++) {
if (arr[i] == this.a) return i;
}
return null;
},
getNumber : function() {
if (this[this.numberPosition]) {
var arr = hs.anchors.groups[this.slideshowGroup || 'none'];
if (arr) {
var s = hs.lang.number.replace('%1', this.getAnchorIndex() + 1).replace('%2', arr.length);
this[this.numberPosition].innerHTML =
'<div class="highslide-number">'+ s +'</div>'+ this[this.numberPosition].innerHTML;
}
}
},
initSlideshow : function() {
if (!this.last) {
for (var i = 0; i < hs.slideshows.length; i++) {
var ss = hs.slideshows[i], sg = ss.slideshowGroup;
if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup)
this.slideshow = new hs.Slideshow(this.key, ss);
}
} else {
this.slideshow = this.last.slideshow;
}
var ss = this.slideshow;
if (!ss) return;
var key = ss.expKey = this.key;
ss.checkFirstAndLast();
ss.disable('full-expand');
if (ss.controls) {
var o = ss.overlayOptions || {};
o.overlayId = ss.controls;
o.hsId = 'controls';
this.createOverlay(o);
}
if (ss.thumbstrip) ss.thumbstrip.add(this);
if (!this.last && this.autoplay) ss.play(true);
if (ss.autoplay) {
ss.autoplay = setTimeout(function() {
hs.next(key);
}, (ss.interval || 500));
}
},
cancelLoading : function() {
hs.discardElement (this.wrapper);
hs.expanders[this.key] = null;
if (hs.upcoming == this.a) hs.upcoming = null;
hs.undim(this.key);
if (this.loading) hs.loading.style.left = '-9999px';
hs.fireEvent(this, 'onHideLoading');
},
writeCredits : function () {
if (this.credits) return;
this.credits = hs.createElement('a', {
href: hs.creditsHref,
target: hs.creditsTarget,
className: 'highslide-credits',
innerHTML: hs.lang.creditsText,
title: hs.lang.creditsTitle
});
this.createOverlay({
overlayId: this.credits,
position: this.creditsPosition || 'top left',
hsId: 'credits'
});
},
getInline : function(types, addOverlay) {
for (var i = 0; i < types.length; i++) {
var type = types[i], s = null;
if (type == 'caption' && !hs.fireEvent(this, 'onBeforeGetCaption')) return;
else if (type == 'heading' && !hs.fireEvent(this, 'onBeforeGetHeading')) return;
if (!this[type +'Id'] && this.thumbsUserSetId)
this[type +'Id'] = type +'-for-'+ this.thumbsUserSetId;
if (this[type +'Id']) this[type] = hs.getNode(this[type +'Id']);
if (!this[type] && !this[type +'Text'] && this[type +'Eval']) try {
s = eval(this[type +'Eval']);
} catch (e) {}
if (!this[type] && this[type +'Text']) {
s = this[type +'Text'];
}
if (!this[type] && !s) {
this[type] = hs.getNode(this.a['_'+ type + 'Id']);
if (!this[type]) {
var next = this.a.nextSibling;
while (next && !hs.isHsAnchor(next)) {
if ((new RegExp('highslide-'+ type)).test(next.className || null)) {
if (!next.id) this.a['_'+ type + 'Id'] = next.id = 'hsId'+ hs.idCounter++;
this[type] = hs.getNode(next.id);
break;
}
next = next.nextSibling;
}
}
}
if (!this[type] && !s && this.numberPosition == type) s = '\n';
if (!this[type] && s) this[type] = hs.createElement('div',
{ className: 'highslide-'+ type, innerHTML: s } );
if (addOverlay && this[type]) {
var o = { position: (type == 'heading') ? 'above' : 'below' };
for (var x in this[type+'Overlay']) o[x] = this[type+'Overlay'][x];
o.overlayId = this[type];
this.createOverlay(o);
}
}
},
// on end move and resize
doShowHide : function(visibility) {
if (hs.hideSelects) this.showHideElements('SELECT', visibility);
if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
if (hs.geckoMac) this.showHideElements('*', visibility);
},
showHideElements : function (tagName, visibility) {
var els = document.getElementsByTagName(tagName);
var prop = tagName == '*' ? 'overflow' : 'visibility';
for (var i = 0; i < els.length; i++) {
if (prop == 'visibility' || (document.defaultView.getComputedStyle(
els[i], "").getPropertyValue('overflow') == 'auto'
|| els[i].getAttribute('hidden-by') != null)) {
var hiddenBy = els[i].getAttribute('hidden-by');
if (visibility == 'visible' && hiddenBy) {
hiddenBy = hiddenBy.replace('['+ this.key +']', '');
els[i].setAttribute('hidden-by', hiddenBy);
if (!hiddenBy) els[i].style[prop] = els[i].origProp;
} else if (visibility == 'hidden') { // hide if behind
var elPos = hs.getPosition(els[i]);
elPos.w = els[i].offsetWidth;
elPos.h = els[i].offsetHeight;
if (!this.dimmingOpacity) { // hide all if dimming
var clearsX = (elPos.x + elPos.w < this.x.get('opos')
|| elPos.x > this.x.get('opos') + this.x.get('osize'));
var clearsY = (elPos.y + elPos.h < this.y.get('opos')
|| elPos.y > this.y.get('opos') + this.y.get('osize'));
}
var wrapperKey = hs.getWrapperKey(els[i]);
if (!clearsX && !clearsY && wrapperKey != this.key) { // element falls behind image
if (!hiddenBy) {
els[i].setAttribute('hidden-by', '['+ this.key +']');
els[i].origProp = els[i].style[prop];
els[i].style[prop] = 'hidden';
} else if (hiddenBy.indexOf('['+ this.key +']') == -1) {
els[i].setAttribute('hidden-by', hiddenBy + '['+ this.key +']');
}
} else if ((hiddenBy == '['+ this.key +']' || hs.focusKey == wrapperKey)
&& wrapperKey != this.key) { // on move
els[i].setAttribute('hidden-by', '');
els[i].style[prop] = els[i].origProp || '';
} else if (hiddenBy && hiddenBy.indexOf('['+ this.key +']') > -1) {
els[i].setAttribute('hidden-by', hiddenBy.replace('['+ this.key +']', ''));
}
}
}
}
},
focus : function() {
this.wrapper.style.zIndex = hs.zIndexCounter += 2;
// blur others
for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && i == hs.focusKey) {
var blurExp = hs.expanders[i];
blurExp.content.className += ' highslide-'+ blurExp.contentType +'-blur';
if (blurExp.isImage) {
blurExp.content.style.cursor = hs.ie ? 'hand' : 'pointer';
blurExp.content.title = hs.lang.focusTitle;
}
hs.fireEvent(blurExp, 'onBlur');
}
}
// focus this
if (this.outline) this.outline.table.style.zIndex
= this.wrapper.style.zIndex - 1;
this.content.className = 'highslide-'+ this.contentType;
if (this.isImage) {
this.content.title = hs.lang.restoreTitle;
if (hs.restoreCursor) {
hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ hs.graphicsDir + hs.restoreCursor +'), pointer';
if (hs.ie && hs.uaVersion < 6) hs.styleRestoreCursor = 'hand';
this.content.style.cursor = hs.styleRestoreCursor;
}
}
hs.focusKey = this.key;
hs.addEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
hs.fireEvent(this, 'onFocus');
},
moveTo: function(x, y) {
this.x.setPos(x);
this.y.setPos(y);
},
resize : function (e) {
var w, h, r = e.width / e.height;
w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full));
if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full;
h = this.isHtml ? e.height + e.dY : w / r;
if (h < Math.min(this.minHeight, this.y.full)) {
h = Math.min(this.minHeight, this.y.full);
if (this.isImage) w = h * r;
}
this.resizeTo(w, h);
},
resizeTo: function(w, h) {
this.y.setSize(h);
this.x.setSize(w);
this.wrapper.style.height = this.y.get('wsize') +'px';
},
close : function() {
if (this.isClosing || !this.isExpanded) return;
if (this.transitions[1] == 'crossfade' && hs.upcoming) {
hs.getExpander(hs.upcoming).cancelLoading();
hs.upcoming = null;
}
if (!hs.fireEvent(this, 'onBeforeClose')) return;
this.isClosing = true;
if (this.slideshow && !hs.upcoming) this.slideshow.pause();
hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
try {
if (this.isHtml) this.htmlPrepareClose();
this.content.style.cursor = 'default';
this.changeSize(
0, {
wrapper: {
width : this.x.t,
height : this.y.t,
left: this.x.tpos - this.x.cb + this.x.tb,
top: this.y.tpos - this.y.cb + this.y.tb
},
content: {
left: 0,
top: 0,
width: this.x.t,
height: this.y.t
}
}, hs.restoreDuration
);
} catch (e) { this.afterClose(); }
},
htmlPrepareClose : function() {
if (hs.geckoMac) { // bad redraws
if (!hs.mask) hs.mask = hs.createElement('div', null,
{ position: 'absolute' }, hs.container);
hs.setStyles(hs.mask, { width: this.x.size +'px', height: this.y.size +'px',
left: this.x.pos +'px', top: this.y.pos +'px', display: 'block' });
}
if (this.objectType == 'swf') try { hs.$(this.body.id).StopPlay(); } catch (e) {}
if (this.objectLoadTime == 'after' && !this.preserveContent) this.destroyObject();
if (this.scrollerDiv && this.scrollerDiv != this.scrollingContent)
this.scrollerDiv.style.overflow = 'hidden';
},
destroyObject : function () {
if (hs.ie && this.iframe)
try { this.iframe.contentWindow.document.body.innerHTML = ''; } catch (e) {}
if (this.objectType == 'swf') swfobject.removeSWF(this.body.id);
this.body.innerHTML = '';
},
sleep : function() {
if (this.outline) this.outline.table.style.display = 'none';
this.releaseMask = null;
this.wrapper.style.display = 'none';
hs.push(hs.sleeping, this);
},
awake : function() {try {
hs.expanders[this.key] = this;
if (!hs.allowMultipleInstances &&hs.focusKey != this.key) {
try { hs.expanders[hs.focusKey].close(); } catch (e){}
}
var z = hs.zIndexCounter++, stl = { display: '', zIndex: z };
hs.setStyles (this.wrapper, stl);
this.isClosing = false;
var o = this.outline || 0;
if (o) {
if (!this.outlineWhileAnimating) stl.visibility = 'hidden';
hs.setStyles (o.table, stl);
}
if (this.slideshow) {
this.initSlideshow();
}
this.show();
} catch (e) {}
},
createOverlay : function (o) {
var el = o.overlayId,
relToVP = (o.relativeTo == 'viewport' && !/panel$/.test(o.position));
if (typeof el == 'string') el = hs.getNode(el);
if (o.html) el = hs.createElement('div', { innerHTML: o.html });
if (!el || typeof el == 'string') return;
if (!hs.fireEvent(this, 'onCreateOverlay', { overlay: el })) return;
el.style.display = 'block';
o.hsId = o.hsId || o.overlayId;
if (this.transitions[1] == 'crossfade' && this.reuseOverlay(o, el)) return;
this.genOverlayBox();
var width = o.width && /^[0-9]+(px|%)$/.test(o.width) ? o.width : 'auto';
if (/^(left|right)panel$/.test(o.position) && !/^[0-9]+px$/.test(o.width)) width = '200px';
var overlay = hs.createElement(
'div', {
id: 'hsId'+ hs.idCounter++,
hsId: o.hsId
}, {
position: 'absolute',
visibility: 'hidden',
width: width,
direction: hs.lang.cssDirection || '',
opacity: 0
},
relToVP ? hs.viewport :this.overlayBox,
true
);
if (relToVP) overlay.hsKey = this.key;
overlay.appendChild(el);
hs.extend(overlay, {
opacity: 1,
offsetX: 0,
offsetY: 0,
dur: (o.fade === 0 || o.fade === false || (o.fade == 2 && hs.ie)) ? 0 : 250
});
hs.extend(overlay, o);
if (this.gotOverlays) {
this.positionOverlay(overlay);
if (!overlay.hideOnMouseOut || this.mouseIsOver)
hs.animate(overlay, { opacity: overlay.opacity }, overlay.dur);
}
hs.push(this.overlays, hs.idCounter - 1);
},
positionOverlay : function(overlay) {
var p = overlay.position || 'middle center',
relToVP = (overlay.relativeTo == 'viewport'),
offX = overlay.offsetX,
offY = overlay.offsetY;
if (relToVP) {
hs.viewport.style.display = 'block';
overlay.hsKey = this.key;
if (overlay.offsetWidth > overlay.parentNode.offsetWidth)
overlay.style.width = '100%';
} else
if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
if (/left$/.test(p)) overlay.style.left = offX +'px';
if (/center$/.test(p)) hs.setStyles (overlay, {
left: '50%',
marginLeft: (offX - Math.round(overlay.offsetWidth / 2)) +'px'
});
if (/right$/.test(p)) overlay.style.right = - offX +'px';
if (/^leftpanel$/.test(p)) {
hs.setStyles(overlay, {
right: '100%',
marginRight: this.x.cb +'px',
top: - this.y.cb +'px',
bottom: - this.y.cb +'px',
overflow: 'auto'
});
this.x.p1 = overlay.offsetWidth;
} else if (/^rightpanel$/.test(p)) {
hs.setStyles(overlay, {
left: '100%',
marginLeft: this.x.cb +'px',
top: - this.y.cb +'px',
bottom: - this.y.cb +'px',
overflow: 'auto'
});
this.x.p2 = overlay.offsetWidth;
}
var parOff = overlay.parentNode.offsetHeight;
overlay.style.height = 'auto';
if (relToVP && overlay.offsetHeight > parOff)
overlay.style.height = hs.ieLt7 ? parOff +'px' : '100%';
if (/^top/.test(p)) overlay.style.top = offY +'px';
if (/^middle/.test(p)) hs.setStyles (overlay, {
top: '50%',
marginTop: (offY - Math.round(overlay.offsetHeight / 2)) +'px'
});
if (/^bottom/.test(p)) overlay.style.bottom = - offY +'px';
if (/^above$/.test(p)) {
hs.setStyles(overlay, {
left: (- this.x.p1 - this.x.cb) +'px',
right: (- this.x.p2 - this.x.cb) +'px',
bottom: '100%',
marginBottom: this.y.cb +'px',
width: 'auto'
});
this.y.p1 = overlay.offsetHeight;
} else if (/^below$/.test(p)) {
hs.setStyles(overlay, {
position: 'relative',
left: (- this.x.p1 - this.x.cb) +'px',
right: (- this.x.p2 - this.x.cb) +'px',
top: '100%',
marginTop: this.y.cb +'px',
width: 'auto'
});
this.y.p2 = overlay.offsetHeight;
overlay.style.position = 'absolute';
}
},
getOverlays : function() {
this.getInline(['heading', 'caption'], true);
this.getNumber();
if (this.caption) hs.fireEvent(this, 'onAfterGetCaption');
if (this.heading) hs.fireEvent(this, 'onAfterGetHeading');
if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move';
if (hs.showCredits) this.writeCredits();
for (var i = 0; i < hs.overlays.length; i++) {
var o = hs.overlays[i], tId = o.thumbnailId, sg = o.slideshowGroup;
if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
|| (sg && sg === this.slideshowGroup)) {
if (this.isImage || (this.isHtml && o.useOnHtml))
this.createOverlay(o);
}
}
var os = [];
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
if (/panel$/.test(o.position)) this.positionOverlay(o);
else hs.push(os, o);
}
for (var i = 0; i < os.length; i++) this.positionOverlay(os[i]);
this.gotOverlays = true;
},
genOverlayBox : function() {
if (!this.overlayBox) this.overlayBox = hs.createElement (
'div', {
className: this.wrapperClassName
}, {
position : 'absolute',
width: (this.x.size || (this.useBox ? this.width : null)
|| this.x.full) +'px',
height: (this.y.size || this.y.full) +'px',
visibility : 'hidden',
overflow : 'hidden',
zIndex : hs.ie ? 4 : 'auto'
},
hs.container,
true
);
},
sizeOverlayBox : function(doWrapper, doPanels) {
var overlayBox = this.overlayBox,
x = this.x,
y = this.y;
hs.setStyles( overlayBox, {
width: x.size +'px',
height: y.size +'px'
});
if (doWrapper || doPanels) {
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
var ie6 = (hs.ieLt7 || document.compatMode == 'BackCompat');
if (o && /^(above|below)$/.test(o.position)) {
if (ie6) {
o.style.width = (overlayBox.offsetWidth + 2 * x.cb
+ x.p1 + x.p2) +'px';
}
y[o.position == 'above' ? 'p1' : 'p2'] = o.offsetHeight;
}
if (o && ie6 && /^(left|right)panel$/.test(o.position)) {
o.style.height = (overlayBox.offsetHeight + 2* y.cb) +'px';
}
}
}
if (doWrapper) {
hs.setStyles(this.content, {
top: y.p1 +'px'
});
hs.setStyles(overlayBox, {
top: (y.p1 + y.cb) +'px'
});
}
},
showOverlays : function() {
var b = this.overlayBox;
b.className = '';
hs.setStyles(b, {
top: (this.y.p1 + this.y.cb) +'px',
left: (this.x.p1 + this.x.cb) +'px',
overflow : 'visible'
});
if (hs.safari) b.style.visibility = 'visible';
this.wrapper.appendChild (b);
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
o.style.zIndex = o.hsId == 'controls' ? 5 : 4;
if (!o.hideOnMouseOut || this.mouseIsOver) {
o.style.visibility = 'visible';
hs.setStyles(o, { visibility: 'visible', display: '' });
hs.animate(o, { opacity: o.opacity }, o.dur);
}
}
},
destroyOverlays : function() {
if (!this.overlays.length) return;
if (this.slideshow) {
var c = this.slideshow.controls;
if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c);
}
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
if (o && o.parentNode == hs.viewport && hs.getExpander(o) == this) hs.discardElement(o);
}
if (this.isHtml && this.preserveContent) {
this.overlayBox.style.top = '-9999px';
hs.container.appendChild(this.overlayBox);
} else
hs.discardElement(this.overlayBox);
},
createFullExpand : function () {
if (this.slideshow && this.slideshow.controls) {
this.slideshow.enable('full-expand');
return;
}
this.fullExpandLabel = hs.createElement(
'a', {
href: 'javascript:hs.expanders['+ this.key +'].doFullExpand();',
title: hs.lang.fullExpandTitle,
className: 'highslide-full-expand'
}
);
if (!hs.fireEvent(this, 'onCreateFullExpand')) return;
this.createOverlay({
overlayId: this.fullExpandLabel,
position: hs.fullExpandPosition,
hideOnMouseOut: true,
opacity: hs.fullExpandOpacity
});
},
doFullExpand : function () {
try {
if (!hs.fireEvent(this, 'onDoFullExpand')) return;
if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel);
this.focus();
var xSize = this.x.size;
this.resizeTo(this.x.full, this.y.full);
var xpos = this.x.pos - (this.x.size - xSize) / 2;
if (xpos < hs.marginLeft) xpos = hs.marginLeft;
this.moveTo(xpos, this.y.pos);
this.doShowHide('hidden');
} catch (e) {
this.error(e);
}
},
afterClose : function () {
this.a.className = this.a.className.replace('highslide-active-anchor', '');
this.doShowHide('visible');
if (this.isHtml && this.preserveContent
&& this.transitions[1] != 'crossfade') {
this.sleep();
} else {
if (this.outline && this.outlineWhileAnimating) this.outline.destroy();
hs.discardElement(this.wrapper);
}
if (hs.mask) hs.mask.style.display = 'none';
this.destroyOverlays();
if (!hs.viewport.childNodes.length) hs.viewport.style.display = 'none';
if (this.dimmingOpacity) hs.undim(this.key);
hs.fireEvent(this, 'onAfterClose');
hs.expanders[this.key] = null;
hs.reOrder();
}
};
// hs.Ajax object prototype
hs.Ajax = function (a, content, pre) {
this.a = a;
this.content = content;
this.pre = pre;
};
hs.Ajax.prototype = {
run : function () {
var xhr;
if (!this.src) this.src = hs.getSrc(this.a);
if (this.src.match('#')) {
var arr = this.src.split('#');
this.src = arr[0];
this.id = arr[1];
}
if (hs.cachedGets[this.src]) {
this.cachedGet = hs.cachedGets[this.src];
if (this.id) this.getElementContent();
else this.loadHTML();
return;
}
try { xhr = new XMLHttpRequest(); }
catch (e) {
try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); }
catch (e) {
try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e) { this.onError(); }
}
}
var pThis = this;
xhr.onreadystatechange = function() {
if(pThis.xhr.readyState == 4) {
if (pThis.id) pThis.getElementContent();
else pThis.loadHTML();
}
};
var src = this.src;
this.xhr = xhr;
if (hs.forceAjaxReload)
src = src.replace(/$/, (/\?/.test(src) ? '&' : '?') +'dummy='+ (new Date()).getTime());
xhr.open('GET', src, true);
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.send(null);
},
getElementContent : function() {
hs.init();
var attribs = window.opera || hs.ie6SSL ? { src: 'about:blank' } : null;
this.iframe = hs.createElement('iframe', attribs,
{ position: 'absolute', top: '-9999px' }, hs.container);
this.loadHTML();
},
loadHTML : function() {
var s = this.cachedGet || this.xhr.responseText,
regBody;
if (this.pre) hs.cachedGets[this.src] = s;
if (!hs.ie || hs.uaVersion >= 5.5) {
s = s.replace(new RegExp('<link[^>]*>', 'gi'), '')
.replace(new RegExp('<script[^>]*>.*?</script>', 'gi'), '');
if (this.iframe) {
var doc = this.iframe.contentDocument;
if (!doc && this.iframe.contentWindow) doc = this.iframe.contentWindow.document;
if (!doc) { // Opera
var pThis = this;
setTimeout(function() { pThis.loadHTML(); }, 25);
return;
}
doc.open();
doc.write(s);
doc.close();
try { s = doc.getElementById(this.id).innerHTML; } catch (e) {
try { s = this.iframe.document.getElementById(this.id).innerHTML; } catch (e) {} // opera
}
hs.discardElement(this.iframe);
} else {
regBody = /(<body[^>]*>|<\/body>)/ig;
if (regBody.test(s)) s = s.split(regBody)[hs.ie ? 1 : 2];
}
}
hs.getElementByClass(this.content, 'DIV', 'highslide-body').innerHTML = s;
this.onLoad();
for (var x in this) this[x] = null;
}
};
hs.Slideshow = function (expKey, options) {
if (hs.dynamicallyUpdateAnchors !== false) hs.updateAnchors();
this.expKey = expKey;
for (var x in options) this[x] = options[x];
if (this.useControls) this.getControls();
if (this.thumbstrip) this.thumbstrip = hs.Thumbstrip(this);
};
hs.Slideshow.prototype = {
getControls: function() {
this.controls = hs.createElement('div', { innerHTML: hs.replaceLang(hs.skin.controls) },
null, hs.container);
var buttons = ['play', 'pause', 'previous', 'next', 'move', 'full-expand', 'close'];
this.btn = {};
var pThis = this;
for (var i = 0; i < buttons.length; i++) {
this.btn[buttons[i]] = hs.getElementByClass(this.controls, 'li', 'highslide-'+ buttons[i]);
this.enable(buttons[i]);
}
this.btn.pause.style.display = 'none';
//this.disable('full-expand');
},
checkFirstAndLast: function() {
if (this.repeat || !this.controls) return;
var exp = hs.expanders[this.expKey],
cur = exp.getAnchorIndex(),
re = /disabled$/;
if (cur == 0)
this.disable('previous');
else if (re.test(this.btn.previous.getElementsByTagName('a')[0].className))
this.enable('previous');
if (cur + 1 == hs.anchors.groups[exp.slideshowGroup || 'none'].length) {
this.disable('next');
this.disable('play');
} else if (re.test(this.btn.next.getElementsByTagName('a')[0].className)) {
this.enable('next');
this.enable('play');
}
},
enable: function(btn) {
if (!this.btn) return;
var sls = this, a = this.btn[btn].getElementsByTagName('a')[0], re = /disabled$/;
a.onclick = function() {
sls[btn]();
return false;
};
if (re.test(a.className)) a.className = a.className.replace(re, '');
},
disable: function(btn) {
if (!this.btn) return;
var a = this.btn[btn].getElementsByTagName('a')[0];
a.onclick = function() { return false; };
if (!/disabled$/.test(a.className)) a.className += ' disabled';
},
hitSpace: function() {
if (this.autoplay) this.pause();
else this.play();
},
play: function(wait) {
if (this.btn) {
this.btn.play.style.display = 'none';
this.btn.pause.style.display = '';
}
this.autoplay = true;
if (!wait) hs.next(this.expKey);
},
pause: function() {
if (this.btn) {
this.btn.pause.style.display = 'none';
this.btn.play.style.display = '';
}
clearTimeout(this.autoplay);
this.autoplay = null;
},
previous: function() {
this.pause();
hs.previous(this.btn.previous);
},
next: function() {
this.pause();
hs.next(this.btn.next);
},
move: function() {},
'full-expand': function() {
hs.getExpander().doFullExpand();
},
close: function() {
hs.close(this.btn.close);
}
};
hs.Thumbstrip = function(slideshow) {
function add (exp) {
hs.extend(options || {}, {
overlayId: dom,
hsId: 'thumbstrip',
className: 'highslide-thumbstrip-'+ mode +'-overlay ' + (options.className || '')
});
if (hs.ieLt7) options.fade = 0;
exp.createOverlay(options);
hs.setStyles(dom.parentNode, { overflow: 'hidden' });
};
function scroll (delta) {
selectThumb(undefined, Math.round(delta * dom[isX ? 'offsetWidth' : 'offsetHeight'] * 0.7));
};
function selectThumb (i, scrollBy) {
if (i === undefined) for (var j = 0; j < group.length; j++) {
if (group[j] == hs.expanders[slideshow.expKey].a) {
i = j;
break;
}
}
if (i === undefined) return;
var as = dom.getElementsByTagName('a'),
active = as[i],
cell = active.parentNode,
left = isX ? 'Left' : 'Top',
right = isX ? 'Right' : 'Bottom',
width = isX ? 'Width' : 'Height',
offsetLeft = 'offset' + left,
offsetWidth = 'offset' + width,
overlayWidth = div.parentNode.parentNode[offsetWidth],
minTblPos = overlayWidth - table[offsetWidth],
curTblPos = parseInt(table.style[isX ? 'left' : 'top']) || 0,
tblPos = curTblPos,
mgnRight = 20;
if (scrollBy !== undefined) {
tblPos = curTblPos - scrollBy;
if (minTblPos > 0) minTblPos = 0;
if (tblPos > 0) tblPos = 0;
if (tblPos < minTblPos) tblPos = minTblPos;
} else {
for (var j = 0; j < as.length; j++) as[j].className = '';
active.className = 'highslide-active-anchor';
var activeLeft = i > 0 ? as[i - 1].parentNode[offsetLeft] : cell[offsetLeft],
activeRight = cell[offsetLeft] + cell[offsetWidth] +
(as[i + 1] ? as[i + 1].parentNode[offsetWidth] : 0);
if (activeRight > overlayWidth - curTblPos) tblPos = overlayWidth - activeRight;
else if (activeLeft < -curTblPos) tblPos = -activeLeft;
}
var markerPos = cell[offsetLeft] + (cell[offsetWidth] - marker[offsetWidth]) / 2 + tblPos;
hs.animate(table, isX ? { left: tblPos } : { top: tblPos }, null, 'easeOutQuad');
hs.animate(marker, isX ? { left: markerPos } : { top: markerPos }, null, 'easeOutQuad');
scrollUp.style.display = tblPos < 0 ? 'block' : 'none';
scrollDown.style.display = (tblPos > minTblPos) ? 'block' : 'none';
};
// initialize
var group = hs.anchors.groups[hs.expanders[slideshow.expKey].slideshowGroup || 'none'],
options = slideshow.thumbstrip,
mode = options.mode || 'horizontal',
floatMode = (mode == 'float'),
tree = floatMode ? ['div', 'ul', 'li', 'span'] : ['table', 'tbody', 'tr', 'td'],
isX = (mode == 'horizontal'),
dom = hs.createElement('div', {
className: 'highslide-thumbstrip highslide-thumbstrip-'+ mode,
innerHTML:
'<div class="highslide-thumbstrip-inner">'+
'<'+ tree[0] +'><'+ tree[1] +'></'+ tree[1] +'></'+ tree[0] +'></div>'+
'<div class="highslide-scroll-up"><div></div></div>'+
'<div class="highslide-scroll-down"><div></div></div>'+
'<div class="highslide-marker"><div></div></div>'
}, {
display: 'none'
}, hs.container),
domCh = dom.childNodes,
div = domCh[0],
scrollUp = domCh[1],
scrollDown = domCh[2],
marker = domCh[3],
table = div.firstChild,
tbody = dom.getElementsByTagName(tree[1])[0],
tr;
for (var i = 0; i < group.length; i++) {
if (i == 0 || !isX) tr = hs.createElement(tree[2], null, null, tbody);
(function(){
var a = group[i],
cell = hs.createElement(tree[3], null, null, tr),
pI = i;
hs.createElement('a', {
href: a.href,
onclick: function() {
hs.getExpander(this).focus();
return hs.transit(a);
},
innerHTML: hs.stripItemFormatter ? hs.stripItemFormatter(a) : a.innerHTML
}, null, cell);
})();
}
if (!floatMode) {
scrollUp.onclick = function () { scroll(-1); };
scrollDown.onclick = function() { scroll(1); };
hs.addEventListener(tbody, document.onmousewheel !== undefined ?
'mousewheel' : 'DOMMouseScroll', function(e) {
var delta = 0;
e = e || window.event;
if (e.wheelDelta) {
delta = e.wheelDelta/120;
if (hs.opera) delta = -delta;
} else if (e.detail) {
delta = -e.detail/3;
}
if (delta) scroll(-delta * 0.2);
if (e.preventDefault) e.preventDefault();
e.returnValue = false;
});
}
return {
add: add,
selectThumb: selectThumb
}
};
hs.langDefaults = hs.lang;
// history
var HsExpander = hs.Expander;
if (hs.ie) {
(function () {
try {
document.documentElement.doScroll('left');
} catch (e) {
setTimeout(arguments.callee, 50);
return;
}
hs.ready();
})();
}
hs.addEventListener(document, 'DOMContentLoaded', hs.ready);
hs.addEventListener(window, 'load', hs.ready);
// set handlers
hs.addEventListener(document, 'ready', function() {
if (hs.expandCursor || hs.dimmingOpacity) {
var style = hs.createElement('style', { type: 'text/css' }, null,
document.getElementsByTagName('HEAD')[0]);
function addRule(sel, dec) {
if (!hs.ie) {
style.appendChild(document.createTextNode(sel + " {" + dec + "}"));
} else {
var last = document.styleSheets[document.styleSheets.length - 1];
if (typeof(last.addRule) == "object") last.addRule(sel, dec);
}
}
function fix(prop) {
return 'expression( ( ( ignoreMe = document.documentElement.'+ prop +
' ? document.documentElement.'+ prop +' : document.body.'+ prop +' ) ) + \'px\' );';
}
if (hs.expandCursor) addRule ('.highslide img',
'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;');
addRule ('.highslide-viewport-size',
hs.ie && (hs.uaVersion < 7 || document.compatMode == 'BackCompat') ?
'position: absolute; '+
'left:'+ fix('scrollLeft') +
'top:'+ fix('scrollTop') +
'width:'+ fix('clientWidth') +
'height:'+ fix('clientHeight') :
'position: fixed; width: 100%; height: 100%; left: 0; top: 0');
}
});
hs.addEventListener(window, 'resize', function() {
hs.getPageSize();
if (hs.viewport) for (var i = 0; i < hs.viewport.childNodes.length; i++) {
var node = hs.viewport.childNodes[i],
exp = hs.getExpander(node);
exp.positionOverlay(node);
if (node.hsId == 'thumbstrip') exp.slideshow.thumbstrip.selectThumb();
}
});
hs.addEventListener(document, 'mousemove', function(e) {
hs.mouse = { x: e.clientX, y: e.clientY };
});
hs.addEventListener(document, 'mousedown', hs.mouseClickHandler);
hs.addEventListener(document, 'mouseup', hs.mouseClickHandler);
hs.addEventListener(document, 'ready', hs.setClickEvents);
hs.addEventListener(window, 'load', hs.preloadImages);
hs.addEventListener(window, 'load', hs.preloadAjax);
} | 123gohelmetsv2 | trunk/js/highslide/highslide-full.js | JavaScript | asf20 | 99,582 |
.closebutton {
/* NOTE! This URL is relative to the HTML page, not the CSS */
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='../highslide/graphics/close.png', sizingMethod='scale');
background: none;
cursor: hand;
}
/* Viewport fixed hack */
.highslide-viewport {
position: absolute;
left: expression( ( ( ignoreMe1 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
top: expression( ( ignoreMe2 = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) + 'px' );
width: expression( ( ( ignoreMe3 = document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) ) + 'px' );
height: expression( ( ( ignoreMe4 = document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) ) + 'px' );
}
/* Thumbstrip PNG fix */
.highslide-scroll-down, .highslide-scroll-up {
position: relative;
overflow: hidden;
}
.highslide-scroll-down div, .highslide-scroll-up div {
/* NOTE! This URL is relative to the HTML page, not the CSS */
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='../highslide/graphics/scrollarrows.png', sizingMethod='scale');
background: none !important;
position: absolute;
cursor: hand;
width: 75px;
height: 75px !important;
}
.highslide-thumbstrip-horizontal .highslide-scroll-down div {
left: -50px;
top: -15px;
}
.highslide-thumbstrip-horizontal .highslide-scroll-up div {
top: -15px;
}
.highslide-thumbstrip-vertical .highslide-scroll-down div {
top: -50px;
}
/* Thumbstrip marker arrow trasparent background fix */
.highslide-thumbstrip .highslide-marker {
border-color: white; /* match the background */
}
.dark .highslide-thumbstrip-horizontal .highslide-marker {
border-color: #111;
}
.highslide-viewport .highslide-marker {
border-color: #333;
}
.highslide-thumbstrip {
float: left;
}
/* Positioning fixes for the control bar */
.text-controls .highslide-controls {
width: 480px;
}
.text-controls a span {
width: 4em;
}
.text-controls .highslide-full-expand a span {
width: 0;
}
.text-controls .highslide-close a span {
width: 0;
}
| 123gohelmetsv2 | trunk/js/highslide/highslide-ie6.css | CSS | asf20 | 2,294 |
// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
var Scriptaculous = {
Version: '1.5.1',
require: function(libraryName) {
// inserting via DOM fails in Safari 2.0, so brute force approach
document.write('<script type="text/javascript" src="'+libraryName+'"></script>');
},
load: function() {
if((typeof Prototype=='undefined') ||
parseFloat(Prototype.Version.split(".")[0] + "." +
Prototype.Version.split(".")[1]) < 1.4)
throw("script.aculo.us requires the Prototype JavaScript framework >= 1.4.0");
$A(document.getElementsByTagName("script")).findAll( function(s) {
return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
}).each( function(s) {
var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
var includes = s.src.match(/\?.*load=([a-z,]*)/);
(includes ? includes[1] : 'builder,effects,dragdrop,controls,slider').split(',').each(
function(include) { Scriptaculous.require(path+include+'.js') });
});
}
}
Scriptaculous.load(); | 123gohelmetsv2 | trunk/js/scriptaculous.js | JavaScript | asf20 | 2,152 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("Strings.php"); //--> String utils
include_once("customerSession.inc.php");
include_once ("Session.php"); //-- Session
include_once ("Password.php"); //-- Password
include_once ("Validation.php"); //-- Validation
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
$common = new Common();
$objStrings = new Strings();
$objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
$objValidation = new Validation(); //--> Validation
$objPassword = new Password();
$objCart = new Cart(); //--> Cart
session_start();
$isLogin = false;
if($objSession->exist()) {
$isLogin = true;
}
if($_SESSION['cart'])
$objCart = unserialize($_SESSION['cart']);
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->debugging = false;
$smarty->caching = false;
if(isset($_POST['email'])){
$email = $_POST['email'];
if(empty($email)){
$error_message = 'The email is required.';
}else if(!$objValidation->isEmail($email)){
$error_message = 'The email format invalid.';
}
if(empty($error_message)){
$customer = $common->getRow(DB_TAG_SYSTEM, "SELECT id, firstname, lastname FROM customers WHERE email = '$email'");
if(is_array($customer) && count($customer) > 0){
$new_password = $objPassword->getRandomValue(6);
$crypted_password = addslashes ($objPassword->encrypt($new_password));
$sql = "update customers set password = '$crypted_password' where id = " . (int)$customer['id'];
$common->update(DB_TAG_SYSTEM, $sql);
$ip = get_client_ip();
$emailContent = "<div><br>
A new password was requested from $ip.<br>
<br>
Your new password to '<a href='http://123gohelmets.com' target='_blank''>123gohelmets.com</a>' is:<br>
<br>
$new_password<br>
<br>
<br>
<br>
</div>";
$subject = '123gohelmets.com - New Password';
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=utf8\r\n";
/* additional headers */
$headers .= "From: Sam <atvglove@gmail.com>\r\n";
/* and now mail it */
$siSuccess = mail($email, $subject, $emailContent, $headers);
if($siSuccess){
$error_message = 'Success: A new password has been sent to your e-mail address.';
}else
$error_message = 'Failed: get new password failed.';
}else{
$error_message = 'Error: The E-Mail Address was not found in our records, please try again.';
}
}
}
function get_client_ip()
{
if ($_SERVER['REMOTE_ADDR']) {
$cip = $_SERVER['REMOTE_ADDR'];
} elseif (getenv("REMOTE_ADDR")) {
$cip = getenv("REMOTE_ADDR");
} elseif (getenv("HTTP_CLIENT_IP")) {
$cip = getenv("HTTP_CLIENT_IP");
} else {
$cip = "unknown";
}
return $cip;
}
$smarty->assign('HOME_URL', HOME_URL);
$smarty->assign('HOME_URL_HTTP', HOME_URL);
$smarty->assign('error_message', $error_message);
$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);
$smarty->assign('isLogin', $isLogin);
$smarty->display('passwordForgotten.html');
?>
| 123gohelmetsv2 | trunk/passwordForgotten.php | PHP | asf20 | 3,798 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once("customerSession.inc.php");
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("UploadFiles.php"); //--> UploadFiles
include_once("Customer.php"); //--> Customer
include_once("Country.php"); //--> Country
include_once("AddressBook.php"); //--> AddressBook
include_once("Validation.php"); //--> Validation
include_once ("Session.php"); //-- Session
include_once ("Password.php"); //-- Password
include_once("Strings.php"); //--> String utils
include_once("Zone.php"); //--> Zone
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
$common = new Common();
$objPassword = new Password();
$objCountry = new Country(0); //--> Country
$objCustomer = new Customer(DB_TAG_SYSTEM, $uid); //--> Customer
$objAddressBook = new AddressBook($uid); //--> AddressBook
$objValidation = new Validation($uid); //--> Validation
$ins_session = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
$objCart = new Cart(); //--> Cart
$objStrings = new Strings();
$objZone = new Zone(0); //--> Zone
session_start();
if($_SESSION['cart'])
$objCart = unserialize($_SESSION['cart']);
$customerid = 0;
$zoneid = 0;
if(isset($_POST['country']))
$country = $_POST['country'];
else
$country = 223;
if(isset($_POST['email_address'])){
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$email = $_POST['email_address'];
$telephone = $_POST['telephone'];
$fax = $_POST['fax'];
$country = $_POST['country'];
$company = $_POST['company'];
$postcode = $_POST['postcode'];
$state = $_POST['state'];
$zoneid = $_POST['zoneid'];
$city = $_POST['city'];
$street = $_POST['street_address'];
$newsletter = $_POST['newsletter'];
$password = $_POST['password'];
$confirmation = $_POST['confirmation'];
$address_id = 0;
if(empty($newsletter))
$newsletter = 'unsubscribed';
if(empty($firstname))
$error_message = 'The first name should\'t be empty.';
else if(empty($lastname)){
$error_message = 'The first name should\'t be empty.';
}else if(empty($email)){
$error_message = 'The email should\'t be empty.';
}else if(!$objValidation->isEmail($email)){
$error_message = 'The email format invalid.';
}else if($objCustomer->IsExistEmail($email)){
$error_message = 'Your E-Mail Address already exists in our records - please log in with the e-mail address or create an account with a different address.';
}
if(empty($state) && !empty($zoneid)){
$sql = "SELECT name FROM zones WHERE id = $zoneid";
$state = $common->getColumn(DB_TAG_PUBLIC, $sql);
}else
$zoneid = 0;
if(empty($error_message)){
$passwordmd5= $objPassword->encrypt($password);
$id = $objCustomer->add($gender, $firstname, $lastname, $email, $address_id, $telephone, $fax, $newsletter, $passwordmd5, $country);
if($id){
$address_id = $objAddressBook->add($id, $gender, $company, $firstname, $lastname, $street, $suburb, $postcode, $city, $state, $country, $zoneid);
$sql = "UPDATE customers SET modifiedTime = UTC_TIMESTAMP(), default_address_id = '$address_id' WHERE id = $id";
$isSuccess = $common->update(DB_TAG_SYSTEM, $sql);
$error_message = 'register successfully.';
$emailContent = "<div><br>
Dear $lastname<br>
<br>
We welcome you to <a href=\"http://123gohelmets.com\" target=\"_blank\">123gohelmets.com</a>.<br>
<br>
You can now take part in the various services we have to offer you. Some of these services include:<br>
<br>
Permanent Cart - Any products added to your online cart remain there until you remove them, or check them out.<br>
Address Book - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.<br>
Order History - View your history of purchases that you have made with us.<br>
Products Reviews - Share your opinions on products with our other customers.<br>
<br>
For help with any of our online services, please email the store-owner: <a href=\"mailto:atvglove@gmail.com\">atvglove@gmail.com</a>.<br>
<br>
Note: This email address was given to us by one of our customers. If you did not signup to be a member, please send an email to <a href=\"mailto:atvglove@gmail.com\">atvglove@gmail.com</a>.<br>
<br>
<br>
</div>";
$subject = 'Welcome to 123gohelmets.com';
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=utf8\r\n";
/* additional headers */
$headers .= "From: Sam <atvglove@gmail.com>\r\n";
/* and now mail it */
@mail($email, $subject, $emailContent, $headers);
$arrdata = array();
$arrdata['uname'] = $lastname; //--> add login name to session
if(is_array($ins_session->start($id, $arrdata))){
}
$location = HOME_URL . '/myaccount.php';
header("Location: $location");
exit;
}else{
$error_message = 'register failure.';
}
}
}
include_once("includeCategory.php"); //--> include category
include_once("includeSpec.php"); //--> include spec
$arrCountries = $objCountry->getGroupList();
$arrZones = $objZone->getGroupList($country);
if(count($arrZones) > 0)
$hasZone = 'yes';
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->caching = CACHING;
$smarty->cache_lifetime = CACHE_LIFETIME;
$smarty->assign('HOME_URL', HOME_URL);
$smarty->assign('HOME_URL_HTTP', HOME_URL);
$smarty->assign('error_message', $error_message);
$smarty->assign('categorys', $categorys);
$smarty->assign('topCategory', $topCategory);
$smarty->assign('specProducts', $specProducts);
$smarty->assign('country', $country);
$smarty->assign('arrCountries', $arrCountries);
$smarty->assign('hasZone', $hasZone);
$smarty->assign('arrZones', $arrZones);
$smarty->assign('zoneid', $zoneid);
$smarty->assign('firstname', $firstname);
$smarty->assign('lastname', $lastname);
$smarty->assign('email_address', $email);
$smarty->assign('telephone', $telephone);
$smarty->assign('fax', $fax);
$smarty->assign('company', $company);
$smarty->assign('postcode', $postcode);
$smarty->assign('state', $state);
$smarty->assign('city', $city);
$smarty->assign('street_address', $street);
$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);
$smarty->display('register.html');
?>
| 123gohelmetsv2 | trunk/register.php | PHP | asf20 | 7,209 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("Strings.php"); //--> String utils
include_once("customerSession.inc.php");
include_once("Session.php"); //-- Session
$common = new Common();
$objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
if($objSession->exist()) {
$customerid = $objSession->getUserID();
}else
$customerid = 0;
if(isset($_POST['id']))
$id = $_POST['id'];
else
$id = $_GET['id'];
if(isset($_POST['content'])){
$title = $_POST['title'];
$content = $_POST['content'];
$rating = $_POST['rating'];
$yourName = $_POST['yourName'];
$location = $_POST['location'];
if(empty($content)){
$error_message = 'The content is required.';
}else if(empty($rating)){
$error_message = 'Please select rating.';
}else if(empty($yourName)){
$error_message = 'Your name is required.';
}else if(empty($title)){
$error_message = 'Title is required.';
}
if(empty($error_message)){
$arrData = array(
'product_id' => $id,
'customer_id' => $customerid,
'title' => strip_tags($title),
'content' => strip_tags($content),
'rating' => $rating,
'userName' => strip_tags($yourName),
'location' => strip_tags($location)
);
$common->insertUpdate(DB_TAG_PUBLIC, 'reviews', $arrData);
$error_message = 'Reviews is written, Please click close.';
}
}
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->caching = false;
$smarty->cache_lifetime = CACHE_LIFETIME;
$smarty->assign('HOME_URL', HOME_URL);
$smarty->assign('HOME_URL_HTTP', HOME_URL);
$smarty->assign('error_message', $error_message);
$smarty->assign('id', $id);
$smarty->assign('title', $title);
$smarty->assign('content', $content);
$smarty->assign('yourName', $yourName);
$smarty->assign('location', $location);
$smarty->display('writeReview.html');
?>
| 123gohelmetsv2 | trunk/writeReview.php | PHP | asf20 | 2,321 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("UploadFiles.php"); //--> UploadFiles
include_once("customerSession.inc.php");
include_once ("Session.php"); //-- Session
include_once("Strings.php"); //--> String utils
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
require_once('includeHttps.php');
$common = new Common();
$objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
$objCart = new Cart(); //--> Cart
$objStrings = new Strings();
$isLogin = false;
/*----- check session -----*/
if($objSession->exist()) {
$isLogin = true;
$customerid = $objSession->getUserID();
}else{
$location = './myaccount.php';
header("Location: $location");
exit;
}
session_start();
if($_SESSION['cart'])
$objCart = unserialize($_SESSION['cart']);
include_once("includeCategory.php"); //--> include category
include_once("includeSpec.php"); //--> include spec
$orders = array();
$where = "orders WHERE customers_id = $customerid";
$arrOrders = $common->listCustom(DB_TAG_PUBLIC, '*',$where , ' ORDER by id desc', $page, 3);
foreach($arrOrders as $key => $value){
$total = $common->getColumn(DB_TAG_PUBLIC, "SELECT sum(quantity) FROM orders_products WHERE ordersID = " . $value['id']);
$value['total'] = $total;
$orders[] = $value;
}
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->force_compile = false;
$smarty->debugging = false;
$smarty->caching = false;
$smarty->cache_lifetime = 120;
$smarty->assign('error_message', $error_message);
$smarty->assign('HOME_URL', HOME_URL);
$smarty->assign('HOME_URL_HTTP', HOME_URL);
$smarty->assign('categorys', $categorys);
$smarty->assign('topCategory', $topCategory);
$smarty->assign('specProducts', $specProducts);
$smarty->assign('arrDataList', $orders);
$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);
$smarty->assign('pageList', $common->getPageList());
$smarty->assign('total', $common->getTotal());
$smarty->assign('nextPage', $common->getNextPage());
$smarty->assign('prePage', $common->getPrePage());
$smarty->assign('pageCount', $common->getPageCount());
$smarty->assign('page', $common->getPage());
$smarty->assign('startPostion', $common->getStartPosition());
$smarty->assign('endPosition', $common->getEndPostion());
$smarty->assign('isLogin', $isLogin);
$smarty->display('ordersList.html');
?>
| 123gohelmetsv2 | trunk/ordersList.php | PHP | asf20 | 2,987 |
<?php
if(is_object($oCoupon)){
$couponCode = $oCoupon->getCode();
}
$saveoff = 0;
if($objOrdersInfo->getAccount()->getSaveOff() > 0){
$saveoff = $objOrdersInfo->getAccount()->getSaveOff();
}
$paymentInfo = '';
if($paymentMethod == "Credit Card"){
$paymentInfo =
"<br><b>Card Type:</b> " . $objOrdersDao->getCCType() ."
<br> <b>Card Number:</b> " . $objOrdersDao->getCCNumber() ."
<br> <b>Exp. Date:</b> " . $objOrdersDao->getCCExpire() ."
";
}
$productContent = '';
foreach($objCart->getProductList() as $product){
$productContent .= "<tr valign=\"top\">
<td>". $product->getQuantity() . "</td>
<td>" . $product->getName() ;
$productContent .= "<nobr>";
foreach($product->getAttributeList() as $attribute){
$productContent .= "<br><small><i>- " . $attribute->getKey() . " : " . $attribute->getValue();
if($attribute->getPrice() != 0){
$productContent .= "($ +" . $attribute->getPrice() / 100 . ")";
}
$productContent .= "</i></small> ";
}
$productContent .= "</nobr>";
$productContent .= "</td>
<td align=\"right\"><b>$" . $product->getFinalPrice() / 100 . "</b></td>
<td align=\"right\" colspan='2'><b>$" . $product->getFinalPrice() / 100 * $product->getQuantity() . "</b></td>
</tr>";
}
$emailContent = "Thank you for shopping at 123gohelmets.com. This is a notification that your order has been received and is being processed. <br>" .
"The items you selected are listed below. Thank you again.<br>" .
"<table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\"><tbody><tr>
<td>
<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\">
<tbody><tr valign=\"top\">
<td width=\"50%\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\">
<tbody><tr>
<td bgcolor=\"#DDDDDD\"><b>Order Information</b></td>
</tr>
<tr>
<td><b>Order Number:</b> $ordersid
<br> <b>Order Date:</b> " . date("m/d/Y") . "
<br> <b>Order Time:</b> " . date("H:i:s") . "
</td>
</tr>
</tbody></table></td>
<td width=\"50%\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\">
<tbody><tr>
<td bgcolor=\"#DDDDDD\"><b>Customer Information</b></td>
</tr>
<tr>
<td><b>Phone:</b> " . $objCustomerDao->getTelephone() . "
<br>
<b>Email:</b> " . $objCustomerDao->getEmail() . "
<br>
<b>Email Updates:</b> Yes
<br>
<b>Comments:</b> " . $objOrdersInfo->getComments() . "
<br>
<br></td>
</tr>
</tbody></table></td>
</tr>
</tbody></table>
<br> <br> <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\">
<tbody><tr valign=\"top\">
<td width=\"33%\"> <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\">
<tbody><tr>
<td bgcolor=\"#DDDDDD\"><b>Billing</b></td>
</tr>
<tr>
<td>" . $oDeliveryAddress->getFirstName(). ' ' . $oDeliveryAddress->getLastName() . "
<br>
<br>" . $oDeliveryAddress->getStreet() . "
<br>" . $oDeliveryAddress->getCity() . ', ' . $oDeliveryAddress->getState() . ' ' . $oDeliveryAddress->getZipcode(). "
<br>" . $oDeliveryAddress->getCountry() . "
</td>
</tr>
</tbody></table></td>
<td width=\"33%\"> <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\">
<tbody><tr>
<td bgcolor=\"#DDDDDD\"><b>Shipping</b></td>
</tr>
<tr>
<td>" . $oDeliveryAddress->getFirstName(). ' ' . $oDeliveryAddress->getLastName() . "
<br>
<br>" . $oDeliveryAddress->getStreet() . "
<br>" . $oDeliveryAddress->getCity() . ', ' . $oDeliveryAddress->getState() . ' ' . $oDeliveryAddress->getZipcode(). "
<br>" . $oDeliveryAddress->getCountry() . "
</td>
</tr>
</tbody></table></td>
<td width=\"33%\"> <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\">
<tbody><tr>
<td bgcolor=\"#DDDDDD\"><b>Payment</b></td>
</tr>
<tr>
<td><b>Method:</b> $paymentMethod
<br>
<b>Transaction ID:</b> $tran_ID
". $paymentInfo . "
<br><b>Promotion Code:</b> $couponCode
</td>
</tr>
</tbody></table></td>
</tr>
</tbody></table>
<br> <br> <table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\">
<tbody><tr>
<td bgcolor=\"#DDDDDD\"><b>Qty</b></td>
<td bgcolor=\"#DDDDDD\" width=\"50%\"><b>Title</b></td>
<td bgcolor=\"#DDDDDD\" align=\"right\"><b>Unit</b></td>
<td bgcolor=\"#DDDDDD\" align=\"right\" colspan='2'><b>Item Total</b></td>
</tr>
$productContent
<tr>
<td colspan=\"4\" align=\"right\" style=\"border-top-width:1px;border-top-color:#000000;border-top-style:solid\">Subtotal:</td>
<td align=\"right\" style=\"border-top-width:1px;border-top-color:#000000;border-top-style:solid\"><b>$ $subTotal
</b></td>
</tr><tr>
<td colspan=\"4\" align=\"right\">Save Off:</td>
<td align=\"right\"><b><span style='text-decoration:line-through; color:#888;'>$ $saveoff</span>
</b></td>
</tr>
<tr>
<td colspan=\"4\" align=\"right\">Shipping & Handling:</td>
<td align=\"right\"><b>$ $shippingTotal
</b></td>
</tr>
<tr>
<td colspan=\"4\" align=\"right\">Sales Tax:</td>
<td align=\"right\"><b>$ $taxTotal
</b></td>
</tr>
<tr>
<td colspan=\"4\" align=\"right\">Total:</td>
<td align=\"right\"><b>$ $allTotal
</b></td>
</tr>
</tbody></table></td>
</tr>
</tbody></table>
";
?>
| 123gohelmetsv2 | trunk/includeOrderNoticeEmail.php | PHP | asf20 | 5,180 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once("./configure/page.php"); //--> page configure
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("Access.php"); //--> Access class
include_once("UploadFiles.php"); //--> UploadFiles
include_once("Strings.php"); //--> String utils
include_once("customerSession.inc.php");
include_once("Session.php"); //-- Session
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
$common = new Common();
$access = new Access(); //--> Access
$objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
$objStrings = new Strings();
$objCart = new Cart(); //--> Cart
session_start();
$isLogin = false;
if($objSession->exist()) {
$isLogin = true;
}
if(isset($_GET['page']))
$page = $_GET['page'];
else
$page = 1;
if(isset($_GET['cid']))
$categoryID = $_GET['cid'];
else
$categoryID = 0;
if($_SESSION['cart'])
$objCart = unserialize($_SESSION['cart']);
$categoryName = '';
$cacheID = $categoryID . '_' . $page;
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->debugging = false;
$smarty->caching = CACHING;
$smarty->cache_lifetime = CACHE_LIFETIME;
$smarty->assign('HOME_URL', HOME_URL);
$smarty->assign('HOME_URL_HTTP', HOME_URL);
$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);
if(!$smarty->isCached('productList.html', $cacheID)){
include_once("includeCategory.php"); //--> include category
include_once("includeSpec.php"); //--> include spec
if(empty($categoryID))
$where = "products p, products_description pd WHERE p.status in ('hot', 'normal') AND p.id = pd.productID AND pd.languageID = $LANGEUAGE_ID";
else
$where = "products p, products_description pd WHERE p.status in ('hot', 'normal') AND p.id = pd.productID AND pd.languageID = $LANGEUAGE_ID AND categoryID = $categoryID";
$products = array();
$allproducts = $common->listCustom(DB_TAG_PUBLIC, 'p.id, p.price, pd.name, p.status',$where , 'ORDER BY p.status, pd.name', $page, 15);
foreach($allproducts as $key => $value){
$arrImages = $common->getHash(DB_TAG_PUBLIC, "SELECT u.id, u.extName FROM upload_files u, product_images p WHERE u.id = p.imageID AND p.productID = ".$value['id']." AND type = " . UploadFiles::TYPE_IMAGE . ' ORDER BY p.isMain LIMIT 1');
if(count($arrImages) > 0){
$value['imageid'] = key($arrImages);
$value['imageExt'] = $arrImages[$value['imageid']];
}
$specialSql = "SELECT newPrice FROM specials WHERE expireDate > NOW() AND productID = " . $value['id'];
$newPrice = $common->getColumn(DB_TAG_PUBLIC, $specialSql);
if(!empty($newPrice))
$value['finalPrice'] = $newPrice;
else
$value['finalPrice'] = 0;
$sql = "SELECT descript FROM promotion WHERE status = 'normal' AND productId = " . $value['id'];
$promo = $common->getColumn(DB_TAG_PUBLIC, $sql);
if(!empty($promo))
$value['promo_descript'] = $promo;
else
$value['promo_descript'] = '';
$products[] = $value;
}
if(!empty($categoryID)){
foreach($categorys as $parentCid => $arrSubCat){
if(isset($arrSubCat[$categoryID])){
$categoryName = $arrSubCat[$categoryID];
}
}
}
/*----- out html -----*/
$smarty->assign('categorys', $categorys);
$smarty->assign('topCategory', $topCategory);
$smarty->assign('specProducts', $specProducts);
$smarty->assign('products', $products);
$smarty->assign('pageList', $common->getPageList());
$smarty->assign('nextPage', $common->getNextPage());
$smarty->assign('prePage', $common->getPrePage());
$smarty->assign('pageCount', $common->getPageCount());
$smarty->assign('page', $common->getPage());
}
$smarty->assign('categoryID', $categoryID);
$smarty->assign('categoryName', $categoryName);
$smarty->assign('isLogin', $isLogin);
$smarty->display('productList.html', $cacheID);
?>
| 123gohelmetsv2 | trunk/productList.php | PHP | asf20 | 4,436 |
<?php
$specProducts = array();
$allproducts = $common->listCustom(DB_TAG_PUBLIC, 'p.id, p.price, s.newPrice finalPrice, pd.name', "products p, products_description pd, specials s WHERE p.id = s.productID AND p.status = 'normal' AND p.id = pd.productID AND pd.languageID = $LANGEUAGE_ID AND s.expireDate > NOW()", 'ORDER BY p.id', 1, 3);
foreach($allproducts as $key => $value){
$arrImages = $common->getHash(DB_TAG_PUBLIC, "SELECT u.id, u.extName FROM upload_files u, product_images p WHERE u.id = p.imageID AND p.productID = ".$value['id']." AND type = " . UploadFiles::TYPE_IMAGE . ' ORDER BY p.isMain LIMIT 1');
if(count($arrImages) > 0){
$value['imageid'] = key($arrImages);
$value['imageExt'] = trim($arrImages[$value['imageid']]);
}
$specProducts[] = $value;
}
?>
| 123gohelmetsv2 | trunk/includeSpec.php | PHP | asf20 | 802 |
<?php
$categorys = array();
$topCategory = $common->getHash(DB_TAG_SYSTEM, 'SELECT id, name FROM info_class WHERE parentid = 0 ORDER BY sorts');
foreach($topCategory as $topid=>$name){
$categorys[$topid] = $common->getHash(DB_TAG_SYSTEM, "SELECT id, name FROM info_class WHERE parentid='$topid' ORDER BY sorts");
}
?>
| 123gohelmetsv2 | trunk/includeCategory.php | PHP | asf20 | 328 |
<?php
/*
* Created on Nov 27, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once './configure/ppsdk_include_path.inc';
include_once("customerSession.inc.php");
require_once 'PayPal.php';
require_once 'PayPal/Profile/Handler/Array.php';
require_once 'PayPal/Profile/API.php';
require_once 'paypal-app/SampleLogger.php';
require_once 'paypal-app/PaymentPro.php';
include_once ("paypal-app/PaypalInfo.php"); //-- for payment
include_once("Common.php");
include_once ("Session.php"); //-- Session
include_once ("Password.php"); //-- Password
include_once ("CustomerDao.php"); //-- for payment
include_once ("AddressBookDao.php"); //-- for payment
include_once ("orders/OrdersInfo.php"); //-- for payment
include_once ("orders/OrdersAccount.php"); //-- for payment
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
require_once('includeHttps.php');
session_start();
$common = new Common();
$objPassword = new Password();
$objCustomerDao = new CustomerDao();
$objOrdersInfo = new OrdersInfo();
$objPaypalInfo = new PaypalInfo();
$objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
$payment = new PaymentPro();
$logger = new SampleLogger('expressCheckout.php', PEAR_LOG_DEBUG);
$customerid = 0;
/*----- check session -----*/
if($objSession->exist()) {
$customerid = $objSession->getUserID();
}
if($_SESSION['cart']){
$objCart = unserialize($_SESSION['cart']);
}else{
$location = HOME_URL;
header("Location: $location");
exit;
}
$profile = $payment->sessionStart3Tokens();
$objPaypalInfo->setAPIProfile($profile);
if(isset($_SESSION['customerInfo'])){
$objCustomerDao = unserialize($_SESSION['customerInfo']);
}
if(isset($_SESSION['ordersInfo'])){
$objOrdersInfo = unserialize($_SESSION['ordersInfo']);
}
$APIprofile = $objPaypalInfo->getAPIProfile();
if(!isset($APIprofile) || empty($APIprofile)){
$location = 'checkout.php';
header("Location: $location");
}
$token = $_REQUEST['token'];
if(! isset($token)) {
$paymentAmount = $objOrdersInfo->getAccount()->getAllTotal();
$currencyCodeType = 'USD';
$paymentType = 'Sale';
$returnURL = HOME_URL_HTTPS . '/expressCheckout.php?paymentAmount='.$paymentAmount.'¤cyCodeType='.$currencyCodeType.'&paymentType='.$paymentType;
$cancelURL = HOME_URL . '/viewCart.php';
// $cancelURL = str_replace('expressCheckout', 'expressCheckoutCancel', $returnURL);
$ec_request =& PayPal::getType('SetExpressCheckoutRequestType');
//Setting up URL information.
$ec_details =& PayPal::getType('SetExpressCheckoutRequestDetailsType');
$ec_details->setReturnURL($returnURL);
$ec_details->setCancelURL($cancelURL);
$ec_details->setCallbackTimeout('20');
// $ec_details->setBuyerEmail($_POST['buyersemail']);
$ec_details->setPaymentAction($paymentType);
//Setting up OrderTotal.
$amt_type =& PayPal::getType('BasicAmountType');
$amt_type->setattr('currencyID', $currencyCodeType);
$amt_type->setval($paymentAmount, 'iso-8859-1');
$ec_details->setOrderTotal($amt_type);
// //Addition of Product Details.
// $paymentDetailsType = &PayPal::getType('PaymentDetailsType');
//
// $arrItems = array();
//
// $arrProducts = $objCart->getProductList();
// $len = count($arrProducts);
// for($i = 0; $i < $len; $i++){
// $paymentDetailsItem = &PayPal::getType('PaymentDetailsItemType');
// $paymentDetailsItem->setName($arrProducts[$i]->getName());
// $paymentDetailsItem->setQuantity($arrProducts[$i]->getQuantity(), 'iso-8859-1');
// $paymentDetailsItem->setAmount($arrProducts[$i]->getFinalPrice() / 100, 'iso-8859-1');
//
//
// $item = 'PaymentDetailsItem' . sprintf("%02d", $i);
// $arrItems[$item] = $paymentDetailsItem;
// }
//
// $paymentDetailsType->setPaymentDetailsItem($arrItems);
//
// //Setting up OrderTotal on PaymentDetails.
// $itemTotal_type =& PayPal::getType('BasicAmountType');
// $itemTotal_type->setattr('currencyID', $currencyCodeType);
// $itemTotal_type->setval($objOrdersInfo->getAccount()->getProductTotal(), 'iso-8859-1');
// $paymentDetailsType->setItemTotal($itemTotal_type);
//
//
// //Setting up Tax details
// $taxTotal_type =& PayPal::getType('BasicAmountType');
// $taxTotal_type->setattr('currencyID', $currencyCodeType);
// $taxTotal_type->setval($objOrdersInfo->getAccount()->getTaxTotal(), 'iso-8859-1');
// $paymentDetailsType->setTaxTotal($taxTotal_type);
//
// //Setting up Shipping Total on PaymentDetails.
// $shipamt_type = &PayPal::getType('BasicAmountType');
// $shipamt_type->setattr('currencyID', $currencyCodeType);
// $shipamt_type->setval($objOrdersInfo->getAccount()->getShippingTotal(), 'iso-8859-1');
// $paymentDetailsType->setShippingTotal($shipamt_type);
//
// $sDiscount = 0 - round($objCart->getSaveOff() / 100, 2);
//
// //Setting up the Shipping discount
// $sDiscount_type =& PayPal::getType('BasicAmountType');
// $sDiscount_type->setattr('currencyID', $currencyCodeType);
// $sDiscount_type->setval($sDiscount, 'iso-8859-1');
// $paymentDetailsType->setShippingDiscount($sDiscount_type);
//
//
// $ec_details->setPaymentDetails($paymentDetailsType);
//
$ec_request->setSetExpressCheckoutRequestDetails($ec_details);
/*
* Creating CallerServices object
*/
$caller =& PayPal::getCallerServices($objPaypalInfo->getAPIProfile());
$caller->USE_ARRAYKEY_AS_TAGNAME = true;
$caller->SUPRESS_OUTTAG_FOR_ARRAY = true;
$caller->OUTTAG_SUPRESS_ELEMENTS = array('PaymentDetailsItem','FlatRateShippingOptions');
// Execute SOAP request
$response = $caller->SetExpressCheckout($ec_request);
$logger->_log('SetExpressCheckout response: '. print_r($response,true));
$ack = $response->getAck();
$logger->_log('Ack='.$ack);
switch($ack) {
case ACK_SUCCESS:
case ACK_SUCCESS_WITH_WARNING:
// Good to break out;
// Redirect to paypal.com here
$token = $response->getToken();
$payPalURL = $payment->getPaypalURL().$token;
// $display=$payPalURL;
$logger->_log('Redirect to PayPal for payment: '. $payPalURL);
header("Location: ".$payPalURL);
exit;
default:
$_SESSION['response'] =& $response;
$logger->_log('SetExpressCheckout failed: ' . print_r($response, true));
$location = HOME_URL . "/lib/paypal-app/ApiError.php";
header("Location: $location");
}
} else {
// We have a TOKEN from paypal
// GetExpressCheckoutDetails handling here
$paymentType = $_REQUEST['paymentType'];
$token = $_REQUEST['token'];
$paymentAmount = $_REQUEST['paymentAmount'];
$currencyCodeType = $_REQUEST['currencyCodeType'];
$objPaypalInfo->setToken($token);
$objPaypalInfo->setPaymentType($paymentType);
$objPaypalInfo->setPaymentAmount($paymentAmount);
$objPaypalInfo->setCurrencyCodeType($currencyCodeType);
$objPaypalInfo->setPaymentMethod('PayPal');
$ec_request =& PayPal::getType('GetExpressCheckoutDetailsRequestType');
$ec_request->setToken($token);
$caller =& PayPal::getCallerServices($objPaypalInfo->getAPIProfile());
// Execute SOAP request
$response = $caller->GetExpressCheckoutDetails($ec_request);
$logger->_log('GetExpressCheckoutDetails response: '. print_r($response,true));
$ack = $response->getAck();
$logger->_log('Ack='.$ack);
switch($ack) {
case ACK_SUCCESS:
case ACK_SUCCESS_WITH_WARNING:
// Continue on based on the require below...
break;
default:
$_SESSION['response'] =& $response;
$logger->_log('SetExpressCheckout failed: ' . print_r($response, true));
$location = HOME_URL . "/lib/paypal-app/ApiError.php";
header("Location: $location");
}
// process shipping
$details = $response->getGetExpressCheckoutDetailsResponseDetails();
// This is the clients payer information
$payer_info = $details->getPayerInfo();
// get the payer_id from the clients payer info
$payer_id = $payer_info->getPayerID();
$fullname = $payer_info->getPayerName();
$address_info = $payer_info->getAddress();
$phone = $details->getContactPhone();
$objPaypalInfo->setPayerid($payer_id);
$country = $common->getRow(DB_TAG_SYSTEM, 'SELECT id, name, addrFormatID FROM countries WHERE code2 ="' . $address_info->Country . '"');
if(count($country) > 0){
$country_id = $country['id'];
$country_name = $country['name'];
$address_format_id = $country['addrFormatID'];
}else{
$country_id = '223';
$country_name = 'United States';
$address_format_id = '2'; // 2 is the American format
}
$state_id = $common->getColumn(DB_TAG_SYSTEM, 'SELECT id FROM zones WHERE code = \'' . $address_info->StateOrProvince . "' AND countryID = $country_id");
// see if we found a record
if (empty($state_id)) {
$state_id = 0; // default
}
$objAddressBookDao = new AddressBookDao();
$objAddressBookDao->setFirstName($fullname->FirstName);
$objAddressBookDao->setLastName($fullname->LastName);
$objAddressBookDao->setStreet($address_info->Street1);
$objAddressBookDao->setSuburb($address_info->Street2);
$objAddressBookDao->setCity($address_info->CityName);
$objAddressBookDao->setZoneid($state_id);
$objAddressBookDao->setState($address_info->StateOrProvince);
$objAddressBookDao->setZipcode($address_info->PostalCode);
$objAddressBookDao->setCountryid($country_id);
$objAddressBookDao->setCountry($country_name);
// not logined in.
if(empty($customerid)){
$customer = $common->getRow(DB_TAG_SYSTEM, 'SELECT id, paypal_ec, lastname FROM customers WHERE email ="' . $payer_info->Payer . '"');
// see if we found a record
if (count($customer) > 0) {
if ($customer['paypal_ec'] == '1') {
$sql = "DELETE FROM address_book WHERE customerid = " . $customer['id'];
$common->update(DB_TAG_SYSTEM, $sql);
$sql = "DELETE FROM customers WHERE id = " . $customer['id'];
$common->update(DB_TAG_SYSTEM, $sql);
$customer = array();
}else{
$customerid = $customer['id'];
}
}
if (count($customer) < 1) {
$salt = '46z3haZzegmn676PA3rUw2vrkhcLEn2p1c6gf7vp2ny4u3qqfqBh5j6kDhuLmyv9xf';
srand((double)microtime() * 1000000);
$password = '';
for ($x = 0; $x < 7; $x++) {
$num = rand() % 33;
$tmp = substr($salt, $num, 1);
$password = $password . $tmp;
}
$objCustomerDao->setFirstName($fullname->FirstName);
$objCustomerDao->setLastName($fullname->LastName);
$objCustomerDao->setEmail($payer_info->Payer);
$objCustomerDao->setTelephone($address_info->Phone);
$objCustomerDao->setFax('');
$objCustomerDao->setNewsletter(0);
$objCustomerDao->setPaypalEC(1);
$objCustomerDao->setPaypalPayerid($payer_id);
$objCustomerDao->setPassword($objPassword->encrypt($password));
$objCustomerDao->setCreatedTime('UTC_TIMESTAMP()');
$objCustomerDao->setModifiedTime('UTC_TIMESTAMP()');
$objCustomerDao->setCountryid($country_id);
$objCustomerDao->setNewsletter('unsubscribed');
$objCustomerDao->setAutoRegister(1);
// insert the data
$customerid = $common->insertUpdate(DB_TAG_SYSTEM, 'customers', $objCustomerDao->getArray());
$objCustomerDao->setID($customerid);
$objAddressBookDao->setCustomerid($customerid);
// insert the data
$addressid = $common->insertUpdate(DB_TAG_SYSTEM, 'address_book', $objAddressBookDao->getArray());
$objAddressBookDao->setID($addressid);
$objCustomerDao->setAddressid($addressid);
$sql = "UPDATE customers SET modifiedTime = UTC_TIMESTAMP(), default_address_id = '$addressid' WHERE id = $customerid";
$common->update(DB_TAG_SYSTEM, $sql);
}
$arrdata = array();
$arrdata['lastname'] = $objCustomerDao->getLastName(); //--> add login name to session
if(!is_array($objSession->start($customerid, $arrdata))){
$location = HOME_URL . "/lib/paypal-app/ApiError.php";
header("Location: $location");
exit;
}
}else{
$customer = $common->getRow(DB_TAG_SYSTEM, "SELECT * FROM customers WHERE id =$customerid");
$objCustomerDao->setID($customerid);
$objCustomerDao->setFirstName($customer['firstname']);
$objCustomerDao->setLastName($customer['lastname']);
$objCustomerDao->setEmail($customer['email']);
$objCustomerDao->setTelephone($customer['telephone']);
$objCustomerDao->setFax($customer['fax']);
$objCustomerDao->setNewsletter($customer['newsletter']);
$objCustomerDao->setPaypalEC($customer['paypal_ec']);
$objCustomerDao->setPaypalPayerid($customer['paypal_payerid']);
$objCustomerDao->setPassword($customer['password']);
$objCustomerDao->setCreatedTime('UTC_TIMESTAMP()');
$objCustomerDao->setModifiedTime('UTC_TIMESTAMP()');
$objCustomerDao->setCountryid($customer['countryid']);
$objCustomerDao->setAddressid($customer['default_address_id']);
}
$objOrdersInfo->setCustomerAddress($objAddressBookDao);
$objOrdersInfo->setBillingAddress($objAddressBookDao);
$objOrdersInfo->setPaymentMethod(OrdersInfo::EXPRESS_CHECKOUT);
$_SESSION['paypalInfo'] = serialize($objPaypalInfo);
$_SESSION['customerInfo'] = serialize($objCustomerDao);
$_SESSION['ordersInfo'] = serialize($objOrdersInfo);
$location = 'checkoutFinish.php';
header("Location: $location");
}
?>
| 123gohelmetsv2 | trunk/expressCheckout.php | PHP | asf20 | 14,430 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("UploadFiles.php"); //--> UploadFiles
include_once("customerSession.inc.php");
include_once ("Session.php"); //-- Session
include_once("Country.php"); //--> Country
include_once("AddressBook.php"); //--> AddressBook
include_once("Zone.php"); //--> Zone
include_once("Strings.php"); //--> String utils
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
require_once('includeHttps.php');
$common = new Common();
$objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
$objCountry = new Country(0); //--> Country
$objAddressBook = new AddressBook(0); //--> AddressBook
$objZone = new Zone(0); //--> Zone
$objCart = new Cart(); //--> Cart
$objStrings = new Strings();
$customerid = 0;
/*----- check session -----*/
if($objSession->exist()) {
$customerid = $objSession->getUserID();
}else{
$location = './myaccount.php';
header("Location: $location");
exit;
}
if($_SESSION['cart'])
$objCart = unserialize($_SESSION['cart']);
$firstname = '';
$lastname = '';
$company = '';
$postcode = '';
$state = '';
$city = '';
$street = '';
$zoneid = 0;
if(isset($_POST['countryId']))
$countryId = $_POST['countryId'];
else
$countryId = 223;
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$countryId = $_POST['countryId'];
$company = '';
$postcode = $_POST['postcode'];
$city = $_POST['city'];
$street = $_POST['street'];
$state = $_POST['state'];
$zoneid = $_POST['zoneid'];
$addressid = $_POST['addressid'];
/*----- add new address book -----*/
if(isset($_POST['action']) && $_POST['action'] == 'Submit'){
$gender = '';
$firstname = addslashes($firstname);
$lastname = addslashes($lastname);
$street = addslashes($street);
if(empty($zoneid))
$zoneid = $ZONE_ID;
if(empty($firstname))
$error_message = 'The first name should\'t be empty.';
else if(empty($lastname)){
$error_message = 'The last name should\'t be empty.';
}else if(empty($street)){
$error_message = 'The street address should\'t be empty.';
}else if(empty($postcode)){
$error_message = 'The postcode should\'t be empty.';
}else if(empty($city)){
$error_message = 'The city should\'t be empty.';
}
if(empty($state) && !empty($zoneid)){
$sql = "SELECT name FROM zones WHERE id = $zoneid";
$state = $common->getColumn(DB_TAG_PUBLIC, $sql);
}
if(empty($error_message)){
$sql = "UPDATE address_book SET gender='$gender', company='$company', firstname='$firstname', lastname='$lastname'," .
" street='$street', postcode='$postcode', city='$city', state='$state', countryid='$countryId', zoneid='$zoneid' WHERE id = $addressid";
$success = $common->update(DB_TAG_SYSTEM, $sql);
if($success){
$location = './addressBookList.php';
header("Location: $location");
exit;
}else{
$error_message = 'Add failure.';
}
}
}
/*----- edit address -----*/
if(isset($_GET['addressid']) && !isset($_POST['action'])){
$addressid = $_GET['addressid'];
$sql = "SELECT * FROM address_book WHERE id = $addressid";
$arrAddressBook = $common->getRow(DB_TAG_SYSTEM, $sql);
$firstname = $arrAddressBook['firstname'];
$lastname = $arrAddressBook['lastname'];
$countryId = $arrAddressBook['countryid'];
$company = $arrAddressBook['company'];
$postcode = $arrAddressBook['postcode'];
$state = $arrAddressBook['state'];
$city = $arrAddressBook['city'];
$street = $arrAddressBook['street'];
$zoneid = $arrAddressBook['zoneid'];
}
include_once("includeCategory.php"); //--> include category
include_once("includeSpec.php"); //--> include spec
$arrCountries = $objCountry->getGroupList();
/*-- get zone -----*/
$arrZones = $objZone->getGroupList($countryId);
if(count($arrZones) > 0)
$hasZone = 'yes';
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->force_compile = true;
$smarty->debugging = false;
$smarty->caching = false;
$smarty->cache_lifetime = 120;
$smarty->assign('error_message', $error_message);
$smarty->assign('HOME_URL', HOME_URL);
$smarty->assign('HOME_URL_HTTP', HOME_URL);
$smarty->assign('categorys', $categorys);
$smarty->assign('topCategory', $topCategory);
$smarty->assign('specProducts', $specProducts);
$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);
$smarty->assign('countryId', $countryId);
$smarty->assign('arrCountries', $arrCountries);
$smarty->assign('firstname', $firstname);
$smarty->assign('lastname', $lastname);
$smarty->assign('company', $company);
$smarty->assign('postcode', $postcode);
$smarty->assign('state', $state);
$smarty->assign('city', $city);
$smarty->assign('street', $street);
$smarty->assign('hasZone', $hasZone);
$smarty->assign('arrZones', $arrZones);
$smarty->assign('zoneid', $zoneid);
$smarty->assign('addressid', $addressid);
$smarty->display('addressBookEdit.html');
?>
| 123gohelmetsv2 | trunk/addressBookEdit.php | PHP | asf20 | 5,645 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("UploadFiles.php"); //--> UploadFiles
include_once("Strings.php"); //--> String utils
include_once("customerSession.inc.php");
include_once("Session.php"); //-- Session
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
$common = new Common();
$objStrings = new Strings();
$objCart = new Cart(); //--> Cart
$objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
session_start();
$isLogin = false;
if($objSession->exist()) {
$isLogin = true;
}
if($_SESSION['cart'])
$objCart = unserialize($_SESSION['cart']);
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->caching = CACHING;
$smarty->cache_lifetime = CACHE_LIFETIME;
$smarty->assign('HOME_URL', HOME_URL);
$smarty->assign('HOME_URL_HTTP', HOME_URL);
$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);
if(!$smarty->isCached('about.html')){
include_once("includeCategory.php"); //--> include category
include_once("includeSpec.php"); //--> include spec
$smarty->assign('categorys', $categorys);
$smarty->assign('topCategory', $topCategory);
$smarty->assign('specProducts', $specProducts);
}
$smarty->assign('isLogin', $isLogin);
$smarty->display('privacy.html');
?>
| 123gohelmetsv2 | trunk/privacy.php | PHP | asf20 | 1,845 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once './configure/ppsdk_include_path.inc';
include_once("customerSession.inc.php");
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("UploadFiles.php"); //--> UploadFiles
include_once ("Session.php"); //-- Session
require_once 'PayPal.php';
require_once 'PayPal/Profile/Handler/Array.php';
require_once 'PayPal/Profile/API.php';
require_once 'PayPal/Type/BasicAmountType.php';
require_once 'PayPal/Type/PaymentDetailsType.php';
require_once 'PayPal/Type/DoExpressCheckoutPaymentRequestType.php';
require_once 'PayPal/Type/DoExpressCheckoutPaymentRequestDetailsType.php';
require_once 'PayPal/Type/DoExpressCheckoutPaymentResponseType.php';
require_once 'paypal-app/SampleLogger.php';
require_once 'paypal-app/constants.inc.php';
include_once ("orders/OrdersAccount.php"); //-- for payment
include_once ("paypal-app/PaymentPro.php"); //-- for payment
include_once ("paypal-app/PaypalInfo.php"); //-- for payment
include_once ("CustomerDao.php");
include_once ("OrdersDao.php");
include_once ("AddressBookDao.php"); //-- for payment
include_once ("orders/OrdersInfo.php"); //-- for payment
include_once("Strings.php"); //--> String utils
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
include_once("CouponDomain.php"); //--> coupon domain
require_once('includeHttps.php');
session_start();
//define('PAYPAL_URL', 'https://www.' . ENVIRONMENT . '.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=');
$common = new Common();
$objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
$objCustomerDao = new CustomerDao();
$objOrdersDao = new OrdersDao();
$payment = new PaymentPro();
$objPaypalInfo = new PaypalInfo();
$logger = new SampleLogger('checkoutFinish.php', PEAR_LOG_DEBUG);
$objStrings = new Strings();
$objCart = new Cart(); //--> Cart
$objOrdersInfo = new OrdersInfo();
/*----- check session -----*/
$isLogin = false;
if($objSession->exist()) {
$isLogin = true;
$customerid = $objSession->getUserID();
$customer = $common->getRow(DB_TAG_SYSTEM, "SELECT * FROM customers WHERE id =$customerid");
$objCustomerDao->setID($customerid);
$objCustomerDao->setFirstName($customer['firstname']);
$objCustomerDao->setLastName($customer['lastname']);
$objCustomerDao->setEmail($customer['email']);
$objCustomerDao->setTelephone($customer['telephone']);
$objCustomerDao->setFax($customer['fax']);
$objCustomerDao->setNewsletter($customer['newsletter']);
$objCustomerDao->setPaypalEC($customer['paypal_ec']);
$objCustomerDao->setPaypalPayerid($customer['paypal_payerid']);
$objCustomerDao->setCountryid($customer['countryid']);
$objCustomerDao->setAddressid($customer['default_address_id']);
}else{
$location = HOME_URL . "/viewCart.php";
header("Location: $location");
}
if(isset($_SESSION['ordersInfo'])){
$objOrdersInfo = unserialize($_SESSION['ordersInfo']);
}else{
$location = HOME_URL;
header("Location: $location");
exit;
}
if($_SESSION['cart']){
$objCart = unserialize($_SESSION['cart']);
}else{
$location = HOME_URL;
header("Location: $location");
exit;
}
if(isset($_SESSION['customerInfo'])){
$objCustomer = unserialize($_SESSION['customerInfo']);
}
// orders has changed
if($objCart->getStatus() != Cart::STATUS_LOOKED){
$location = 'checkout.php';
header("Location: $location");
}
date_default_timezone_set('America/Los_Angeles');
$currency_cd = 'USD';
$paymentResponse = '';
$paymentMethod = '';
if($objOrdersInfo->getPaymentMethod() == OrdersInfo::EXPRESS_CHECKOUT){
$paymentMethod = "Paypal";
if(isset($_SESSION['paypalInfo'])){
$objPaypalInfo = unserialize($_SESSION['paypalInfo']);
}else{
$location = 'checkout.php';
header("Location: $location");
exit;
}
$profile = $objPaypalInfo->getAPIProfile();
if(!isset($profile) || empty($profile)){
$location = 'checkout.php';
header("Location: $location");
exit;
}
$paymentType = $objPaypalInfo->getPaymentType();
$token = $objPaypalInfo->getToken();
$payerID = $objPaypalInfo->getPayerid();
$currencyCodeType = $objPaypalInfo->getCurrencyCodeType();
$paymentAmount = $objOrdersInfo->getAccount()->getAllTotal();
$ec_details =& PayPal::getType('DoExpressCheckoutPaymentRequestDetailsType');
$ec_details->setToken($token);
$ec_details->setPayerID($payerID);
$ec_details->setPaymentAction($paymentType);
$amt_type =& PayPal::getType('BasicAmountType');
$amt_type->setattr('currencyID', $currencyCodeType);
$amt_type->setval($paymentAmount, 'iso-8859-1');
$payment_details =& PayPal::getType('PaymentDetailsType');
$payment_details->setOrderTotal($amt_type);
$ec_details->setPaymentDetails($payment_details);
$ec_request =& PayPal::getType('DoExpressCheckoutPaymentRequestType');
$ec_request->setDoExpressCheckoutPaymentRequestDetails($ec_details);
$caller =& PayPal::getCallerServices($profile);
// Execute SOAP request
$response = $caller->DoExpressCheckoutPayment($ec_request);
// $display = print_r($response, true);
$logger->_log('DoExpressCheckoutPayment response: '. print_r($response,true));
$ack = $response->getAck();
$logger->_log('Ack='.$ack);
switch ($ack) {
case ACK_SUCCESS:
case ACK_SUCCESS_WITH_WARNING:
// Show HTML below
break;
default:
$_SESSION['response'] =& $response;
$logger->_log('DoExpressCheckoutPayment failed: ' . print_r($response, true));
$location = HOME_URL . "/lib/paypal-app/ApiError.php";
header("Location: $location");
}
// Marshall data out of response
$details = $response->getDoExpressCheckoutPaymentResponseDetails();
$payment_info = $details->getPaymentInfo();
$tran_ID = $payment_info->getTransactionID();
$paymentStatus = $payment_info->getPaymentStatus();
$paymentType = $payment_info->getPaymentType();
$amt_obj = $payment_info->getGrossAmount();
$amt = $amt_obj->_value;
$currency_cd = $amt_obj->_attributeValues['currencyID'];
$display_amt = $currency_cd.' '.$amt;
//echo '$paymentAmount = ' . $paymentAmount . '<br>';
//echo '$tran_ID = ' . $tran_ID . '<br>';
//echo '$display_amt = ' . $display_amt . '<br>';
if ($paymentStatus == 'Pending') {
$pending_reason = $payment_info->getPendingReason();
$payment_status .= ' (' . $pending_reason . ')';
}
$paymentType = 'PayPal Express Checkout';
$comments = $objOrdersInfo->getComments();
if(!empty($comments)){
$paymentResponse = "$comments\n";
}
$paymentResponse .= "Transaction ID: $tran_ID\n" . "Payment Type: $paymentType\nPayment Status: $paymentStatus $payment_status";
}else if($objOrdersInfo->getPaymentMethod() == OrdersInfo::DIRECT_PAYMENT){
$paymentMethod = "Credit Card";
if(isset($_SESSION['paypalInfo'])){
$objPaypalInfo = unserialize($_SESSION['paypalInfo']);
}
$profile = $objPaypalInfo->getAPIProfile();
if(!is_object($profile)){
$profile = $payment->sessionStart3Tokens();
$objPaypalInfo->setAPIProfile($profile);
$_SESSION['paypalInfo'] = serialize($objPaypalInfo);
}
if(!isset($profile) || empty($profile)){
$location = 'checkout.php';
header("Location: $location");
exit;
}
// Build our request from $_POST
// $dp_request = new TransactionSearchRequestType();
$dp_request =& PayPal::getType('DoDirectPaymentRequestType');
if (PayPal::isError($dp_request)) {
$logger->_log('Error in request: '. print_r($dp_request, true));
} else {
$logger->_log('Create request: '. print_r($dp_request, true));
}
$logger->_log('Initial request: '. print_r($dp_request, true));
$objBillingAddress = $objOrdersInfo->getDeliveryAddress();
/**
* Get posted request values
*/
$paymentType = 'Sale';
$firstName = $objPaypalInfo->getCCFirstName();
$lastName = $objPaypalInfo->getCCLastName();
$creditCardType = $objPaypalInfo->getCCType();
$creditCardNumber = $objPaypalInfo->getCCNumber();
$expDateMonth = $objPaypalInfo->getCCExpiresMonth();
// Month must be padded with leading zero
// $padDateMonth = str_pad($expDateMonth, 2, '0', STR_PAD_LEFT);
$expDateYear = $objPaypalInfo->getCCYear();
$cvv2Number = $objPaypalInfo->getCCCheckCode();
$address1 = $objBillingAddress->getStreet();
$address2 = '';
$city = $objBillingAddress->getCity();
$state = $objBillingAddress->getState();
$zip = $objBillingAddress->getZipcode();
$country = 'US';
$paymentAmount = $objOrdersInfo->getAccount()->getAllTotal();;
// Populate SOAP request information
// Payment details
$OrderTotal =& PayPal::getType('BasicAmountType');
if (PayPal::isError($OrderTotal)) {
var_dump($OrderTotal);
exit;
}
$OrderTotal->setattr('currencyID', 'USD');
$OrderTotal->setval($paymentAmount, 'iso-8859-1');
$PaymentDetails =& PayPal::getType('PaymentDetailsType');
$PaymentDetails->setOrderTotal($OrderTotal);
$shipTo =& PayPal::getType('AddressType');
$shipTo->setName($firstName.' '.$lastName);
$shipTo->setStreet1($address1);
$shipTo->setStreet2($address2);
$shipTo->setCityName($city);
$shipTo->setStateOrProvince($state);
$shipTo->setCountry($country);
$shipTo->setPostalCode($zip);
$PaymentDetails->setShipToAddress($shipTo);
$dp_details =& PayPal::getType('DoDirectPaymentRequestDetailsType');
$dp_details->setPaymentDetails($PaymentDetails);
// Credit Card info
$card_details =& PayPal::getType('CreditCardDetailsType');
$card_details->setCreditCardType($creditCardType);
$card_details->setCreditCardNumber($creditCardNumber);
$card_details->setExpMonth($expDateMonth);
// $card_details->setExpMonth('01');
$card_details->setExpYear($expDateYear);
// $card_details->setExpYear('2010');
$card_details->setCVV2($cvv2Number);
$logger->_log('card_details: '. print_r($card_details, true));
$payer =& PayPal::getType('PayerInfoType');
$person_name =& PayPal::getType('PersonNameType');
$person_name->setFirstName($firstName);
$person_name->setLastName($lastName);
$payer->setPayerName($person_name);
$payer->setPayerCountry($country);
$payer->setAddress($shipTo);
$card_details->setCardOwner($payer);
$dp_details->setCreditCard($card_details);
$dp_details->setIPAddress($_SERVER['SERVER_ADDR']);
$dp_details->setPaymentAction($paymentType);
$dp_request->setDoDirectPaymentRequestDetails($dp_details);
$caller =& PayPal::getCallerServices($profile);
// Execute SOAP request
$response = $caller->DoDirectPayment($dp_request);
$ack = $response->getAck();
$logger->_log('Ack='.$ack);
switch($ack) {
case ACK_SUCCESS:
case ACK_SUCCESS_WITH_WARNING:
// Good to break out;
break;
default:
$_SESSION['response'] =& $response;
$logger->_log('DoDirectPayment failed: ' . print_r($response, true));
$location = HOME_URL . "/lib/paypal-app/ApiError.php";
header("Location: $location");
exit;
}
// Marshall data out of response
// $details = $response->getDoExpressCheckoutPaymentResponseDetails();
// $payment_info = $details->getPaymentInfo();
// $tran_ID = $payment_info->getTransactionID();
// $paymentStatus = $payment_info->getPaymentStatus();
// $paymentType = $payment_info->getPaymentType();
//
//
// $amt_obj = $payment_info->getGrossAmount();
// $amt = $amt_obj->_value;
// $currency_cd = $amt_obj->_attributeValues['currencyID'];
// $display_amt = $currency_cd.' '.$amt;
//echo '$paymentAmount = ' . $paymentAmount . '<br>';
//echo '$tran_ID = ' . $tran_ID . '<br>';
//echo '$display_amt = ' . $display_amt . '<br>';
$tran_ID = $response->getTransactionID();
$avs_code = $response->getAVSCode();
$cvv2 = $response->getCVV2Code();
$amt_obj = $response->getAmount();
$paymentStatus = $response->getPaymentStatus();
$amt = $amt_obj->_value;
$currency_cd = $amt_obj->_attributeValues['currencyID'];
$amt_display = $currency_cd.' '.$amt;
$comments = $objOrdersInfo->getComments();
if(!empty($comments)){
$paymentResponse = "$comments\n";
}
$paymentResponse .= "Transaction ID: $tran_ID\n" . "Payment Type: Credit Card Direct Payment\nPayment Status: Completed " . $paymentStatus;
$objOrdersDao->setCCOwner($objPaypalInfo->getCCFirstName() . ' ' . $objPaypalInfo->getCCLastName());
$objOrdersDao->setCCType($objPaypalInfo->getCCType());
$objOrdersDao->setCCNumber($payment->markCardNumber($objPaypalInfo->getCCNumber()));
$objOrdersDao->setCCExpire($objPaypalInfo->getCCExpiresMonth() . '/' . $objPaypalInfo->getCCYear());
}else if($objOrdersInfo->getPaymentMethod() == OrdersInfo::MONEY_ORDER){
$paymentMethod = "Money Order";
$comments = $objOrdersInfo->getComments();
if(!empty($comments)){
$paymentResponse = "$comments\n";
}
}
$oDeliveryAddress = $objOrdersInfo->getDeliveryAddress();
$customerAddress = $objOrdersInfo->getCustomerAddress();
if(!is_object($customerAddress)){
$customerAddress = $oDeliveryAddress;
}
$billingAddress = $objOrdersInfo->getBillingAddress();
if(!is_object($billingAddress)){
$billingAddress = $oDeliveryAddress;
}
$objOrdersDao->setCurrency($currency_cd);
$objOrdersDao->setLanguageID(1);
$objOrdersDao->setStatus('pending');
$objOrdersDao->setAmount($objOrdersInfo->getAccount()->getAllTotal() * 100);
$objOrdersDao->setComments($objOrdersInfo->getComments());
$objOrdersDao->setPaymentMethod($paymentMethod);
$sql_data_array = $objOrdersDao->getArray($objCustomer, $customerAddress, $oDeliveryAddress, $billingAddress);
// insert the data
$ordersid = $common->insertUpdate(DB_TAG_PUBLIC, 'orders', $sql_data_array);
// write orders account
$sql_data_array = array(
'ordersID' => $ordersid,
'amount' => $objOrdersInfo->getAccount()->getTaxTotal() * 100,
'classes' => "tax",
'comments' => "Sales Tax"
);
$common->insertUpdate(DB_TAG_PUBLIC, 'orders_account', $sql_data_array);
$sql_data_array = array(
'ordersID' => $ordersid,
'amount' => $objOrdersInfo->getAccount()->getShippingTotal() * 100,
'classes' => "shipping",
'comments' => "Shipping & Handling(Standard Shipping)"
);
$common->insertUpdate(DB_TAG_PUBLIC, 'orders_account', $sql_data_array);
$sql_data_array = array(
'ordersID' => $ordersid,
'amount' => $objCart->getAmount(),
'classes' => "product",
'comments' => "Subtotal"
);
$common->insertUpdate(DB_TAG_PUBLIC, 'orders_account', $sql_data_array);
$sql_data_array = array(
'ordersID' => $ordersid,
'amount' => $objOrdersInfo->getAccount()->getAllTotal() * 100,
'classes' => "total",
'comments' => "Total"
);
$common->insertUpdate(DB_TAG_PUBLIC, 'orders_account', $sql_data_array);
$sql_data_array = array(
'ordersID' => $ordersid,
'status' => 'pending',
'createdTime' => "UTC_TIMESTAMP()",
'comments' => $paymentResponse
);
$common->insertUpdate(DB_TAG_PUBLIC, 'orders_status_history', $sql_data_array);
// write orders account end;
// is partner traffic ?
if(isset($_COOKIE[PARTNER_COOKIE_NAME]) && is_numeric($_COOKIE[PARTNER_COOKIE_NAME])){
$partnterID = $_COOKIE[PARTNER_COOKIE_NAME];
$sql_data_array = array(
'ordersID' => $ordersid,
'partnerID' => $partnterID,
'modifiedTime' => "UTC_TIMESTAMP()"
);
$common->insertUpdate(DB_TAG_PUBLIC, 'orders_partner_history', $sql_data_array);
}
foreach($objCart->getProductList() as $product){
$sql_data_array = array(
'ordersID' => $ordersid,
'productsID' => $product->getID(),
'model' => $product->getModel(),
'name' => $product->getName(),
'price' => $product->getPrice(),
'finalPrice' => $product->getFinalPrice(),
'tax' => 0,
'quantity' => $product->getQuantity(),
);
$insertID = $common->insertUpdate(DB_TAG_PUBLIC, 'orders_products', $sql_data_array);
foreach($product->getAttributeList() as $attribute){
$sql_data_array = array(
'ordersID' => $ordersid,
'productID' => $product->getID(),
'attribute' => $attribute->getKey(),
'attributeValue' => $attribute->getValue(),
'attributeValuePrice' => $attribute->getPrice(),
'price_prefix' => '+',
'orderProdID' => $insertID
);
$common->insertUpdate(DB_TAG_PUBLIC, 'orders_products_attributes', $sql_data_array);
}
}
// update coupon status
$oCoupon = $objCart->getCoupon();
if(is_object($oCoupon)){
$common->update(DB_TAG_PUBLIC, 'UPDATE coupon SET usedCount = usedCount + 1 WHERE id = ' . $oCoupon->getID());
$customerID = $objCustomer->getID();
$common->insert(DB_TAG_PUBLIC, "INSERT INTO coupon_history SET customerID = $customerID, couponID = " . $oCoupon->getID());
}
$shippingTotal = $objOrdersInfo->getAccount()->getShippingTotal();
$subTotal = $objCart->getAmount() / 100;
$taxTotal = $objOrdersInfo->getAccount()->getTaxTotal();
$allTotal = $objOrdersInfo->getAccount()->getAllTotal();
$myStore = $common->getRow(DB_TAG_PUBLIC, "SELECT c.title, c.values FROM configuration c, configuration_group g WHERE c.groupID=g.id AND g.title = 'My Store' AND c.keyes = 'STORE_NAME_ADDRESS'");
// send email to customer
$customerEmail = $objCustomerDao->getEmail();
if(!empty($customerEmail)){
require_once('includeOrderNoticeEmail.php');
$subject = '123gohelmets.com - Order';
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=utf8\r\n";
/* additional headers */
$headers .= "From: Sam <123gohelmets@mail.com>\r\n";
/* and now mail it */
$siSuccess = mail($customerEmail, $subject, $emailContent, $headers);
// if($siSuccess){
// $error_message = 'Success';
// }else
// $error_message = 'Failed';
}
unset($_SESSION['cart']);
unset($_SESSION['customerInfo']);
unset($_SESSION['ordersInfo']);
unset($_SESSION['paypalInfo']);
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->force_compile = true;
$smarty->debugging = false;
$smarty->caching = false;
$smarty->cache_lifetime = 120;
$smarty->assign('HOME_URL', '.');
$smarty->assign('HOME_URL_HTTP', HOME_URL);
$smarty->assign('error_message', $error_message);
$smarty->assign('arrAddress', $arrAddress);
$smarty->assign('arrProducts', $arrProducts);
$smarty->assign('taxTotal', $taxTotal);
$smarty->assign('subTotal', $subTotal);
$smarty->assign('shippingTotal', $shippingTotal);
$smarty->assign('allTotal', $allTotal);
$smarty->assign('myStore', $myStore);
$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);
$smarty->assign('oDeliveryAddress', $oDeliveryAddress);
$smarty->assign('ordersid', $ordersid);
$smarty->assign('tran_ID', $tran_ID);
$smarty->assign('paymentMethod', $objOrdersInfo->getPaymentMethod());
$smarty->assign('isLogin', $isLogin);
$smarty->display('checkoutFinish.html');
?>
| 123gohelmetsv2 | trunk/checkoutFinish.php | PHP | asf20 | 19,810 |
#lightbox{
position: absolute;
left: 0;
width: 100%;
z-index: 100;
text-align: center;
line-height: 0;
}
#lightbox a img{ border: none; }
#outerImageContainer{
position: relative;
background-color: #fff;
width: 250px;
height: 250px;
margin: 0 auto;
}
#imageContainer{
padding: 10px;
}
#loading{
position: absolute;
top: 40%;
left: 0%;
height: 25%;
width: 100%;
text-align: center;
line-height: 0;
}
#hoverNav{
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 10;
}
#imageContainer>#hoverNav{ left: 0;}
#hoverNav a{ outline: none;}
#prevLink, #nextLink{
width: 49%;
height: 100%;
background: transparent url(../images/blank.gif) no-repeat; /* Trick IE into showing hover */
display: block;
}
#prevLink { left: 0; float: left;}
#nextLink { right: 0; float: right;}
#prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; }
#nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; }
#imageDataContainer{
font: 10px Verdana, Helvetica, sans-serif;
background-color: #fff;
margin: 0 auto;
line-height: 1.4em;
overflow: auto;
width: 100%
}
#imageData{ padding:0 10px; color: #666; }
#imageData #imageDetails{ width: 70%; float: left; text-align: left; }
#imageData #caption{ font-weight: bold; }
#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; }
#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; }
#overlay{
position: absolute;
top: 0;
left: 0;
z-index: 90;
width: 100%;
height: 500px;
background-color: #000;
} | 123gohelmetsv2 | trunk/css/lightbox.css | CSS | asf20 | 1,652 |
body {
background: url(images/bg.jpg) repeat-x top #fff;
font-family:Arial,'Lucida Grande',Tahoma,Verdana,'Trebuchet MS',Sans-serif;
padding: 0;
font-size: 12px;
margin: 0px auto auto auto;
color: #000000;
}
a {
color: #000000;
list-style: none;
text-decoration: none;
font-size: 11px;
}
a:hover {
text-decoration: underline;
}
.clear {
clear: both;
}
p {
padding: 5px 0 5px 0;
margin: 0px;
text-align: justify;
line-height: 19px;
}
.prod_details {
padding: 5px 15px 5px 15px;
font-size: 11px;
line-height:180%;
width: 295px;
height: 200px;
overflow:hidden;
text-overflow:ellipsis;
}
.prod_detail {
padding: 0px 25px 5px 15px;
font-size: 12px;
line-height:180%;
width: 265px;
overflow:auto;
}
.prod_more_details {
padding: 5px 15px 5px 15px;
font-size: 12px;
line-height:180%;
}
p.details {
padding: 5px 15px 5px 15px;
font-size: 11px;
}
p.details_cart {
clear: both;
padding: 25px 30px 5px 0px;
font-size: 11px;
font-style: italic;
}
p.more_details {
padding: 25px 20px 0px 20px;
font-size: 12px;
}
#wrap {
width: 900px;
height: auto;
margin: auto;
background-color: #FFFFFF;
}
.header {
width: 900px;
}
.logo {
padding: 5px 0 0 0px;
}
/*-----------------------------menu-------------------*/
#menu {
width: 900px;
height: 30px;
float: left;
list-style: none;
display: table;
padding: 0;
margin: 0px auto;
}
#menu ul {
display: block;
list-style: none;
padding: 9px 0 0 0px;
margin: 0px;
}
/*----------------crumb_nav------------------*/
.crumb_nav {
font-size: 12px;
padding: 0px 0 0px 0px;
}
.crumb_nav a {
color: #FF9900;
font-size: 14px;
}
span.price {
color: #000000;
font-size: 12px;
}
span.final_price {
font-family: Verdana, Arial, sans-serif;
color: #ff0000;
font-size: 14px;
padding: 0px 0 0 5px;
}
.price{
font-size:14px;
padding:0 0 0 2px;
margin:2px 0 0px 0;
}
span.colors {
padding: 2px 2px 0 2px;
}
.promo{
font-size:16px;
padding:0 0 0 2px;
margin:2px 0 0px 0;
color: #ff0000;
}
span.promo {
color: #ff0000;
font-size: 12px;
}
/*------------------------------------center content--------------------*/
.center_content {
width: 900px;
padding: 0px 0 0 0;
}
.left_content {
width: 500px;
float: left;
padding: 10px 0px 2px 10px;
}
.left_cart_content {
width: 510px;
float: left;
padding: 20px 0 2px 2px;
}
.right_content {
width: 370px;
float: left;
padding: 10px 0 20px 10px;
}
.right_checkout_content {
width: 380px;
float: left;
padding: 10px 0 20px 5px;
}
.title {
color: #000000;
padding: 0px;
float: left;
font-size: 19px;
margin: 10px 0px 0px 0px;
vertical-align:text-top;
line-height:25px;
}
.title_home {
color: #000000;
padding: 0px;
float: left;
font-size: 19px;
margin: 10px 0px 0px 0px;
vertical-align:text-top;
line-height:25px;
width:480px;
}
.car_title {
width:470px;
color: #000000;
padding: 0px;
float: left;
font-size: 19px;
margin: 10px 0px 0px 0px;
vertical-align:text-top;
line-height:25px;
}
span.title_icon {
float: left;
padding: 0 2px 0 0;
}
.prod_title {
color: #000000;
padding: 5px 5px 0 15px;
font-size: 13px;
}
.prod_detail_title {
color: #FF9900;
padding: 5px 5px 0 15px;
font-size: 11px;
}
.order_title {
color: #FF9900;
padding: 5px 5px 0 5px;
font-size: 13px;
font-weight: bold;
}
span.red{
color:#ff0000;
}
a.more {
font-style: italic;
color: #42b1e5;
float: right;
text-decoration: none;
font-size: 11px;
padding: 0px 15px 0 0;
}
.about {
width: 337px;
clear: both;
background: url(./images/border.gif) no-repeat bottom center;
padding: 0 0 10px 10px;
}
img.right {
float: right;
padding: 0 0 0 30px;
}
.right_box {
width: 170px;
float: left;
padding: 10px 0 0 0;
}
.right_checkout_box {
width: 400px;
float: left;
padding: 10px 0 0 10px;
}
.left_box {
width: 170px;
float: right;
padding: 10px 0 0 0;
}
.right_box_right {
width: 200px;
float: left;
padding: 10px 0 0 0;
}
.right_box_preCheckout {
width: 370px;
float: left;
padding: 10px 0 0 0;
}
/*--------feat_prod_box-----------*/
.feat_prod_box {
padding: 10px 0 10px 10px;
margin: 0 20px 20px 0;
border-bottom: 1px #b2b2b2 dashed;
clear: both;
width: 460px;
}
.feat_prod_box_details {
padding: 10px 0 10px 0;
margin: 0 2px 10px 0;
clear: both;
}
.address_list_box {
padding: 10px 0 5px 0;
margin: 0 2px 5px 0;
clear: both;
}
.feat_cart_box_details {
width: 470px;
padding: 10px 0 10px 0;
margin: 0 20px 10px 10px;
clear: both;
}
.prod_img {
float: left;
padding: 0 5px 0 0;
text-align: center;
width: 130px;
}
.prod_det_box {
width: 300px;
float: left;
padding: 0 0 0 25px;
position: relative;
}
.box_top {
width: 295px;
height: 9px;
background: url(../images/box_top.gif) no-repeat center bottom;
}
.box_center {
width: 295px;
height: auto;
background: url(../images/box_center.gif) repeat-y center;
}
.box_bottom {
width: 295px;
height: 9px;
background: url(../images/box_bottom.gif) no-repeat center top;
}
.new_prod_box {
float: left;
text-align: center;
padding: 10px 10px 10px 10px;
width: 140px;
}
/*
.new_prod_box a {
padding: 5px 0 5px 0;
color: #b5b5b6;
text-decoration: none;
display: block;
}
*/
.new_prod_bg {
width: 132px;
height: 119px;
text-align: center;
background: url(../images/new_prod_box.gif) no-repeat center;
position: relative;
}
.new_prod_bg_bottom {
width: 132px;
height: 60px;
position: relative;
font-family: Arial,'Lucida Grande',Tahoma,Verdana,'Trebuchet MS',Sans-serif;
font-size: 12px;
padding:5px 0 10px 0;
}
.new_prod_bg_bottom a {
text-decoration: none;
color: #000000;
}
.new_prod_bg_bottom a:hover
{
text-decoration: underline;
}
.new_icon {
position: absolute;
top: 0px;
right: 0px;
z-index: 200;
}
.special_icon {
position: absolute;
top: 0px;
_top: 6px;
right: 2px;
z-index: 250;
}
img.thumb {
padding: 10px 0 0 0;
}
.new_products {
clear: both;
padding: 0px;
width:480px;
height:100px;
display:block;
}
ul.list {
clear: both;
padding: 10px 0 0 10px;
margin: 0px;
font-family: Arial,'Lucida Grande',Tahoma,Verdana,'Trebuchet MS',Sans-serif;
}
ul.list li {
list-style: none;
padding: 2px 0 2px 0;
}
ul.list li a {
list-style: none;
text-decoration: none;
color:#000000;
background: url(../images/left_menu_bullet.gif) no-repeat left;
padding: 0 0 0 10px;
font-size: 12px;
}
ul.list li a:hover {
text-decoration: underline;
color: #E36D22;
}
ul.address li a {
list-style: none;
text-decoration: none;
color:#034492;
padding: 0 0 0 0px;
font-size: 12px;
}
/* demo */
div.demolayout {
width: 460px;
margin: 0 0 20px 0;
overflow:auto;
}
ul.demolayout {
list-style-type: none;
float: left;
margin: 0px;
padding: 0px;
}
ul.demolayout li {
margin: 0 10px 0 0;
float: left;
}
.tab {
border: 1px #DFDFDF solid;
padding: 0 0 25px 0;
}
ul.demolayout a {
float: left;
display: block;
padding: 5px 25px;
border: 1px solid #DFDFDF;
border-bottom: 0;
color: #666;
background: #eee;
text-decoration: none;
font-weight: bold;
}
ul.demolayout a:hover {
background: #fff;
}
ul.demolayout a.active {
background: #fff;
padding-bottom: 5px;
cursor: default;
color: #FF9900;
font-weight: bold;
font-size: 14px;
}
.tabs-container {
clear: left;
padding: 0px;
}
/*-----------------------languages_box---------*/
.languages_box {
padding: 0 0 5px 0;
float: left;
}
.languages_box a {
padding: 0 2px 0 2px;
}
.languages_box a.selected {
padding: 2px 2px 0 2px;
border: 1px #CCCCCC solid;
}
.currency {
float: left;
padding: 0 0 0 0px;
margin: 15px 0 0 10px;
}
.currency a {
text-decoration: none;
color: #333333;
padding: 3px;
border: 1px #eeedee solid;
}
.selected {
text-decoration: none;
color: #fff;
padding: 3px;
border: 1px #eeedee solid;
background-color: #1ca8e9;
font-weight: bold;
}
.currency a:hover {
border: 1px #990000 solid;
}
/*------------------------cart---------------------*/
.cart {
width: 370px;
float: left;
height: 35px;
margin: 0px 0 0px 0;
background: url(./images/border.gif) no-repeat bottom center;
padding: 0 0 10px 0;
}
.home_cart_content {
float: left;
padding: 3px;
border: 1px #eeedee solid;
margin: 10px 2px 0 10px;
}
a.view_cart {
display: block;
float: left;
margin: 15px 0 0 5px;
color: #ff9900;
font-size: 11px;
font-family: Verdana, Arial, sans-serif;
}
/*---------------contact_form------------------*/
.contact_form {
width: 400px;
float: left;
padding: 25px;
margin: 20px 0 0 15px;
_margin: 20px 0 0 5px;
border: 1px #DFD1D2 dashed;
position: relative;
}
.address_form {
width: 400px;
float: left;
padding: 15px;
margin: 10px 0 0 10px;
_margin: 20px 0 0 5px;
border: 1px #DFD1D2 dashed;
position: relative;
}
.form_row {
width: 400px;
_width: 355px;
clear: both;
padding: 10px 0 10px 0;
_padding: 5px 0 5px 0;
color: #a53d17;
}
label.contact {
width: 85px;
float: left;
font-size: 12px;
text-align: right;
padding: 4px 5px 0 0;
color: #333333;
}
label.cart {
width: 120px;
font-size: 12px;
text-align: right;
padding: 4px 5px 0 0;
color: #333333;
}
strong.cart {
font-size: 12px;
}
input.contact_input {
width: 253px;
height: 18px;
background-color: #fff;
color: #999999;
border: 1px #DFDFDF solid;
float: left;
padding: 3px 3px 0 3px;
}
.password_forgotten
{
float: right;
padding: 3px 0px 0 3px;
}
input.view_cart_input {
width: 180px;
height: 18px;
background-color: #fff;
color: #000000;
border: 1px #DFDFDF solid;
text-align: center;
float: left;
}
input.guest_email {
width: 220px;
height: 18px;
background-color: #fff;
color: #000000;
border: 1px #DFDFDF solid;
text-align: center;
float: left;
}
textarea.contact_textarea {
width: 253px;
height: 120px;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #999999;
background-color: #fff;
border: 1px #DFDFDF solid;
float: left;
}
input.register {
width: 71px;
height: 25px;
border: none;
cursor: pointer;
text-align: center;
float: right;
color: #FFFFFF;
background: url(../images/register_bt.gif) no-repeat center;
}
input.checkout_login {
width: 71px;
height: 25px;
border: none;
cursor: pointer;
text-align: center;
float: right;
color: #FFFFFF;
margin: 10px 10px 0 10px;
background: url(../images/register_bt.gif) no-repeat center;
}
input.coupon {
width: 71px;
height: 25px;
border: none;
cursor: pointer;
text-align: center;
float: right;
color: #FFFFFF;
margin: 0 10px 0 0;
background: url(../images/register_bt.gif) no-repeat center;
}
input.forgetPasswordNext {
width: 71px;
height: 25px;
border: none;
cursor: pointer;
text-align: center;
color: #FFFFFF;
margin: 0 10px 0 0;
background: url(../images/register_bt.gif) no-repeat center;
}
a.contact {
width: 53px;
height: 24px;
display: block;
float: right;
margin: 0 0 0 10px;
background: url(../images/contact_bt.gif) no-repeat center;
text-decoration: none;
text-align: center;
line-height: 24px;
color: #fff;
}
.address_submit {
width: 71px;
height: 25px;
display: block;
float: right;
margin: 10px 0px 0 10px;
background: url(../images/register_bt.gif) no-repeat center;
text-decoration: none;
text-align: center;
line-height: 25px;
color: #fff;
}
a.checkout {
width: 71px;
height: 25px;
display: block;
float: right;
margin: 10px 0px 0 10px;
background: url(../images/register_bt.gif) no-repeat center;
text-decoration: none;
text-align: center;
line-height: 25px;
color: #fff;
}
a.forgotPasswordNext {
width: 71px;
height: 25px;
display: block;
float: right;
margin: 10px 50px 0 10px;
background: url(../images/register_bt.gif) no-repeat center;
text-decoration: none;
text-align: center;
line-height: 25px;
color: #fff;
}
a.continue {
width: 71px;
height: 25px;
display: block;
float: left;
margin: 10px 0 0 0px;
background: url(../images/register_bt.gif) no-repeat center;
text-decoration: none;
text-align: center;
line-height: 25px;
color: #fff;
}
.terms {
padding: 0 0 0 80px;
}
.form_subtitle {
position: absolute;
top: -11px;
left: 7px;
width: auto;
height: 20px;
background-color: #FF9900;
text-align: center;
padding: 0 7px 0 7px;
color: #FFFFFF;
font-size: 12px;
line-height: 20px;
}
/*--------------cart_table-------------*/
.cart_table {
width: 100%;
border: 1px #CCCCCC solid;
text-align: center;
}
.coupon_table {
width: 470px;
border: 1px #CCCCCC solid;
text-align: center;
}
.email_table {
width: 370px;
border: 1px #CCCCCC solid;
text-align: center;
}
.email_checkout
{
padding: 5px 15px 5px 10px;
text-align: left;
line-height: 20px
}
.quick_check_out_table {
width: 880px;
border: 1px #CCCCCC solid;
text-align: center;
}
tr.cart_title {
background-color: #DFDFDF;
}
td.cart_total {
text-align: right;
padding: 5px 15px 5px 0;
}
img.cart_thumb {
border: 1px #b2b2b2 solid;
padding: 2px;
}
/*--------------*/
div.pagination {
width: 420px;
padding: 5px;
margin: 5px;
text-align: center;
float: left;
clear: both;
font-size: 10px;
}
div.pagination a {
padding: 2px 5px 2px 5px;
margin-right: 2px;
border: 1px solid #1e94cb;
text-decoration: none;
color: #1e94cb;
}
div.pagination a:hover,div.pagination a:active {
border: 1px solid #1e94cb;
color: #fff;
background-color: #1e94cb;
}
div.pagination span.current {
padding: 2px 5px 2px 5px;
margin-right: 2px;
border: 1px solid #1e94cb;
font-weight: bold;
background-color: #1e94cb;
color: #FFF;
}
div.pagination span.disabled {
padding: 2px 5px 2px 5px;
margin-right: 2px;
border: 1px solid #f3f3f3;
color: #ccc;
}
/*---------------footer------------------------*/
.footer {
height: 100px;
background: url(images/footer_bg.gif) no-repeat top center;
}
.left_footer {
float: left;
padding: 10px 0 0 10px;
}
.right_footer {
float: right;
padding: 10px 10px 0 0;
}
.footer a {
text-decoration: none;
padding: 0 5px 0 5px;
color: #78756D;
}
.footer a:hover {
text-decoration: underline;
color: #E36D22;
}
/*-----------------custom ----------------------*/
#menu li {
width: 100px;
float: left;
line-height: 30px
}
#menu a {
position: relative;
display: block;
text-decoration: none;
background: #F9ECC3;
width: 100px;
}
#menu a span {
display: block;
font-weight: bold;
color: #000;
border-style: solid;
border-width: 0px 5px 5px 0px;
border-color: #fff #fff #FF9900 #fff;
text-align: center;
font-size: 14px;
}
#menu a em {
display: none;
}
#menu a:hover {
background: #FFCC99;
}
#menu a:hover span {
color: #fff;
}
#menu a:hover em {
display: block;
overflow: hidden;
border: 6px solid #FF9900;
border-color: #FF9900 #fff;
border-width: 6px 6px 0 6px;
position: absolute;
left: 50%; top : 100%;
margin-left: -6px;
top: 100%;
}
/*------------------ nav ------------------------*/
#nav,#nav ul {
}
#nav {
font-weight: bold;
height: 1.69em;
font: bold 100% arial;
margin: 0px 0px 0px 0px;
}
#nav li {
background: #FF9900;
float: left;
width: 10em;
display: block;
margin: 1px 2px 1px 0px;
border-left: 1px solid #ff9900;
border-top: 1px solid #ff9900;
border-bottom: 1px solid #ff9900;
border-right: 1px solid #ff9900;
padding: 0px;
}
#nav a,#nav a:link,#nav a:visited,#nav a:hover,#nav a:active {
text-decoration: none;
cursor: pointer;
color: #fff;
display: block;
padding: 4px 8px 2px 8px
}
#nav a:hover {
color: #000
}
#nav li ul {
border-left: 1px solid #FF9900;
background: #f6f6f6 no-repeat 100% 100%;
width: 15.8em;
font-size: 90%;
margin-top: 3px;
position: absolute;
font-weight: normal;
left: -999em
}
#nav li:hover ul,#nav li.sfhover ul {
left: 0;
z-index: 99999
}
#nav li li {
background: none;
float: none;
border: none;
border: 1px solid #999;
border-top: 1px solid #fff;
border-right: none;
border-left: none;
padding-left: 0
}
#nav li li.last {
border-bottom: none
}
#nav li li a,#nav li li a:link,#nav li li a:visited,#nav li li a:hover {
color: #000;
padding: 3px 10px 2px 10px;
width: 14em
}
#nav li li a:hover {
color: #fff;
background: #FF9900
}
#nav li.active {
background: #FF9900;
border-bottom: 3px solid #FF9900
}
#nav li.active ul {
border: none;
background: #FF9900 no-repeat 100% 100%
}
#nav li.active a:link,#nav li.active a:visited,#nav li.active a:hover,#nav li.active a:active
{
}
#nav li.active a:hover {
color: #000
}
#nav li.active li {
border: none;
border-top: 1px solid #c15c5c;
border-bottom: 1px solid #870000
}
#nav li.active li.last {
border-bottom: none
}
#nav li.active li a:link,#nav li.active li a:visited,#nav li.active li a:hover,#nav li.active li a:active
{
color: #fff
}
#nav li.active li a:hover {
background: #666 repeat-x 0 99%;
color: #fff
}
#nav li.active li.active a:link,#nav li.active li.active a:visited,#nav li.active li.active a:hover,#nav li.active li.active a:active
{
color: #fff;
font-weight: bold;
background: #666 repeat-x 0 99%
}
#nav li {
width: auto
}
input.submit {
padding: 0px 0px;
background: #666;
color: #fff;
font-weight: bold;
font-size: 13px;
line-height: 18px;
}
.infoBoxContents {
background: #FFFFFF;
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
}
.infoBox {
background: #ffffff;
border-left:1px solid #C9C9C9;
border-right:1px solid #C9C9C9;
border-top:1px solid #C9C9C9;
border-bottom:1px solid #C9C9C9;
}
.checkout_title{
height: 50px;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #000000;
margin: 0px 0px 0px 10px;
}
.checkout_finish_title{
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #000000;
font-weight: bold;
padding: 2px;
margin: 0px 0px 0px 0px;
}
.checkout_left {
margin: 0px 0px 0px 30px;
}
.checkout_left_sub {
margin: 0px 0px 0px 60px;
}
.checkout_finish {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
padding: 2px;
}
.pageHeading {
font-family: Verdana, Arial, sans-serif;
font-size: 16px;
color: #727272;
font-weight: bold;
}
.btn {
BORDER-RIGHT: #7b9ebd 1px solid;
PADDING-RIGHT: 2px;
BORDER-TOP: #7b9ebd 1px solid;
PADDING-LEFT: 2px;
FONT-SIZE: 12px;
FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#cecfde);
BORDER-LEFT: #7b9ebd 1px solid;
CURSOR: hand;
COLOR: black;
PADDING-TOP: 2px;
BORDER-BOTTOM: #7b9ebd 1px solid;
padding: 3px 5px 3px 5px;
}
.product-price-grid
{
padding:5px 0 10px 0;
height:35px
}
.nprice-g
{
/*font-weight:bold;
color:#0F054A;
font-size:16px;*/
color: rgb(206, 36, 36);
font-size: 1.3em;
font-weight: bold;
}
.nprice-g-c
{
color: rgb(206, 36, 36);
font-size: 1.1em;
font-weight: bold;
}
.nprice-g-s
{
font-weight:bold;
color:#0F054A;
font-size:11px
}
.nprice-g-exp
{
font-weight:bold;
color:#999
}
.oprice-g
{
text-decoration:line-through;
color:#888
}
.oprice-g-exp
{
text-decoration:line-through;
color:#999
}
.product-title
{
font-family: Arial,'Lucida Grande',Tahoma,Verdana,'Trebuchet MS',Sans-serif;
font-size: 11px;
color:#034492;
padding: 0px 10px;
height: 30px;
overflow: hidden;
}
.product-title-grid
{
overflow:hidden;
width: 132px;
height:65px;
position: relative;
font-family: Arial,'Lucida Grande',Tahoma,Verdana,'Trebuchet MS',Sans-serif;
font-size: 12px;
padding:5px 0 10px 0;
}
.product-title-grid a.deal-title:hover
{
text-decoration:underline
}
.category-title
{
font-family: Arial,'Lucida Grande',Tahoma,Verdana,'Trebuchet MS',Sans-serif;
font-size: 14px;
padding:5px 0 10px 0;
font-weight:bold;
margin: 20px 0px 10px 0px;
height:35px
}
.checkout-title
{
font-family: Arial,'Lucida Grande',Tahoma,Verdana,'Trebuchet MS',Sans-serif;
font-size: 13px;
padding:5px 0 5px 0;
margin: 5px 0px 5px 1px;
font-weight:bold;
color:#034492;
}
.checkout-title-left
{
font-family: Arial,'Lucida Grande',Tahoma,Verdana,'Trebuchet MS',Sans-serif;
font-size: 13px;
padding:5px 0 5px 0;
font-weight:bold;
color:#034492;
margin: 5px 0px 5px 30px;
}
.checkout-left
{
font-family: Arial,'Lucida Grande',Tahoma,Verdana,'Trebuchet MS',Sans-serif;
padding:5px 0 5px 0;
margin: 5px 0px 5px 30px;
color:#1B1616;
}
.price a {
color: rgb(206, 36, 36); font-size: 1.3em; font-weight: bold;
}
.action
{
font-family: Arial,'Lucida Grande',Tahoma,Verdana,'Trebuchet MS',Sans-serif;
font-size: 12px;
color:#034492;
padding: 0px 5px 0 0;
overflow: hidden;
}
.more
{
font-family: Arial,'Lucida Grande',Tahoma,Verdana,'Trebuchet MS',Sans-serif;
font-size: 14px;
font-weight:bold;
}
.review_close
{
font-family: Arial,'Lucida Grande',Tahoma,Verdana,'Trebuchet MS',Sans-serif;
font-size: 14px;
font-weight:bold;
padding: 0px 0px 15px 0;
line-height: 30px;
}
.review_separator
{
border-top-width:1px;
border-top-color:#C0BFBF;
border-top-style:solid;
padding: 10px 0px 5px 0;
}
.review_link
{
font-family: Arial,'Lucida Grande',Tahoma,Verdana,'Trebuchet MS',Sans-serif;
font-size: 12px;
color:#ff6600;
font-weight:bold;
}
.review_location
{
font-family: Arial,'Lucida Grande',Tahoma,Verdana,'Trebuchet MS',Sans-serif;
font-size: 11px;
color:#000000;
font-weight:bold;
line-height: 16px;
padding: 0px 0px 0px 0;
} | 123gohelmetsv2 | trunk/css/style.css | CSS | asf20 | 22,391 |
/* styles for the unit rater */
.unit-rating{
list-style:none;
margin: 5px 0 0 10px;
padding:0px;
width: 60px;
height: 12px;
position: relative;
background: url('../images/newstar.gif') top left repeat-x;
}
.unit-rating li{
text-indent: -90000px;
padding:0px;
margin:0px;
/*\*/
float: left;
/* */
}
.unit-rating li.current-rating{
background: url('../images/newstar.gif') left bottom;
position: absolute;
height: 12px;
display: block;
text-indent: -9000px;
padding: 0 0 0 1px;
z-index: 1;
} | 123gohelmetsv2 | trunk/css/stars.css | CSS | asf20 | 574 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once("./configure/page.php"); //--> page configure
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("Access.php"); //--> Access class
include_once("UploadFiles.php"); //--> UploadFiles
include_once("Strings.php"); //--> String utils
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
if ($_SERVER["HTTPS"] <> "on")
{
$xredir="https://".$_SERVER["SERVER_NAME"]. $_SERVER["REQUEST_URI"];
header("Location: ".$xredir);
}
$common = new Common();
$access = new Access(); //--> Access
$objStrings = new Strings();
$objCart = new Cart(); //--> Cart
session_start();
// write access log
$access->add(DB_TAG_SYSTEM, PAGE_ID_INDEX);
if($_SESSION['cart'])
$objCart = unserialize($_SESSION['cart']);
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->debugging = false;
$smarty->caching = false;
$smarty->assign('HOME_URL', "..");
$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);
if(!$smarty->isCached('testHttps.html')){
include_once('includeAll.php');
$smarty->assign('categorys', $categorys);
$smarty->assign('topCategory', $topCategory);
$smarty->assign('bestsellers', $Bestsellers);
$smarty->assign('new', $new);
}
$smarty->display('testHttps.html');
?>
| 123gohelmetsv2 | trunk/testHttps.php | PHP | asf20 | 1,838 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("UploadFiles.php"); //--> UploadFiles
include_once("Strings.php"); //--> String utils
include_once("customerSession.inc.php");
include_once("Session.php"); //-- Session
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
$common = new Common();
$objStrings = new Strings();
$objCart = new Cart(); //--> Cart
$objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
session_start();
if($_SESSION['cart'])
$objCart = unserialize($_SESSION['cart']);
$isLogin = false;
if($objSession->exist()) {
$isLogin = true;
}
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->caching = CACHING;
$smarty->cache_lifetime = CACHE_LIFETIME;
$smarty->assign('HOME_URL', HOME_URL);
$smarty->assign('HOME_URL_HTTP', HOME_URL);
$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);
if(!$smarty->isCached('about.html')){
include_once("includeCategory.php"); //--> include category
include_once("includeSpec.php"); //--> include spec
$smarty->assign('categorys', $categorys);
$smarty->assign('topCategory', $topCategory);
$smarty->assign('specProducts', $specProducts);
}
$smarty->assign('isLogin', $isLogin);
$smarty->display('about.html');
?>
| 123gohelmetsv2 | trunk/about.php | PHP | asf20 | 1,845 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("Strings.php"); //--> String utils
include_once("UploadFiles.php"); //--> UploadFiles
include_once("Zone.php"); //--> Zone
include_once("customerSession.inc.php");
include_once("Session.php"); //-- Session
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
session_start();
$common = new Common();
$objStrings = new Strings();
$objZone = new Zone(0); //--> Zone
$objCart = new Cart(); //--> Cart
$objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->caching = CACHING;
$smarty->cache_lifetime = CACHE_LIFETIME;
if($_SESSION['cart']){
$objCart = unserialize($_SESSION['cart']);
}
$isLogin = false;
if($objSession->exist()) {
$isLogin = true;
}
if(isset($_POST['submit']) && $_POST['submit'] == 'Delete'){
$prodIndex = $_POST['prodIndex'];
$objCart->removeProduct($prodIndex);
$_SESSION['cart'] = serialize($objCart);
}
if(isset($_POST['submit']) && $_POST['submit'] == 'Update'){
$prodIndex = $_POST['prodIndex'];
$quantity = $_POST['quantity'];
if(is_numeric($quantity)){
$product = $objCart->getProduct($prodIndex);
$product->setQuantity($quantity);
}
$_SESSION['cart'] = serialize($objCart);
}
/*--------------- coupon start ---------------*/
if(isset($_POST['coupon']) && $_POST['coupon'] != ''){
$code = $_POST['coupon'];
$oCouponImpl = new CouponImpl(DB_TAG_PUBLIC, 0);
$oCoupon = $oCouponImpl->getCoupon(DB_TAG_PUBLIC, $code);
if(is_object($oCoupon)){
if($oCoupon->isExpire()){
$objCart->setCoupon(null);
$error_message = 'The promo code you entered is expired.';
}else{
$objCart->setCoupon($oCoupon);
$SaveOff = $objCart->getSaveOff();
if($SaveOff > 0)
$error_message = 'SAVE OFF $' . $SaveOff / 100;
}
}else{
$objCart->setCoupon(null);
$error_message = 'The promo code you entered is invalid.';
}
$_SESSION['cart'] = serialize($objCart);
}
$zoneid = 12;
$tax = 0;
$arrTaxs= array();
/*--------------- calculate tax start ---------------*/
if(isset($_POST['zoneid']) && $_POST['zoneid'] != ''){
$total = $objCart->getAmount();
$zoneid = $_POST['zoneid'];
$arrTax = $common->getHash(DB_TAG_PUBLIC, "SELECT tr.id, tr.rate FROM tax_class tc, tax_rates tr WHERE tc.id = tr.classID AND tr.zoneID = $zoneid ORDER BY priority");
foreach($arrTax as $key => $value){
$taxSubTotal = $value * $total;
$arrTaxs[$key] = round($taxSubTotal / 1000000, 2);
$tax += $taxSubTotal;
}
if($tax > 0){
$tax = round($tax / 1000000, 2);
$error_tax = 'TOTAL TAX : $' . $tax;
}else{
$error_tax = 'TOTAL TAX : $0.00';
}
}
$arrZones = $objZone->getGroupList(223);
include_once("includeCategory.php"); //--> include category
include_once("includeSpec.php"); //--> include spec
if(!$smarty->isCached('viewCart.html')){
$smarty->assign('categorys', $categorys);
$smarty->assign('topCategory', $topCategory);
$smarty->assign('specProducts', $specProducts);
}
$smarty->assign('HOME_URL', HOME_URL);
$smarty->assign('HOME_URL_HTTP', HOME_URL);
$smarty->assign('error_message', $error_message);
$smarty->assign('error_tax', $error_tax);
$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);
$smarty->assign('arrZones', $arrZones);
$smarty->assign('zoneid', $zoneid);
$smarty->assign('isLogin', $isLogin);
$smarty->display('viewCart.html');
?>
| 123gohelmetsv2 | trunk/viewCart.php | PHP | asf20 | 4,146 |
<?php
define('HOME_URL','http://localhost:93'); //--
define('HOME_URL_HTTP','http://localhost:93'); //--
define('HOME_URL_HTTPS','http://localhost:93'); //--
define('DISPLAY_DATA_SIZE', 20);
define('EMAIL_USE_HTML', 'true');
define('CACHING', false);
define('CACHE_LIFETIME', 1800);// second
define('PAYMENT_PAYPAL_EC_BUTTON_IMG', 'https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif');
define('PARTNER_COOKIE_NAME', 'partner');
define('PARTNER_COOKIE_EXPIRE', time() + 60 * 60 * 24 * 1); // 1 day
define('PARTNER_COOKIE_PATH', '/'); // 1 day
define('PARTNER_COOKIE_DOMAIN', 'localhost'); // 1 day
$DOCUMET_ROOT = $_SERVER['DOCUMENT_ROOT'];
set_include_path("$DOCUMET_ROOT/lib/paypal-sdk" . PATH_SEPARATOR . "$DOCUMET_ROOT/admin/tools/smarty/libs" . PATH_SEPARATOR . "." . PATH_SEPARATOR . "$DOCUMET_ROOT/admin/lib" . PATH_SEPARATOR . "$DOCUMET_ROOT/admin/configure" .PATH_SEPARATOR . "$DOCUMET_ROOT/lib" .PATH_SEPARATOR . "$DOCUMET_ROOT/configure" . PATH_SEPARATOR . "$DOCUMET_ROOT/templates". PATH_SEPARATOR . get_include_path());
include_once($DOCUMET_ROOT . "/admin/configure/en-US.inc.php"); //--> include language
$LANGEUAGE_ID = 1;
$ZONE_ID = 1;
?>
| 123gohelmetsv2 | trunk/configure/configure.php | PHP | asf20 | 1,178 |
<?php
/*
* Created on Oct 14, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
define('PAGE_ID_INDEX', 1);
define('PAGE_ID_SEARCH', 2);
define('PAGE_ID_ABOUT', 3);
define('PAGE_ID_PRIVACY', 4);
define('PAGE_ID_CONTACT', 5);
define('PAGE_ID_PRODUCT_DETAIL', 6);
define('PAGE_ID_PRODUCT_ALL', 7);
define('PAGE_ID_STROE_FEATUREED', 8);
define('PAGE_ID_STROE_DETAIL', 9);
define('PAGE_ID_COUPON_MOST', 10);
define('PAGE_ID_COUPON_TODAY', 11);
define('PAGE_ID_COUPON_EXPIRING', 12);
define('PAGE_ID_COUPON_SHIPPING', 13);
?>
| 123gohelmetsv2 | trunk/configure/page.php | PHP | asf20 | 624 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("UploadFiles.php"); //--> UploadFiles
include_once("Strings.php"); //--> String utils
include_once("customerSession.inc.php");
include_once("Session.php"); //-- Session
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
$common = new Common();
$objStrings = new Strings();
$objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
$objCart = new Cart(); //--> Cart
session_start();
$isLogin = false;
if($objSession->exist()) {
$isLogin = true;
}
if(isset($_POST['id']))
$id = $_POST['id'];
else
$id = $_GET['id'];
$isYouth = 'no';
$finalPrice = '0';
$promoDescript = '';
$sqlProducts = "SELECT p.id, p.price, p.model, p.shippingTypeID, pd.name, pd.description, p.r_rating, p.r_reviewCount FROM products p, products_description pd WHERE p.status in ('normal', 'hot') AND p.id = pd.productID AND p.id = $id";
$product = $common->getRow(DB_TAG_PUBLIC, $sqlProducts);
if(count($product) == 0){
header("Location: " . HOME_URL);
exit;
}
include_once("includeCategory.php"); //--> include category
include_once("includeSpec.php"); //--> include spec
$specialSql = "SELECT newPrice FROM specials WHERE productID = $id";
$newPrice = $common->getColumn(DB_TAG_PUBLIC, $specialSql);
if(!empty($newPrice))
$finalPrice = $newPrice;
$product['finalPrice'] = $finalPrice;
$sql = "SELECT descript FROM promotion WHERE status = 'normal' AND productId = $id";
$promoDescrit = $common->getColumn(DB_TAG_PUBLIC, $sql);
if(!empty($promoDescrit))
$promoDescrit = $promoDescrit;
$product['promoDescrit'] = $promoDescrit;
$attributePrice = array();
$attributes = array();
$sortsValue = array();
$sizeValuess = $common->getAllData(DB_TAG_PUBLIC, "SELECT pa.attributeID, a.name, a.parentid, pa.attributePrice, pa.pricePrefix FROM attributes a, products_attributes pa WHERE a.parentid != 33 AND a.id = pa.attributeID AND pa.productID = $id ORDER BY a.sorts");
foreach($sizeValuess as $arrRow){
if(!empty($arrRow['parentid'])){
if($arrRow['attributePrice'] > 0)
$attributePrice[$arrRow['attributeID']] = $arrRow['attributePrice'];
$attribute = $common->getRow(DB_TAG_PUBLIC, "SELECT name, sorts FROM attributes WHERE id = " . $arrRow['parentid']);
if(array_key_exists($attribute['name'], $attributes)){
$arrSub = $attributes[$attribute['name']];
$arrData = $arrSub['attri'];
$key = $arrRow['attributeID']; //attribute value
if($arrRow['attributePrice'] > 0)
$arrData[$key] = $arrRow['name'] . ' ($' . $arrRow['pricePrefix'] . ($arrRow['attributePrice'] / 100) . ')';
else
$arrData[$key] = $arrRow['name'];
$arrSub['attri'] = $arrData;
$attributes[$attribute['name']] = $arrSub;
}else{
$arrData = array();
$arrOption = array();
$arrSub = array();
$key = $arrRow['attributeID']; //attribute value
if($arrRow['attributePrice'] > 0){
$arrData[$key] = $arrRow['name'] . ' ($' . $arrRow['pricePrefix'] . ($arrRow['attributePrice'] / 100) . ')';
}else
$arrData[$key] = $arrRow['name'];
$arrSub['attri'] = $arrData;
$attributes[$attribute['name']] = $arrSub;
$sortsValue[] = $attribute['sorts'];
}
// for display youth size or adult
if($attribute['name'] == 'Size'){
$pos = strpos($arrRow['name'], 'Y');
if($pos === false){
continue;
}else if($pos == 0){
$isYouth = 'yes';
}
}
}
}
array_multisort($sortsValue, $attributes);
$i = 0;
$firstImageID = 0;
$firstImageExt= '';
$sql = "SELECT u.id, u.extName, p.attributeID, p.isMain FROM upload_files u, product_images p WHERE u.id = p.imageID AND p.productID = $id AND u.type = " . UploadFiles::TYPE_IMAGE . ' ORDER BY p.isMain';
$arrAllImages = $common->getAllData(DB_TAG_PUBLIC, $sql);
$arrImages = array();
foreach($arrAllImages as $img){
if(empty($firstImageExt)){
$firstImageID = $img['id'];
$firstImageExt = $img['extName'];
}else{
$arrImages[] = $img;
}
}
$arrRelatedProduct = array();
$allRelatedProducts = $common->getAllData(DB_TAG_PUBLIC, "SELECT p.relatedProdID, pd.name FROM products_related p, products_description pd WHERE p.type = 1 AND p.relatedProdID = pd.productID AND p.productID = $id");
foreach($allRelatedProducts as $relatedRow){
$sql = "SELECT u.id, u.extName, p.attributeID, p.isMain FROM upload_files u, product_images p WHERE u.id = p.imageID AND p.productID = " . $relatedRow['relatedProdID'] . " AND u.type = " . UploadFiles::TYPE_IMAGE . ' ORDER BY p.isMain limit 1';
$arrRelatedImage = $common->getRow(DB_TAG_PUBLIC, $sql);
if($arrRelatedImage['attributeID'] > 0){
$sql = "SELECT name FROM attributes WHERE id = " . $arrRelatedImage['attributeID'];
$attributeName = $common->getColumn(DB_TAG_PUBLIC, $sql);
}else
$attributeName = 'Other';
$relatedRow['imageID'] = $arrRelatedImage['id'];
$relatedRow['imageExtName'] = $arrRelatedImage['extName'];
$relatedRow['imageName'] = $attributeName;
$arrRelatedProduct[] = $relatedRow;
}
$sql = "UPDATE products_description SET r_viewed = r_viewed + 1 WHERE productid = $id";
$common->update(DB_TAG_PUBLIC, $sql);
if($_SESSION['cart'])
$objCart = unserialize($_SESSION['cart']);
else
$objCart = new Cart(); //--> Cart
// add product to cart
if(isset($_POST['addCart'])){
$objCartProduct = new CartProduct();
$objCartProduct->setID($id);
$objCartProduct->setName($product['name']);
$objCartProduct->setPrice($product['price']);
if(isset($_POST['quantity']) && is_numeric($_POST['quantity']))
$objCartProduct->setQuantity($_POST['quantity']);
else
$objCartProduct->setQuantity(1);
if(!empty($finalPrice))
$objCartProduct->setFinalPrice($finalPrice);
else
$objCartProduct->setFinalPrice($product['price']);
$objCartProduct->setModel($product['model']);
$objCartProduct->setImageFileName($firstImageID . '.' . $firstImageExt);
$objCartProduct->setShippingTypeID($product['shippingTypeID']);
if(isset($_POST['attribute']) && is_array($_POST['attribute'])){
$arrAttribute = $_POST['attribute'];
foreach($arrAttribute as $attributeid){
$sqlattri = "SELECT parentid, name FROM attributes WHERE id = $attributeid";
$arrAttri = $common->getRow(DB_TAG_PUBLIC, $sqlattri);
$sqlattri = "SELECT name FROM attributes WHERE id = " . $arrAttri['parentid'];
$arrAttriParent = $common->getRow(DB_TAG_PUBLIC, $sqlattri);
$objCartProductAttribute = new CartProductAttribute(); //--> Cart
$objCartProductAttribute->setID($attributeid);
$objCartProductAttribute->setKey($arrAttriParent['name']);
$objCartProductAttribute->setValue($arrAttri['name']);
if(array_key_exists($attributeid, $attributePrice))
$objCartProductAttribute->setPrice($attributePrice[$attributeid]);
else
$objCartProductAttribute->setPrice(0);
$objCartProduct->setAttribute($objCartProductAttribute);
}
}
$objCart->setStatus(Cart::STATUS_CHANGED);
$objCart->setProduct($objCartProduct);
$_SESSION['cart'] = serialize($objCart);
header("Location: " . HOME_URL . '/viewCart.php');
exit;
}
$sql = "*";
$where = "reviews WHERE product_id = $id";
$allReviews = $common->listCustom(DB_TAG_PUBLIC, $sql, $where , "", $page, 5);
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->force_compile = false;
$smarty->debugging = false;
$smarty->caching = CACHING;
$smarty->cache_lifetime = CACHE_LIFETIME;
$smarty->assign('HOME_URL', HOME_URL);
$smarty->assign('HOME_URL_HTTP', HOME_URL);
$smarty->assign('categorys', $categorys);
$smarty->assign('topCategory', $topCategory);
$smarty->assign('specProducts', $specProducts);
$smarty->assign('product', $product);
$smarty->assign('arrRelatedProduct', $arrRelatedProduct);
$smarty->assign('attributes', $attributes);
$smarty->assign('arrImages', $arrImages);
$smarty->assign('firstImageID', $firstImageID);
$smarty->assign('firstImageExt', $firstImageExt);
$smarty->assign('id', $id);
$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);
$smarty->assign('finalPrice', $finalPrice);
$smarty->assign('isLogin', $isLogin);
$smarty->assign('allReviews', $allReviews);
$smarty->display('productDetails.html');
?>
| 123gohelmetsv2 | trunk/productDetails.php | PHP | asf20 | 9,021 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!-- saved from url=(0018)http://dealspl.us/ -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="test/test.css" rel="stylesheet" type="text/css" />
<script src="./test/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="./test/test.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div id="header">
<div class="box">
<a id="logo" href="/" title="dealspl.us Home"><img src="/images/dp2/logo.png" alt="dealspl.us logo" /></a>
<div id="top-search">
<span id="selectDeals" class="iconMap dealOn"><a onclick="switchAuto('deals');">Deals</a></span><span id="selectCoupons" class="iconMap couponOff"><a onclick="switchAuto('coupons');">Coupons</a></span>
<form method="get" name="main_search" id="mainSearchBar" action="/search.php"><div>
<input type="hidden" name="search_opt" value="deals">
<div id="search_div">
<input type="text" maxlength="128" name="keyword" class="search_input" value="" id="search_auto_bar" disabled="disabled" />
</div>
<input type="submit" id="top_search_bttn" class="iconMap" value="Search" /></div>
</form>
<div id="topSearchKeywords">
Popular: <a href="/snapfish-coupons" title="Snapfish coupons" onClick="trackPage(205,'F_TC2',0);">Snapfish</a> <a href="/hp-coupons" title="HP coupons" onClick="trackPage(44,'F_TC2',0);">HP</a> <a href="/dell-coupons" title="Dell coupons" onClick="trackPage(84,'F_TC2',0);">Dell</a> <a href="/macys-coupons" title="Macy's coupons" onClick="trackPage(21,'F_TC2',0);">Macy's</a> <a href="/target-coupons" title="Target coupons" onClick="trackPage(19,'F_TC2',0);">Target</a>
</div>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
createAutoCompleter('search_auto_bar', '/ajax/ajax.deals_auto.php', { cacheLength : 10, max : 10 }, submitSearch);
$('#search_auto_bar').removeAttr('disabled');
});
</script>
<a href="/submit" id="submitButton" class="iconMap">Submit</a>
</div>
</div>
<div class="clear"></div>
</div>
<div id="topNavContainer">
<div class="box">
<ul id="topMenu">
<li class="activeTab"><a href="./Coupon codes, printable coupons, promo codes and discounts - dealspl.us_files/Coupon codes, printable coupons, promo codes and discounts - dealspl.us.htm">Deals</a></li>
<li><a href="http://dealspl.us/coupons">Coupons</a></li>
<li><a href="http://dealspl.us/answer">Ask & Share</a></li> </ul>
<ul id="userMenu">
<li><a href="http://dealspl.us/login" class="firstMenuLink" onclick="showOverBox('login'); return false;">Sign In</a></li>
<li><a href="http://dealspl.us/signup"><span>New User?</span> Sign Up!</a></li>
</ul>
<div class="clear"></div>
<div id="over-box" style="display:none;"></div>
<div id="dark-overlay" style="display:none;"></div>
<div id="image-box" style="display:none;"></div>
<div id="video-box" style="display:none;"></div>
</div>
</div>
<div class="clear"></div>
<div id="subNav"> <div class="menu-cat">
<ul class="menu">
<li class="cat-drop selected">
<a class="cat-link" href="./Coupon codes, printable coupons, promo codes and discounts - dealspl.us_files/Coupon codes, printable coupons, promo codes and discounts - dealspl.us.htm">
<strong class="menu-name-nodrop">Hot</strong>
</a>
</li>
<li class="cat-drop">
<a class="cat-link" href="http://dealspl.us/deals/new/heatingup">
<strong class="menu-name-nodrop" style="color: #C00101 !important;">Heating Up</strong>
</a>
</li>
<li class="cat-drop">
<a class="cat-link" href="http://dealspl.us/deals/new/newest">
<strong class="menu-name-nodrop">Fresh</strong>
</a>
</li>
<li class="cat-drop " id="main-deals-Electronics">
<a class="cat-link" href="http://dealspl.us/All-Electronics_deals" onmouseover="ElectronicsTmr = new timer(0.5, 'showStoreList(\'deals\',\'Electronics\')');ElectronicsTmr.start();" onmouseout="if(ElectronicsTmr){ElectronicsTmr.stop();}" onclick="if(ElectronicsTmr){ElectronicsTmr.stop();}">
<strong class="menu-name-link">Electronics</strong>
<em class="menu-more-link" id="more-deals-Electronics" onclick="if(ElectronicsTmr){ElectronicsTmr.stop();}showStoreList('deals', 'Electronics'); return false;">more</em>
</a>
<div class="clear"></div>
<div class="submenu-drop" id="sub-deals-Electronics" style="display: none; width: 673px">
<div class="mid-horiz">
<div class="cat-section" style="margin-left:-1px;"> <a href="http://dealspl.us/Audio-Video_deals" class="submenu-option" style="font-weight:bold; border-bottom:1px solid #e5e5e5;">Audio/Video</a>
<a href="http://dealspl.us/DVD-Players_deals" class="submenu-option">DVD Players</a>
<a href="http://dealspl.us/Audio_deals" class="submenu-option">Audio</a>
<a href="http://dealspl.us/Music-and-Music-Instruments_deals" class="submenu-option">Music and Music Instruments</a>
<a href="http://dealspl.us/Movies-and-DVDs_deals" class="submenu-option">Movies and DVDs</a>
<a href="http://dealspl.us/Headphones_deals" class="submenu-option">Headphones</a>
<a href="http://dealspl.us/Speakers_deals" class="submenu-option">Speakers</a>
</div><div class="cat-section"> <a href="http://dealspl.us/Monitors-TV_deals" class="submenu-option" style="font-weight:bold; border-bottom:1px solid #e5e5e5;">Monitors/TV</a>
<a href="http://dealspl.us/TV_deals" class="submenu-option">TV</a>
<a href="http://dealspl.us/Monitors_deals" class="submenu-option">Monitors</a>
<a href="http://dealspl.us/Projectors_deals" class="submenu-option">Projectors</a>
<br> <a href="http://dealspl.us/Cameras-Camcorders_deals" class="submenu-option" style="font-weight:bold; border-bottom:1px solid #e5e5e5;">Cameras/Camcorders</a>
<a href="http://dealspl.us/Camera-Accessories_deals" class="submenu-option">Camera Accessories</a>
<a href="http://dealspl.us/Camcorders_deals" class="submenu-option">Camcorders</a>
<a href="http://dealspl.us/Cameras_deals" class="submenu-option">Cameras</a>
</div><div class="cat-section"> <a href="http://dealspl.us/Communication_deals" class="submenu-option" style="font-weight:bold; border-bottom:1px solid #e5e5e5;">Communication</a>
<a href="http://dealspl.us/Cell-Phones_deals" class="submenu-option">Cell Phones</a>
<a href="http://dealspl.us/Communications_deals" class="submenu-option">Communications</a>
<a href="http://dealspl.us/Headsets-and-Microphones_deals" class="submenu-option">Headsets and Microphones</a>
<a href="http://dealspl.us/Phones_deals" class="submenu-option">Phones</a>
<a href="http://dealspl.us/Cell-Phone-Accessories_deals" class="submenu-option">Cell Phone Accessories</a>
</div><div class="cat-section" style="border: 0;"> <a href="http://dealspl.us/MP3-Media-Players_deals" class="submenu-option" style="font-weight:bold; border-bottom:1px solid #e5e5e5;">MP3/Media Players</a>
<a href="http://dealspl.us/MP3-Players_deals" class="submenu-option">MP3 Players</a>
<a href="http://dealspl.us/MP3-Accessories_deals" class="submenu-option">MP3 Accessories</a>
<a href="http://dealspl.us/Media-Players_deals" class="submenu-option">Media Players</a>
<br> <a href="http://dealspl.us/Electronics_deals" class="submenu-option" style="font-weight:bold; border-bottom:1px solid #e5e5e5;">Electronics</a>
<a href="http://dealspl.us/Electrical-Accessories_deals" class="submenu-option">Electrical Accessories</a>
<a href="http://dealspl.us/GPS_deals" class="submenu-option">GPS</a>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
<!--[if IE 6]><iframe class="w506"></iframe><![endif]-->
</div>
</li>
<li class="cat-drop" id="main-deals-Computers">
<a class="cat-link" href="http://dealspl.us/Computers_deals" onmouseover="ComputersTmr = new timer(0.5, 'showStoreList(\'deals\',\'Computers\')');ComputersTmr.start();" onmouseout="if(ComputersTmr){ComputersTmr.stop();}" onclick="if(ComputersTmr){ComputersTmr.stop();}">
<strong class="menu-name-link">Computers</strong>
<em class="menu-more-link" id="more-deals-Computers" onclick="if(ComputersTmr){ComputersTmr.stop();}showStoreList('deals', 'Computers'); return false;">more</em>
</a>
<div class="clear"></div>
<div class="submenu-drop" id="sub-deals-Computers" style="display: none; width: 506px">
<div class="mid-horiz">
<div class="cat-section" style="margin-left:-1px;">
<a href="http://dealspl.us/Computers-Software_deals" class="submenu-option" style="font-weight:bold; border-bottom:1px solid #e5e5e5;">Computer Software</a>
<a href="http://dealspl.us/Desktops_deals" class="submenu-option">Desktops</a>
<a href="http://dealspl.us/Software_deals" class="submenu-option">Software</a>
<a href="http://dealspl.us/Laptop_deals" class="submenu-option">Laptops</a>
<a href="http://dealspl.us/Netbook_deals" class="submenu-option">Netbooks</a>
<a href="http://dealspl.us/Tablet_deals" class="submenu-option">Tablets</a>
<a href="http://dealspl.us/Apps_deals" class="submenu-option">Apps</a>
</div>
<div class="cat-section">
<a href="http://dealspl.us/Computer-Accessories_deals" class="submenu-option" style="font-weight:bold; border-bottom:1px solid #e5e5e5;">Computer Accessories</a>
<a href="http://dealspl.us/Cables-and-Adapters_deals" class="submenu-option">Cables and Adapters</a>
<a href="http://dealspl.us/CD-and-DVD-Drives_deals" class="submenu-option">CD and DVD Drives</a>
<a href="http://dealspl.us/Computer-Components_deals" class="submenu-option">Computer Components</a>
<a href="http://dealspl.us/Printers_deals" class="submenu-option">Printers</a>
<a href="http://dealspl.us/Keyboard-and-Mouse_deals" class="submenu-option">Keyboard and Mouse</a>
<a href="http://dealspl.us/Laptop-Accessories_deals" class="submenu-option">Laptop Accessories</a>
<a href="http://dealspl.us/Networking-Hardware_deals" class="submenu-option">Networking Hardwares</a>
<a href="http://dealspl.us/WebCams_deals" class="submenu-option">WebCams</a>
<a href="http://dealspl.us/Graphic-Cards_deals" class="submenu-option">Graphics Cards</a>
</div>
<div class="cat-section" style="border:none;">
<a href="http://dealspl.us/Media-Storage_deals" class="submenu-option" style="font-weight:bold; border-bottom:1px solid #e5e5e5;">Media/Storage</a>
<a href="http://dealspl.us/CD-and-DVD-Discs_deals" class="submenu-option">CD and DVD Discs</a>
<a href="http://dealspl.us/Memory-Reader_deals" class="submenu-option">Memory Readers</a>
<a href="http://dealspl.us/Flash-Drives_deals" class="submenu-option">Flash Drives</a>
<a href="http://dealspl.us/Memory-Cards_deals" class="submenu-option">Memory Cards</a>
<a href="http://dealspl.us/Hard-Drives_deals" class="submenu-option">Hard Drives</a>
</div>
</div>
<div class="clear"></div>
<!--[if IE 6]><iframe class="w506"></iframe><![endif]-->
</div>
</li>
<li class="cat-drop" id="main-deals-Home-Garden">
<a class="cat-link" href="http://dealspl.us/Home-Garden_deals" onmouseover="HomeGardenTmr = new timer(0.5, 'showStoreList(\'deals\',\'Home-Garden\')');HomeGardenTmr.start();" onmouseout="if(HomeGardenTmr){HomeGardenTmr.stop();}" onclick="if(HomeGardenTmr){HomeGardenTmr.stop();}">
<strong>Home & Garden</strong>
<em class="menu-more-link" id="more-deals-Home-Garden" onclick="if(HomeGardenTmr){HomeGardenTmr.stop();}showStoreList('deals', 'Home-Garden'); return false;">more</em>
</a>
<div class="clear"></div>
<div class="submenu-drop" id="sub-deals-Home-Garden" style="width: 153px; display: none;">
<div class="mid">
<a href="http://dealspl.us/Home-Garden_deals" class="submenu-option" style="font-weight:bold; border-bottom:1px solid #e5e5e5;">Home & Garden</a>
<a href="http://dealspl.us/Bed-and-Bath_deals" class="submenu-option">Bed and Bath</a><a href="http://dealspl.us/Home-Appliances_deals" class="submenu-option">Home Appliances</a><a href="http://dealspl.us/Home-Decor_deals" class="submenu-option">Home Decor</a><a href="http://dealspl.us/Kitchen_deals" class="submenu-option">Kitchen</a><a href="http://dealspl.us/Tools-and-Hardware_deals" class="submenu-option">Tools and Hardware</a><a href="http://dealspl.us/Furniture_deals" class="submenu-option">Furniture</a><a href="http://dealspl.us/Frames-and-Photos_deals" class="submenu-option">Frames and Photos</a><a href="http://dealspl.us/Automotive_deals" class="submenu-option">Automotive</a><a href="http://dealspl.us/Pets_deals" class="submenu-option">Pets</a><a href="http://dealspl.us/Grocery_deals" class="submenu-option">Grocery</a> </div>
<div class="clear"></div>
<!--[if IE 6]><iframe class="dropDown"></iframe><![endif]-->
</div>
</li>
<li class="cat-drop" id="main-deals-Clothing-Accessories">
<a class="cat-link" href="http://dealspl.us/Clothing-Accessories_deals" onmouseover="ClothingAccessoriesTmr = new timer(0.5, 'showStoreList(\'deals\',\'Clothing-Accessories\')');ClothingAccessoriesTmr.start();" onmouseout="if(ClothingAccessoriesTmr){ClothingAccessoriesTmr.stop();}" onclick="if(ClothingAccessoriesTmr){ClothingAccessoriesTmr.stop();}">
<strong>Clothing</strong>
<em class="menu-more-link" id="more-deals-Clothing-Accessories" onclick="if(ClothingAccessoriesTmr){ClothingAccessoriesTmr.stop();}showStoreList('deals', 'Clothing-Accessories'); return false;">more</em>
</a>
<div class="clear"></div>
<div class="submenu-drop" id="sub-deals-Clothing-Accessories" style="width: 153px; display: none;">
<div class="mid">
<a href="http://dealspl.us/Clothing-Accessories_deals" class="submenu-option" style="font-weight:bold; border-bottom:1px solid #e5e5e5;">Clothing</a>
<a href="http://dealspl.us/Jewelry-and-Watches_deals" class="submenu-option">Jewelry and Watches</a><a href="http://dealspl.us/Handbags-and-Luggage_deals" class="submenu-option">Handbags and Luggage</a><a href="http://dealspl.us/Shoes_deals" class="submenu-option">Shoes</a><a href="http://dealspl.us/Accessories_deals" class="submenu-option">Accessories</a><a href="http://dealspl.us/Men_deals" class="submenu-option">Men</a><a href="http://dealspl.us/Kids-and-Baby-Apparel_deals" class="submenu-option">Kids and Baby Apparel</a><a href="http://dealspl.us/Women_deals" class="submenu-option">Women</a> </div>
<div class="clear"></div>
<!--[if IE 6]><iframe class="dropDown"></iframe><![endif]-->
</div>
</li>
<li class="cat-drop" id="main-deals-Office">
<a class="cat-link" href="http://dealspl.us/Office_deals" onmouseover="OfficeTmr = new timer(0.5, 'showStoreList(\'deals\',\'Office\')');OfficeTmr.start();" onmouseout="if(OfficeTmr){OfficeTmr.stop();}" onclick="if(OfficeTmr){OfficeTmr.stop();}">
<strong>Office</strong>
<em class="menu-more-link" id="more-deals-Office" onclick="if(OfficeTmr){OfficeTmr.stop();}showStoreList('deals', 'Office'); return false;">more</em>
</a>
<div class="clear"></div>
<div class="submenu-drop" id="sub-deals-Office" style="width: 153px; display: none;">
<div class="mid">
<a href="http://dealspl.us/Office_deals" class="submenu-option" style="font-weight:bold; border-bottom:1px solid #e5e5e5;">Office</a>
<a href="http://dealspl.us/Office-Furniture_deals" class="submenu-option">Office Furniture</a><a href="http://dealspl.us/Office-Supplies_deals" class="submenu-option">Office Supplies</a><a href="http://dealspl.us/Domains-and-Web-Hosting_deals" class="submenu-option">Domains and Web Hosting</a> </div>
<div class="clear"></div>
<!--[if IE 6]><iframe class="dropDown"></iframe><![endif]-->
</div>
</li>
<li class="cat-drop" id="main-deals-Games-Toys">
<a class="cat-link" href="http://dealspl.us/Games-Toys_deals" onmouseover="GamesToysTmr = new timer(0.5, 'showStoreList(\'deals\',\'Games-Toys\')');GamesToysTmr.start();" onmouseout="if(GamesToysTmr){GamesToysTmr.stop();}" onclick="if(GamesToysTmr){GamesToysTmr.stop();}">
<strong>Games</strong>
<em class="menu-more-link" id="more-deals-Games-Toys" onclick="if(GamesToysTmr){GamesToysTmr.stop();}showStoreList('deals', 'Games-Toys'); return false;">more</em>
</a>
<div class="clear"></div>
<div class="submenu-drop" id="sub-deals-Games-Toys" style="width: 153px; display: none;">
<div class="mid">
<a href="http://dealspl.us/Games-Toys_deals" class="submenu-option" style="font-weight:bold; border-bottom:1px solid #e5e5e5;">Games</a>
<a href="http://dealspl.us/Toys_deals" class="submenu-option">Toys</a><a href="http://dealspl.us/Games_deals" class="submenu-option">Games</a><a href="http://dealspl.us/Game-Consoles_deals" class="submenu-option">Game Consoles</a><a href="http://dealspl.us/Game-Accessories_deals" class="submenu-option">Game Accessories</a> </div>
<div class="clear"></div>
<!--[if IE 6]><iframe class="dropDown"></iframe><![endif]-->
</div>
</li>
<li class="cat-drop" id="main-deals-Others">
<a class="cat-link" href="http://dealspl.us/Others_deals" onmouseover="OthersTmr = new timer(0.5, 'showStoreList(\'deals\',\'Others\')');OthersTmr.start();" onmouseout="if(OthersTmr){OthersTmr.stop();}" onclick="if(OthersTmr){OthersTmr.stop();}">
<strong>Other</strong>
<em class="menu-more-link" id="more-deals-Others" onclick="if(OthersTmr){OthersTmr.stop();}showStoreList('deals', 'Others'); return false;">more</em>
</a>
<div class="clear"></div>
<div class="submenu-drop" id="sub-deals-Others" style="width: 153px; display: none;">
<div class="mid">
<a href="http://dealspl.us/Others_deals" class="submenu-option" style="font-weight:bold; border-bottom:1px solid #e5e5e5;">Other</a>
<a href="http://dealspl.us/Credit-Card-Offers_deals" class="submenu-option">Credit Card Offers</a><a href="http://dealspl.us/Magazines-and-Books_deals" class="submenu-option">Magazines and Books</a><a href="http://dealspl.us/Health-and-Beauty-Supplies_deals" class="submenu-option">Health and Beauty Supplies</a><a href="http://dealspl.us/Gifts-Flowers-and-Food_deals" class="submenu-option">Gifts Flowers and Food</a><a href="http://dealspl.us/Babies-and-Kids_deals" class="submenu-option">Babies and Kids</a><a href="http://dealspl.us/Sports-and-Outdoor-Gear_deals" class="submenu-option">Sports and Outdoor Gear</a><a href="http://dealspl.us/Travel-and-Tickets_deals" class="submenu-option">Travel and Tickets</a><a href="http://dealspl.us/Fun-Stuff_deals" class="submenu-option">Fun Stuff</a> </div>
<div class="clear"></div>
<!--[if IE 6]><iframe class="dropDown"></iframe><![endif]-->
</div>
</li>
<li class="cat-drop" id="main-deals-Freebies">
<a class="cat-link" href="http://dealspl.us/freebies" onmouseover="FreebiesTmr = new timer(0.5, 'showStoreList(\'deals\',\'Freebies\')');FreebiesTmr.start();" onmouseout="if(FreebiesTmr){FreebiesTmr.stop();}" onclick="if(FreebiesTmr){FreebiesTmr.stop();}">
<strong>Freebies</strong>
<em class="menu-more-link" id="more-deals-Freebies" onclick="if(FreebiesTmr){FreebiesTmr.stop();}showStoreList('deals', 'Freebies'); return false;">more</em>
</a>
<div class="clear"></div>
<div class="submenu-drop" id="sub-deals-Freebies" style="width: 153px;display: none">
<div class="mid">
<a href="http://dealspl.us/freebies" class="submenu-option" style="font-weight: bold; border-bottom:1px solid #e5e5e5;">Freebies</a><a href="http://dealspl.us/special-offers" class="submenu-option">Store Specials</a><a href="http://dealspl.us/special-offers/news" class="submenu-option">News</a> </div>
<div class="clear"></div>
<!--[if IE 6]><iframe class="dropDown"></iframe><![endif]-->
</div>
</li>
</ul>
</div>
</div>
</body></html> | 123gohelmetsv2 | trunk/test2.htm | HTML | asf20 | 23,349 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("UploadFiles.php"); //--> UploadFiles
include_once("Strings.php"); //--> String utils
include_once("customerSession.inc.php");
include_once("Session.php"); //-- Session
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
$common = new Common();
$objStrings = new Strings();
$objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
$objCart = new Cart(); //--> Cart
session_start();
if($_SESSION['cart'])
$objCart = unserialize($_SESSION['cart']);
$isLogin = false;
if($objSession->exist()) {
$isLogin = true;
}
if(isset($_GET['page']))
$page = $_GET['page'];
else
$page = 1;
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->caching = CACHING;
$smarty->cache_lifetime = CACHE_LIFETIME;
$smarty->assign('HOME_URL', HOME_URL);
$smarty->assign('HOME_URL_HTTP', HOME_URL);
$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);
if(!$smarty->isCached('bestSellers.html', $page)){
include_once("includeCategory.php"); //--> include category
include_once("includeSpec.php"); //--> include spec
$products = array();
$allproducts = $common->listCustom(DB_TAG_PUBLIC, 'p.id, p.price, pd.name, pd.description', " products p, products_description pd WHERE p.status = 'normal' AND p.id = pd.productID AND pd.languageID = $LANGEUAGE_ID", 'ORDER BY p.r_ordered', $page, 12);
foreach($allproducts as $key => $value){
$arrImages = $common->getHash(DB_TAG_PUBLIC, "SELECT u.id, u.extName FROM upload_files u, product_images p WHERE u.id = p.imageID AND p.productID = ".$value['id']." AND type = " . UploadFiles::TYPE_IMAGE . ' ORDER BY p.isMain LIMIT 1');
if(count($arrImages) > 0){
$value['imageid'] = key($arrImages);
$value['imageExt'] = $arrImages[$value['imageid']];
}
$products[] = $value;
}
$smarty->assign('categorys', $categorys);
$smarty->assign('topCategory', $topCategory);
$smarty->assign('specProducts', $specProducts);
$smarty->assign('products', $products);
$smarty->assign('pageList', $common->getPageList());
$smarty->assign('nextPage', $common->getNextPage());
$smarty->assign('prePage', $common->getPrePage());
$smarty->assign('pageCount', $common->getPageCount());
$smarty->assign('page', $common->getPage());
}
$smarty->assign('isLogin', $isLogin);
$smarty->display('bestSellers.html', $page);
?>
| 123gohelmetsv2 | trunk/bestSellers.php | PHP | asf20 | 2,992 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("UploadFiles.php"); //--> UploadFiles
include_once("Strings.php"); //--> String utils
include_once("customerSession.inc.php");
include_once("Session.php"); //-- Session
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
$common = new Common();
$objStrings = new Strings();
$objCart = new Cart(); //--> Cart
$objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
session_start();
$isLogin = false;
if($objSession->exist()) {
$isLogin = true;
}
if($_SESSION['cart'])
$objCart = unserialize($_SESSION['cart']);
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->caching = CACHING;
$smarty->cache_lifetime = CACHE_LIFETIME;
$smarty->assign('HOME_URL', HOME_URL);
$smarty->assign('HOME_URL_HTTP', HOME_URL);
$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);
if(!$smarty->isCached('about.html')){
include_once("includeCategory.php"); //--> include category
include_once("includeSpec.php"); //--> include spec
$smarty->assign('categorys', $categorys);
$smarty->assign('topCategory', $topCategory);
$smarty->assign('specProducts', $specProducts);
}
$smarty->assign('isLogin', $isLogin);
$smarty->display('warranty.html');
?>
| 123gohelmetsv2 | trunk/warranty.php | PHP | asf20 | 1,842 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("Strings.php"); //--> String utils
include_once("customerSession.inc.php");
include_once("Session.php"); //-- Session
include_once ("Validation.php"); //-- Validation
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
include_once("orders/OrdersInfo.php"); //-- for payment
session_start();
$common = new Common();
$objStrings = new Strings();
$objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
$objCart = new Cart(); //--> Cart
$objValidation = new Validation(); //--> Validation
$isLogin = false;
if($objSession->exist()) {
$isLogin = true;
$location = "./checkout.php";
header("Location: $location");
exit;
}
if($_SESSION['cart']){
$objCart = unserialize($_SESSION['cart']);
}
if(isset($_POST['email'])){
$email = $_POST['email'];
if(empty($email)){
$error_message = "E-mail address is required.";
}else if(!$objValidation->isEmail($email)){
$error_message = 'The email format invalid.';
}else{
$customer = $common->getRow(DB_TAG_SYSTEM, "SELECT id, paypal_ec, lastname, isAutoRegister FROM customers WHERE email ='$email'");
// see if we found a record
if (count($customer) > 0 && $customer['isAutoRegister'] == 1) {
// login
$arrdata = array();
$arrdata['uname'] = $customer['lastname']; //--> add login name to session
if(is_array($objSession->start($customer['id'], $arrdata))){
}
}else if(count($customer) > 0){
$error_message = "E-mail address is existed. Please login.";
}
}
if(empty($error_message)){
if(isset($_SESSION['ordersInfo'])){
$objOrdersInfo = unserialize($_SESSION['ordersInfo']);
}else{
$objOrdersInfo = new OrdersInfo();
}
$objOrdersInfo->setEmail($email);
$_SESSION['ordersInfo'] = serialize($objOrdersInfo);
$location = "./checkout.php";
header("Location: $location");
exit;
}
}
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->caching = CACHING;
$smarty->cache_lifetime = CACHE_LIFETIME;
$smarty->assign('HOME_URL', HOME_URL);
$smarty->assign('HOME_URL_HTTP', HOME_URL);
$smarty->assign('error_message', $error_message);
$smarty->assign('error_message_login', $_GET['error_message_login']);
$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);
$smarty->assign('isLogin', $isLogin);
$smarty->display('preCheckout.html');
?>
| 123gohelmetsv2 | trunk/preCheckout.php | PHP | asf20 | 3,057 |
<?php
/*
* Created on Sep 13, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
include_once("Smarty.class.php"); //--> out template
include_once("Common.php");
include_once("UploadFiles.php"); //--> UploadFiles
include_once("customerSession.inc.php");
include_once ("Session.php"); //-- Session
include_once ("Password.php"); //-- Password
include_once("Strings.php"); //--> String utils
include_once("orders/Cart.php"); //--> Cart
include_once("orders/CartProduct.php"); //--> Cart
include_once("orders/CartProductAttribute.php"); //--> Cart
require_once('includeHttps.php');
$common = new Common();
$objPassword = new Password();
$objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session
$objCart = new Cart(); //--> Cart
$objStrings = new Strings();
$isLogin = false;
/*----- check session -----*/
if($objSession->exist()) {
$isLogin = true;
$customerid = $objSession->getUserID();
}else{
$location = HOME_URL . '/login.php';
header("Location: $location");
exit;
}
if($_SESSION['cart'])
$objCart = unserialize($_SESSION['cart']);
$password_new = '';
$password_new = '';
$password = '';
if(isset($_POST['password_current'])){
$password_new = $_POST['password_new'];
$password_confirmation = $_POST['password_confirmation'];
$password = $_POST['password_current'];
$sql = "SELECT id, password FROM customers WHERE id = $customerid";
$hmCustomer = $common->getHash(DB_TAG_SYSTEM, $sql);
if($password == '')
$error_message = "Password is required."; //-- login name was empty
else if($password_new == '')
$error_message = "new password is required."; //--
else if($password_new != $password_confirmation)
$error_message = "The Password Confirmation must match your new Password."; //--
else if (!($objPassword->validate($password, $hmCustomer[$customerid]))) {
$error_message = 'Your Current Password did not match the password in our records. Please try again.';
}
if(empty($error_message)){
$passwordmd5= $objPassword->encrypt($password_new);
$sql = "UPDATE customers SET modifiedTime = UTC_TIMESTAMP(), password = '$passwordmd5' WHERE id = $customerid";
$isSuccess = $common->update(DB_TAG_SYSTEM, $sql);
if($isSuccess){
$location = HOME_URL . '/myaccount.php';
header("Location: $location");
exit;
}else{
$error_message = 'change failure.';
}
}
}
include_once("includeCategory.php"); //--> include category
include_once("includeSpec.php"); //--> include spec
/*----- out html -----*/
$smarty = new Smarty(); //-- out template
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->force_compile = false;
$smarty->debugging = false;
$smarty->caching = false;
$smarty->cache_lifetime = 120;
$smarty->assign('error_message', $error_message);
$smarty->assign('HOME_URL', HOME_URL);
$smarty->assign('HOME_URL_HTTP', HOME_URL);
$smarty->assign('categorys', $categorys);
$smarty->assign('topCategory', $topCategory);
$smarty->assign('specProducts', $specProducts);
$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);
$smarty->assign('isLogin', $isLogin);
$smarty->display('changePassword.html');
?>
| 123gohelmetsv2 | trunk/changePassword.php | PHP | asf20 | 3,513 |
<?php
/*
* Created on Nov 8, 2010
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
include_once("./configure/configure.php"); //--> global var
if(isset($_GET['id'])){
$partnerID = $_GET['id'];
$arrDomain = explode(',', PARTNER_COOKIE_DOMAIN);
foreach($arrDomain as $domain){
setcookie(PARTNER_COOKIE_NAME, $partnerID, PARTNER_COOKIE_EXPIRE ,PARTNER_COOKIE_PATH, $domain);
}
$location = HOME_URL_HTTP;
header("Location: $location");
}
?>
| 123gohelmetsv2 | trunk/redirectPartner.php | PHP | asf20 | 560 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftSearches.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/searches.html | HTML | asf20 | 829 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftContact.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/contact.html | HTML | asf20 | 828 |
<div class="left_content">
<div class="title">
<span class="title_icon"><img src="{$HOME_URL}/images/service_icon_large.gif" alt="" title="" /></span>{$username} Account Information
</div>
<div class="contact_form">
<div class="form_subtitle">My Account</div>
<ul class="list">
<li><a href="{$HOME_URL}/accountEdit.php">View or change my account information.</a></li>
</ul>
<ul class="list">
<li><a href="{$HOME_URL}/addressBookList.php">View or change entries in my address book.</a></li>
</ul>
<ul class="list">
<li><a href="{$HOME_URL}/changePassword.php">Change my account password.</a></li>
</ul>
</div>
<div class="contact_form">
<div class="form_subtitle">My Orders</div>
<ul class="list">
<li><a href="{$HOME_URL}/ordersList.php">View the orders I have made.</a></li>
</ul>
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftMyaccount.html | HTML | asf20 | 942 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
<script language="javascript"><!--
var form = "";
var submitted = false;
var error = false;
var error_message = "";
function check_input(field_name, field_size, message) {
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var field_value = form.elements[field_name].value;
if (field_value.length < field_size) {
error_message = error_message + "* " + message + "\n";
error = true;
}
}
}
function check_radio(field_name, message) {
var isChecked = false;
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var radio = form.elements[field_name];
for (var i=0; i<radio.length; i++) {
if (radio[i].checked == true) {
isChecked = true;
break;
}
}
if (isChecked == false) {
error_message = error_message + "* " + message + "\n";
error = true;
}
}
}
function check_select(field_name, field_default, message) {
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var field_value = form.elements[field_name].value;
if (field_value == field_default) {
error_message = error_message + "* " + message + "\n";
error = true;
}
}
}
function check_password(field_name_1, field_name_2, field_size, message_1, message_2) {
if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
var password = form.elements[field_name_1].value;
var confirmation = form.elements[field_name_2].value;
if (password.length < field_size) {
error_message = error_message + "* " + message_1 + "\n";
error = true;
} else if (password != confirmation) {
error_message = error_message + "* " + message_2 + "\n";
error = true;
}
}
}
function check_password_new(field_name_1, field_name_2, field_name_3, field_size, message_1, message_2, message_3) {
if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
var password_current = form.elements[field_name_1].value;
var password_new = form.elements[field_name_2].value;
var password_confirmation = form.elements[field_name_3].value;
if (password_current.length < field_size) {
error_message = error_message + "* " + message_1 + "\n";
error = true;
} else if (password_new.length < field_size) {
error_message = error_message + "* " + message_2 + "\n";
error = true;
} else if (password_new != password_confirmation) {
error_message = error_message + "* " + message_3 + "\n";
error = true;
}
}
}
function check_form(form_name) {
if (submitted == true) {
alert("This form has already been submitted. Please press Ok and wait for this process to be completed.");
return false;
}
error = false;
form = form_name;
error_message = "Errors have occured during the process of your form.\n\nPlease make the following corrections:\n\n";
check_input("firstname", 2, "Your First Name must contain a minimum of 2 characters.");
check_input("lastname", 2, "Your Last Name must contain a minimum of 2 characters.");
check_input("email_address", 6, "Your E-Mail Address must contain a minimum of 6 characters.");
check_input("telephone", 3, "Your Telephone Number must contain a minimum of 3 characters.");
if (error == true) {
alert(error_message);
return false;
} else {
submitted = true;
return true;
}
}
//--></script>
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftAccountEdit.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/accountEdit.html | HTML | asf20 | 4,510 |
<div class="left_content">
<div class="title"><span class="title_icon"><img src="{$HOME_URL}/images/bullet1.gif" alt="" title="" /></span>Order Details</div>
<div class="address_list_box">
<div class="address_form">
<div class="form_subtitle">My Order Details</div>
<table border="0" width="100%">
<tr height="35">
<td colspan="3">
<b>Order Number:</b>
<b>#{$arrOrders.id} <small>({$arrOrders.status})</small></b>
</td>
</tr>
<tr height="20">
<td width="120">
<b>Order Date:</b>
</td>
<td>
{$arrOrders.createdTime|date_format:"%A %d %B, %Y"}
</td>
</tr>
<tr height="15">
<td>
</td>
<td>
</td>
</tr>
<tr height="20">
<td>
<b>Shipped To:</b>
</td>
<td>
{$arrOrders.delivery_name} <br> {$arrOrders.delivery_street}<br>{$arrOrders.delivery_city}, {$arrOrders.delivery_state} {$arrOrders.delivery_postcode}<br> {$arrOrders.delivery_country}
</td>
</tr>
<tr height="15">
<td>
</td>
<td>
</td>
</tr>
<tr height="20">
<td>
<b>Products:</b>
</td>
<td align="left">
<table border="0" width="100%">
{foreach item=data from=$arrOrdersProducts}
<tr>
<td align="left" valign="top" width="30">{$data.quantity} x</td>
<td valign="top">{$data.name}<br><nobr><small>
{foreach item=attri from = $data.attributes}
<i> - {$attri.attribute}: {$attri.attributeValue}
{if $attri.attributeValuePrice != 0}
($+{$attri.attributeValuePrice / 100})
{/if}
</i><br>
{/foreach}
</small></nobr></td>
<td align="left" valign="top">${$data.finalPrice / 100}</td>
</tr>
{/foreach}
</table>
</td>
</tr>
<tr height="15">
<td>
</td>
<td>
</td>
</tr>
<tr height="20">
<td>
<b>Billing:</b>
</td>
<td>
{$arrOrders.billing_name} <br> {$arrOrders.billing_street}<br> {$arrOrders.billing_city}, {$arrOrders.billing_state} {$arrOrders.billing_postcode}<br> {$arrOrders.billing_country}
</td>
</tr>
<tr height="15">
<td>
</td>
<td>
</td>
</tr>
<tr height="20">
<td>
<b>Billing Total:</b>
</td>
<td align="left">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
{foreach item=data from=$arrAccountList}
<tr>
<td align="right" width="100%">{$data.classes}:</td>
<td align="left">${$data.amount / 100}</td>
</tr>
{/foreach}
</table>
</td>
</tr>
<tr height="15">
<td>
</td>
<td>
</td>
</tr>
<tr height="20">
<td>
<b>Payment Method:</b>
</td>
<td>
{$arrOrders.payment_method}
</td>
</tr>
<tr height="15">
<td>
</td>
<td>
</td>
</tr>
<tr height="20">
<td>
<b>Order History:</b>
</td>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
{foreach item=data from=$arrStatusList}
<tr>
<td valign="top" width="120">{$data.datePurchased|date_format:"%m/%d/%Y %H:%M:%S"}</td>
<td valign="top" width="70">{$data.status}</td>
<td valign="top">{$data.comments|nl2br}</td>
</tr>
{/foreach}
</table>
</table>
</td>
</tr>
</table>
<div class="form_row">
<a href="{$HOME_URL}/ordersList.php" class="continue">< Back</a>
</div>
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftOrderView.html | HTML | asf20 | 4,313 |
<div class="left_content">
<div class="car_title"><span class="title_icon"><img src="images/service_icon_large.gif" alt="" title="" /></span>Coupon Code</div>
<div class="feat_prod_box_details">
<form name="couponcode" action="" method="post">
<table class="coupon_table">
<tr><td colspan="3"><span class="red">{$error_message}</span></td></tr>
<tr>
<td align="right" height="50" width="120">
<strong>Coupon Code:</strong>
</td>
<td>
<input type="text" name="coupon" maxlength="30" class="view_cart_input" />
</td>
<td align="left">
<input type="submit" class="coupon" value="Apply" />
</td>
</tr>
<tr>
</tr>
</table>
</form>
</div>
<div class="car_title"><span class="title_icon"><img src="images/service_icon_large.gif" alt="" title="" /></span>Calculate Tax</div>
<div class="feat_prod_box_details">
<form name="couponcode" action="" method="post">
<table class="coupon_table" border="0">
<tr><td colspan="3"><span class="red">{$error_tax}</span></td></tr>
<tr>
<td align="right" height="50" width="120">
<strong>Zone:</strong>
</td>
<td>
<select name=zoneid style="height:22px; margin-top:0px;">
{html_options options=$arrZones selected=$zoneid}
</select>
</td>
<td align="left">
<input type="submit" class="coupon" value="Calculate" />
</td>
</tr>
<tr>
</tr>
</table>
</form>
</div>
<div class="clear"></div>
</div>
| 123gohelmetsv2 | trunk/templates_en-US/leftCheckout.html | HTML | asf20 | 1,867 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
<script language="javascript"><!--
var form = "";
var submitted = false;
var error = false;
var error_message = "";
function check_input(field_name, field_size, message) {
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var field_value = form.elements[field_name].value;
if (field_value.length < field_size) {
error_message = error_message + "* " + message + "\n";
error = true;
}
}
}
function check_radio(field_name, message) {
var isChecked = false;
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var radio = form.elements[field_name];
for (var i=0; i<radio.length; i++) {
if (radio[i].checked == true) {
isChecked = true;
break;
}
}
if (isChecked == false) {
error_message = error_message + "* " + message + "\n";
error = true;
}
}
}
function check_select(field_name, field_default, message) {
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var field_value = form.elements[field_name].value;
if (field_value == field_default) {
error_message = error_message + "* " + message + "\n";
error = true;
}
}
}
function check_password(field_name_1, field_name_2, field_size, message_1, message_2) {
if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
var password = form.elements[field_name_1].value;
var confirmation = form.elements[field_name_2].value;
if (password.length < field_size) {
error_message = error_message + "* " + message_1 + "\n";
error = true;
} else if (password != confirmation) {
error_message = error_message + "* " + message_2 + "\n";
error = true;
}
}
}
function check_password_new(field_name_1, field_name_2, field_name_3, field_size, message_1, message_2, message_3) {
if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
var password_current = form.elements[field_name_1].value;
var password_new = form.elements[field_name_2].value;
var password_confirmation = form.elements[field_name_3].value;
if (password_current.length < field_size) {
error_message = error_message + "* " + message_1 + "\n";
error = true;
} else if (password_new.length < field_size) {
error_message = error_message + "* " + message_2 + "\n";
error = true;
} else if (password_new != password_confirmation) {
error_message = error_message + "* " + message_3 + "\n";
error = true;
}
}
}
function check_form(form_name) {
if (submitted == true) {
alert("This form has already been submitted. Please press Ok and wait for this process to be completed.");
return false;
}
error = false;
form = form_name;
error_message = "Errors have occured during the process of your form.\n\nPlease make the following corrections:\n\n";
check_input("firstname", 2, "Your First Name must contain a minimum of 2 characters.");
check_input("lastname", 2, "Your Last Name must contain a minimum of 2 characters.");
check_input("street", 5, "Your Street Address must contain a minimum of 5 characters.");
check_input("postcode", 4, "Your Post Code must contain a minimum of 4 characters.");
check_input("city", 3, "Your City must contain a minimum of 3 characters.");
check_input("state", 2, "Your State must contain a minimum of 2 characters.");
check_select("countryId", "", "You must select a country from the Countries pull down menu.");
if (error == true) {
alert(error_message);
return false;
} else {
submitted = true;
return true;
}
}
//--></script>
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftAddressBookEdit.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/addressBookEdit.html | HTML | asf20 | 4,765 |
<div class="left_content">
<div class="crumb_nav">
<a href="{$HOME_URL}">home</a> >> {$product.name}
</div>
<div class="title">
<span class="title_icon"><img
src="{$HOME_URL}/images/btn.jpg" alt="" title="" />
</span>{$product.name}
</div>
<div class="feat_prod_box_details">
<div class="prod_img">
{if $product.promoDescrit != ''}
<span class="new_icon"><img src="{$HOME_URL}/images/promo_text_icon.gif" alt="{$promoProducts[info].name}" title="{$promoProducts[info].name}" /> </span>
{/if}
<a class='highslide' id="thumb1" href='{$HOME_URL}/admin/pic/thumbnail.php?width=0&height=0&fileName={$firstImageID}.{$firstImageExt}' onclick="return hs.expand(this, miniGalleryOptions1)" title="{$product.name}">
<img src="{$HOME_URL}/admin/pic/thumbnail.php?width=130&height=130&fileName={$firstImageID}.{$firstImageExt}" alt="{$product.name}" title="Zoom Image" border="0" />
</a>
<div class="hidden-container">
{foreach name=image item=data from=$arrImages}
<a class='highslide' href='{$HOME_URL}/admin/pic/thumbnail.php?width=0&height=0&fileName={$data.id}.{$data.extName}' onclick="return hs.expand(this, miniGalleryOptions1)" title="{$product.name}">
<img src='{$HOME_URL}/admin/pic/thumbnail.php?width=130&height=130&fileName={$data.id}.{$data.extName}' alt=''/>
</a>
{/foreach}
</div>
<br><br><br>
<a href="javascript:void(0)" class="review_link" onclick="showlightbox('{$HTMO_HOME}/writeReview.php?id={$id}')">Write your own review</a>
</div>
<div class="prod_det_box">
<div class="box_top"></div>
<div class="box_center">
<div class="prod_detail_title"></div>
<div>
<table>
<tr height="20">
<td width="75" align="left">
<ul class="unit-rating" title="rating:{$product.r_rating * 10}%">
<li class="current-rating" style="width:{$product.r_rating * 10}%;">Currently {$product.r_rating * 10}; Rating </li>
</ul>
</td>
<td align="left">
({$product.r_reviewCount} customer reviews)
</td>
</tr>
<tr><td> </td><td></td></tr>
</table>
</div>
<div class="price">
<table>
<tr>
<td width="75" align="right">
<strong>In Stock:</strong>
</td>
<td align="left">
Yes
</td>
</tr>
</table>
</div>
<form name="fm" action="" method="post">
<div class="price">
<table>
<tr>
<td width="75" align="right">
<strong>PRICE:</strong>
</td>
<td align="left">
{if $product.finalPrice > 0}
<span class="nprice-g">${$product.finalPrice / 100}</span>
<span class="oprice-g"><s>${$product.price / 100}</s></span>
{else}
<span class="nprice-g">${$product.price / 100}</span>
{/if}
</td>
</tr>
</table>
</div>
<div class="price">
<table>
{foreach name=attribute item=data key=key from=$attributes}
<tr>
<td width="75" align="right">
<strong>{$key}:</strong>
</td>
<td align="left">
<select name="attribute[]">
<option value="0">select ...</option>
{html_options options=$data.attri selected=$attribute}
</select>
</td>
</tr>
{/foreach}
</table>
</div>
<div class="price">
<table>
<tr>
<td width="75" align="right">
<strong>Quantity:</strong>
</td>
<td align="left">
<input style="width:30px;border:1px solid #829DB6; text-align:center; padding-top:2px;font-weight:normal;" value="1" name="quantity" id="quantity">
</td>
</tr>
</table>
</div>
{if $product.promoDescrit != ''}
<div class="promo">
<table>
<tr>
<td width="75" align="right">
<strong>Promotion:</strong>
</td>
<td align="left">
<span class="promo">{$product.promoDescrit}</span>
</td>
</tr>
</table>
</div>
{/if}
<input type="hidden" name="addCart" value="addCart">
<a href="javascript:void(0)" class="more">
<input type="image" src="{$HOME_URL}/images/order_now.gif" alt="" title="" border="0" onClick="return checkAttribute('attribute[]');" />
</a>
</form>
<div class="clear"></div>
</div>
<div class="box_bottom"></div>
</div>
<div class="clear"></div>
</div>
<div id="demo" class="demolayout">
<ul id="demo-nav" class="demolayout">
<li><a class="active" href="javascript:void(0)">More Details</a>
</li>
<li><a class="more" href="javascript:void(0)">More Colors</a>
</li>
<li><a class="more" href="javascript:void(0)">Reviews</a>
</li>
</ul>
<div class="tabs-container">
<div style="display: block;" class="tab" id="tab1">
<div class="prod_more_details">
<p class="more_details">{$product.description}</p>
</div>
</div>
<div style="display: none;" class="tab" id="tab2">
{section name=info loop=$arrRelatedProduct}
<div class="new_prod_box">
<a href="{$HOME_URL}/p/{$arrRelatedProduct[info].relatedProdID}/{$objStrings->getCharNum({$arrRelatedProduct[info].name})}.html" title=" {$arrRelatedProduct[info].name}">
{$arrRelatedProduct[info].imageName}
</a>
<div class="new_prod_bg">
<a href="{$HOME_URL}/p/{$arrRelatedProduct[info].relatedProdID}/{$objStrings->getCharNum({$arrRelatedProduct[info].name})}.html">
<img src="{$HOME_URL}/admin/pic/thumbnail.php?width=80&height=80&fileName={$arrRelatedProduct[info].imageID}.{$arrRelatedProduct[info].imageExtName}"
border="0" alt="{$arrRelatedProduct[info].name}" title=" {$arrRelatedProduct[info].name}" class="thumb" />
</a>
</div>
</div>
{/section}
<div class="clear"></div>
</div>
<div style="display: block;" class="tab" id="tab3">
<div class="prod_more_details">
<table width="100%" border="0px">
{foreach name=image item=data from=$allReviews}
<tr>
<td align="left">
<strong>{$data.title}</strong>
</td>
<td width="100px" align="right">
<img src="{$HOME_HOME}/images/stars{$data.rating}.gif">
</td>
</tr>
<tr>
<td colspan="2">
Comment: {$data.content}
</td>
</tr>
<tr>
<td colspan="2" class="review_location">
<span>{$data.userName}</span>
</td>
</tr>
<tr>
<td colspan="2" class="review_location">
<span>{$data.location}</span>
</td>
</tr>
<tr>
<td colspan="2" class="review_separator">
</td>
</tr>
{/foreach}
</table>
</div>
</div>
</div>
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftProductDetails.html | HTML | asf20 | 7,148 |
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>New Product Review</title>
<style type="text/css">
{literal}
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;text-decoration:none;list-style:none;outline:0;vertical-align:top;}img{-ms-interpolation-mode: bicubic;}
{/literal}
div.container {
margin-left:5px;
}
div.field {
margin-bottom:5px;
float:left;
clear:both;
}
div.field label {
font-size:11px;
font-weight:bold;
display:block;
}
div.field input, div.field textarea {
border:1px solid #ccc;
background:#fff;
display:block;
width:250px;
}
div.item {
display:none;
}
div.customer {
display:none;
}
/* RATING */
div.rating input {
display:none;
}
div.rating a {
display:block;
float:left;
width:8px;
height:15px;
background:#fff url(https://system.netsuite.com/c.TSTDRV288629/star.gif);
text-indent:-100000000px;
overflow:hidden;
}
div.rating a#left {
background-position:left top;
}
div.rating a#right {
background-position:right top;
}
div.rating a#left.hover {
background-position:left -15px !important;
}
div.rating a#right.hover {
background-position:right -15px !important;
}
div.rating a#left.selected {
background-position:left -15px !important;
}
div.rating a#right.selected {
background-position:right -15px !important;
}
#submitbutton {
clear:both;
float:left;
}
</style>
</head>
<body>
<div class="container">
<form id='main_form' name='main_form' method='POST' enctype='multipart/form-data' action='' onsubmit='return ( window.isinited && window.isvalid && save_record( true ) )' style='margin: 0'>
<div class="field title">
<font color="#FF0000" style="font-size:13px;">
{$error_message}
</font>
</div>
<div class="field title">
<label for="custrecordreviewtitle">Title:</label>
<span style="white-space: nowrap" id="custrecordreviewtitle_fs" class="effectStatic">
<input maxlength="250" name="title" type="text" size="25" value="{$title}"></span>
</div>
<div class="field comments">
<label for="custrecordreviewmessage">Comments:</label>
<textarea name='content' rows='5' cols='-1'>{$content}</textarea>
</div>
<div class="field rating" id="rating">
<label for="custrecordreviewrating">Rating:</label>
<input id="custrecordreviewrating" style="; ime-mode:disabled" name="rating" type="text" size="25">
<div id="starrating">
<a id="left" href="javascript:rate(1)" onmouseover="ratingHover(this)" onclick="ratingSelect(this)">1</a>
<a id="right" href="javascript:rate(2)" onmouseover="ratingHover(this)" onclick="ratingSelect(this)">2</a>
<a id="left" href="javascript:rate(3)" onmouseover="ratingHover(this)" onclick="ratingSelect(this)">3</a>
<a id="right" href="javascript:rate(4)" onmouseover="ratingHover(this)" onclick="ratingSelect(this)">4</a>
<a id="left" href="javascript:rate(5)" onmouseover="ratingHover(this)" onclick="ratingSelect(this)">5</a>
<a id="right" href="javascript:rate(6)" onmouseover="ratingHover(this)" onclick="ratingSelect(this)">6</a>
<a id="left" href="javascript:rate(7)" onmouseover="ratingHover(this)" onclick="ratingSelect(this)">7</a>
<a id="right" href="javascript:rate(8)" onmouseover="ratingHover(this)" onclick="ratingSelect(this)">8</a>
<a id="left" href="javascript:rate(9)" onmouseover="ratingHover(this)" onclick="ratingSelect(this)">9</a>
<a id="right" href="javascript:rate(10)" onmouseover="ratingHover(this)" onclick="ratingSelect(this)">10</a>
</div>
</div>
<div class="field name">
<label for="custrecordreviewlocation">Your Name:</label>
<input id="custrecordreviewreviewer" maxlength="300" name="yourName" type="text" size="25" value="{$yourName}">
</div>
<div class="field location">
<label for="custrecordreviewreviewer">Your Current Location:</label>
<input id="custrecordreviewlocation" maxlength="300" name="location" type="text" size="25" value="{$location}">
</div>
<input name="id" type="hidden" id="id" value="{$id}">
<input type="submit" value="submit" id="submitbutton">
<!-- REQUIRED HIDDEN FIELDS FOR HTML ONLINE FORM -->
<!-- END OF REQUIRED HIDDEN FIELDS FOR HTML ONLINE FORM -->
</form>
</div>
<script type="text/javascript">
function rate( integer ) {
document.getElementById( 'custrecordreviewrating' ).value = integer;
}
function showSelection() {
var index = document.getElementById( 'custrecordreviewrating' ).value;
var elements = this.getElementsByTagName( 'a' );
var addClass = true;
for( var i = 0; i <elements.length; i++ ) {
if( i == index ) addClass = false;
if( addClass ) {
elements[i].className = 'selected';
}
else {
elements[i].className = '';
}
}
}
function ratingHover() {
var element = this;
var container = element.parentNode;
var elements = container.getElementsByTagName( 'a' );
var addClass = true;
for( var i = 0; i <elements.length; i++ ) {
if( addClass ) {
elements[i].className = 'hover';
if( elements[i] == element ) {
addClass = false;
}
}
else {
elements[i].className = '';
}
}
}
function ratingSelect() {
var element = this;
var container = element.parentNode;
var elements = container.getElementsByTagName( 'a' );
var addClass = true;
for( var i = 0; i <elements.length; i++ ) {
if( addClass ) {
elements[i].className = 'selected';
if( elements[i] == element ) addClass = false;
}
else {
elements[i].className = '';
}
}
}
var stars = document.getElementById( 'starrating' );
stars.onmouseout = showSelection;
var elements = stars.getElementsByTagName( 'a' );
for( var i = 0; i <elements.length; i++ ) {
elements[i].onclick = ratingSelect;
elements[i].onmouseover = ratingHover;
}
</script>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/writeReview.html | HTML | asf20 | 5,998 |
<div class="left_content">
<div class="title">
<span class="title_icon"><img src="{$HOME_URL}/images/service_icon_large.gif" alt="" title="" /></span>Privacy Policy
</div>
<table class="main" border="0" cellpadding="2" cellspacing="0" width="100%" id="table2">
<tr>
<td class="main" valign="top">
<div class=WordSection1>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US><!--[if gte vml 1]><v:shapetype
id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"
path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" alt="Privacy Policy"
style='width:167.25pt;height:27pt'>
<v:imagedata src="Privacy%20and%20Policy.files/image001.gif" o:href="http://www.hc2.altruik.com/imgs/header_privacy.gif"/>
</v:shape><![endif]--><![if !vml]><img width=223 height=36
src="{$HOME_URL}/images/privacy.png" alt="Privacy Policy" v:shapes="_x0000_i1025"><![endif]></span><span
class=z><span lang=EN-US style='font-size:9.0pt'><o:p></o:p></span></span></p>
<p class=MsoNormal><span class=z><span lang=EN-US style='font-size:9.0pt'><o:p> </o:p></span></span></p>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>We
welcome you to the 123gohelmets.com website.</span></p>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span class=z><span lang=EN-US><o:p> </o:p></span></span></p>
<p class=MsoNormal><span class=z><span lang=EN-US style='color:red'>We
understand your concerns about privacy and we want to assure you that 123gohelmets.com
takes privacy matters seriously. Therefore, we are providing this notice
explaining our online information practices and the choices you can make about
the way your information is collected and use.<o:p></o:p></span></span></p>
<p class=MsoNormal><span class=z><span lang=EN-US><o:p> </o:p></span></span></p>
<p class=MsoNormal><span class=z><span lang=EN-US>This Privacy Policy Statement
applies to 123gohelmets.Com website and governs data collection and usage at
all 123gohelmets.com sites and services. </span></span><span lang=EN-US>This
Privacy Policy Statement does not apply to unaffiliated third party websites. </span></p>
<p class=MsoNormal><span lang=EN-US><br>
123gohelmets<span class=z>.Com is a general wide audience web site, intended
for users of all ages. Personal information of all users is collected, used and
disclosed as described in this Privacy Policy Statement. </span><a
name="collect_info">By submitting information to us and/or by using our website
you are agreeing to those rules. You give your consent that all information
that you submit may be processed by 123gohelmets.com in the manner and for the
purposes described below.<span class=z><o:p></o:p></span></a></span></p>
<p class=MsoNormal><span style='mso-bookmark:collect_info'><span lang=EN-US><o:p> </o:p></span></span></p>
<span style='mso-bookmark:collect_info'></span>
<p><b style='mso-bidi-font-weight:normal'><span lang=EN-US>The Information We
Collect<o:p></o:p></span></b></p>
<p><span lang=EN-US>This notice applies to all information collected or
submitted on the 123gohelmets.Com website. Information such as: your name,
address, e-mail address, telephone number, etc. collected by 123gohelmets.Com
solely for the purpose of billing and shipping your online purchases. </span></p>
<p><span lang=EN-US>You are free to browse the website without creating an
account or revealing any personal information about yourself. However, you will
be asked to create an account when you purchase something in order to take
advantage of certain features on the website, such as the "My
Account" and other 123gohelmets.Com services. If you choose to not create
an account, these features will not be available to you. </span></p>
<p><span lang=EN-US>When contacting the 123gohelmets.Com Customer Service
department our friendly staff may request that you confirm certain personal
information in order to verify and protect <span class=GramE>your</span>
identity. </span></p>
<p><span lang=EN-US><o:p> </o:p></span></p>
<p><b style='mso-bidi-font-weight:normal'><span lang=EN-US>Use of your Personal
Information <o:p></o:p></span></b></p>
<p><span lang=EN-US>123gohelmets.Com and its operational service partners
collect and use your personal information to fulfill your requests for product
orders and delivery of products. 123gohelmets.Com may also contact you via
surveys to conduct research opinion to analyze use of and improve our website, potential
new products, and services that may be offered. </span></p>
<p><span lang=EN-US>123gohelmets.Com does not sell, rent or lease its customer
lists to third parties. It is possible that 123gohelmets.Com may, from time to
time, contact you on behalf of external business partners about a particular
offering that may be of interest to you. In those cases, your personal
information (e-mail, name, address, telephone number) is not transferred to the
third party. We occasionally hire other companies to provide limited services
on our behalf, such as handling the processing and delivery of mailings,
providing customer support, processing transactions, or performing statistical
analysis of our services. We will only provide those companies the personal information
they need to deliver the service. They are required to maintain the
confidentiality of your information and are prohibited from using that
information for any other purpose. </span></p>
<p><span lang=EN-US>123gohelmets.Com does not use or disclose sensitive
personal information, such as race, religion, or political affiliations,
without your explicit consent. </span></p>
<p><span lang=EN-US>123gohelmets.Com may access and/or disclose your personal
information if required to do so by law or in the good faith belief that such
action is necessary to: (a) conform to the edicts of the law or comply with
legal process served on 123gohelmets.Com or the site; (b) protect and defend
the rights or property of 123gohelmets.Com, including its Web site; or (c) act
under exigent circumstances to protect the personal safety of users of 123gohelmets.Com
or the public. </span></p>
<p><span lang=EN-US>Personal information collected on this site may be stored
and processed in the <st1:place w:st="on"><st1:country-region w:st="on">United
States</st1:country-region></st1:place> or any other country in which 123gohelmets.Com
or <span class=SpellE><span class=GramE>it’s</span></span> Affiliates,
subsidiaries or agents maintain facilities, and by using this site, you consent
to any such transfer of information outside of your country. 123gohelmets.Com
abides by the safe harbor framework as set forth by the U.S. Department of
Commerce regarding the collection, use, and retention of data from the European
Union. </span></p>
<p><span lang=EN-US>Information we collect on the 123gohelmets.Com and <span
class=SpellE>it's</span> Affiliate Sites may be used to enhance your shopping
experience in the following ways: * To deliver merchandise that you have
purchased online or at our facility * Register you as a member of 123gohelmets.Com
* Prevent fraud and bill you for your purchased items * Confirm your estimates
and orders * Respond to your Customer Service & Sales inquiries or requests
* Communicate great values and featured items to you * Locate and stock the
products you are searching for * Customize your online shopping experience *
Comply with valid or applicable legal procedures, requirements, regulations or
statutes </span></p>
<p><b style='mso-bidi-font-weight:normal'><span lang=EN-US>Control your
Personal Information <o:p></o:p></span></b></p>
<p><span lang=EN-US>123gohelmets.Com offers its customers opportunity to review
and change the information you provide to us by logging into the website and
entering in the new information yourself. You may also notify us of your
preferences via Email. Please be sure to provide complete account information
so we can identify you in our records. </span></p>
<p><span lang=EN-US>If you created an account with 123gohelmets.com, you can
edit your name, contact information and preferences by logging into the “My
Account” section of the website. Note: You may also stop the delivery of future
promotional e-mail from 123gohelmets.Com by responding directly to any email
you receive with a request to remove you from the mailing list. </span></p>
<p><span lang=EN-US>Do not share your 123gohelmets.Com account password with
anyone. Other than on the 123gohelmets.Com and <span class=SpellE><span
class=GramE>it's</span></span> Affiliate Websites, 123gohelmets.Com will never
ask you for your password information. </span></p>
<p><b style='mso-bidi-font-weight:normal'><span lang=EN-US>Security of your
Personal Information <o:p></o:p></span></b></p>
<p><span lang=EN-US>123gohelmets.Com is committed to protecting the security of
your personal information. We use a variety of security technologies and
procedures to help protect your personal information from unauthorized access,
use, or disclosure. For example, we store the personal information you provide
on computer systems with limited access that are located in external controlled
facilities. When we transmit highly confidential information (such as a credit
card number) over the Internet, we protect it through VeriSign's Payment
Service. </span></p>
<p><b style='mso-bidi-font-weight:normal'><span lang=EN-US>Secured Shopping
with VeriSign<o:p></o:p></span></b></p>
<p><span lang=EN-US>123gohelmets.Com also utilizes a technology called Secure
Sockets Layer (SSL). If your browser is capable of SSL, and most are, your
personal information will be automatically encrypted or encoded, before it is
sent through the Internet. The digital certificate and seal that you see on our
checkout system is from <span class=SpellE>Verisign</span>, Inc., a leading
provider of Internet trust services. When you enter a secure portion of 123gohelmets.Com
and <span class=SpellE><span class=GramE>it's</span></span> Affiliates (which
is any page containing any of your personal information), an image of a closed
lock or a solid key should appear in the bottom bar of your browser window. If
you click on this image, a small popup window displaying site security
information will appear. This certificate guarantees that your personal
information is being transmitted in secure (encrypted) form. Ultimately, your
personal information is protected by the password you created when you signed
up for an account at 123gohelmets.Com or <span class=SpellE><span class=GramE>it's</span></span>
Affiliates (or another password you chose after changing a previous password).
Please keep this password confidential. No Customer Service Associate or any
other representative of 123gohelmets.Com will ever ask you for your password.
The confidentiality of your password is yours to protect. You may change it
anytime by going to "My Account". Log in with your email address and
password, then click "Change Email & Password" and enter a new
password. </span></p>
<p><b style='mso-bidi-font-weight:normal'><span lang=EN-US>Cookies and Other
Computer Information <o:p></o:p></span></b></p>
<p><span lang=EN-US>When you visit 123gohelmets.Com or <span class=SpellE><span
class=GramE>it's</span></span> Affiliates, you may be assigned a permanent
"cookies". “Cookies” are small pieces of information that a website
will send to and store on your computer's hard drive. The purpose of this
cookie is to identify you when you <span class=GramE>visit <span
style='mso-spacerun:yes'> </span>123gohelmets.Com</span> or <span
class=SpellE>it's</span> Affiliates so that we can enhance and customize your
online shopping experience. Acceptance of cookies is not a requirement to browse
our website, however without these identifier files you will not be able to
complete a purchase or take advantage of certain features and services of the
site. These features include storing your shopping cart for later use and
providing a more personalized shopping experience. Each browser is different,
so check your browser's "Help" menu to learn how to change your
cookie preferences. We also collect certain technical information from your
computer each time you request a page during a visit to 123gohelmets.Com or <span
class=SpellE><span class=GramE>it's</span></span> Affiliates. This information
may include your Internet Protocol (IP) address, your computer's operating
system, browser type and the address of a referring website, if any. We collect
this information to enhance the quality of your experience during your visit to
the Site and will not sell or rent this information to any third parties. We
also contract with third parties to provide us with: data collection and
reporting services regarding our customers' activities on 123gohelmets.Com or <span
class=SpellE><span class=GramE>it's</span></span> Affiliates; tracking and
measuring performance of our marketing efforts and your response to our
marketing efforts; and the delivery of relevant marketing messages. These third
parties may use cookies and Web beacons (1 x 1 pixels), and may receive anonymous
information about your browsing and buying activity on the Site. None of your
personally identifiable information (such as your name, address, email address,
credit card number, etc.) will be received by or shared with these third
parties. If you do not want your non-personal information used to serve ads to
you, you can change the settings of your browser to reject cookies. Each
browser is different, so check your browser's "Help" menu to learn
how to change your cookie preferences. </span></p>
<h3><span lang=EN-US style='font-size:12.0pt'>How to Contact Us<o:p></o:p></span></h3>
<p><span lang=EN-US>Should you have other questions or concerns about these
security and privacy policies, please contact us in any of the following ways: <br>
<br>
Online: Contact Us<br>
<br>
By Phone: 626-236-0432<br>
<br>
By Mail: 123gohelmets.com<br>
Postal Address: <st1:address w:st="on"><st1:Street w:st="on"><span class=GramE>12123<span
style='mso-spacerun:yes'> </span><span class=SpellE>Barringer</span></span>
St</st1:Street><br>
<st1:City w:st="on">South El Monte</st1:City></st1:address>, Ca 91733</span></p>
<p><b style='mso-bidi-font-weight:normal'><span lang=EN-US>Policy Changes<o:p></o:p></span></b></p>
<p><span lang=EN-US>123gohelmets.com reserves the right to change, modify, add
or remove portions of this Privacy Policy by law at any time and without prior
notice to reflect company and customer feedback. If our policies change at some
point of time, we will post the revised version of this Privacy Policy on the
website. From time to time, we may use the information you provide to us for in
ways not mentioned above in this Privacy Policy, you should check this page for
more information on how we use the data we collect. </span></p>
<p><strong><span lang=EN-US>Effective Date:</span></strong><span lang=EN-US>
This policy was last updated on <strong>10/12/11</strong></span></p>
<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US><o:p> </o:p></span></b></p>
<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US>Terms
of Use<o:p></o:p></span></b></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>The rules that apply to your use of our
website are set forth in on this webpage. We reserve the right to change the
rules from time to time. Your ongoing use of the website means that you agree
to the rules as changed.</span></p>
<p><span lang=EN-US><o:p> </o:p></span></p>
<p><span lang=EN-US>We always enjoy hearing from you and appreciate your
business.</span></p>
</div>
</td>
</tr>
</table>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftPrivacy.html | HTML | asf20 | 16,898 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftOrderView.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/ordersView.html | HTML | asf20 | 832 |
<div class="left_content">
<div class="title"><span class="title_icon"><img src="{$HOME_URL}/images/bullet1.gif" alt="" title="" /></span>Order List</div>
<div class="address_list_box">
<div class="address_form">
<div class="form_subtitle">My Order List</div>
<table border="0" width="100%">
{foreach item=data from=$arrDataList}
<tr height="20">
<td width="30">
<img src="{$HOME_URL}/images/left_menu_bullet.gif" />
</td>
<td>
<b>Order Number:</b>
</td>
<td>
{$data.id}
</td>
</tr>
<tr height="20">
<td>
</td>
<td>
<b>Order Status:</b>
</td>
<td>
{$data.status}
</td>
</tr>
<tr height="20">
<td>
</td>
<td>
<b>Order Date:</b>
</td>
<td>
{$data.createdTime|date_format:"%A %d %B, %Y"}
</td>
</tr>
<tr height="20">
<td>
</td>
<td>
<b>Shipped To:</b>
</td>
<td>
{$data.delivery_name}
</td>
</tr>
<tr height="20">
<td>
</td>
<td>
<b>Products:</b>
</td>
<td>
{$data.total}
</td>
</tr>
<tr height="20">
<td>
</td>
<td>
<b>Order Cost:</b>
</td>
<td>
${$data.amount / 100}
</td>
</tr>
<tr height="20">
<td>
</td>
<td>
<b>Products:</b>
</td>
<td>
{$data.total}
</td>
</tr>
<tr height="20">
<td>
</td>
<td>
<b>Order Cost:</b>
</td>
<td>
${$data.amount / 100}
</td>
</tr>
<tr height="20">
<td colspan="3" align="right">
<a href="ordersView.php?ordersid={$data.id}" class="nprice-g-c">View</a>
</td>
</tr>
{/foreach}
</table>
<div class="pagination">
{if $page > 1}
<a href="ordersList.php?page={$prePage}"><<</a>
{else}
<span class="disabled"><<</span>
{/if}
{foreach item=data from=$pageList}
{if $page == $data}
<span class="current">{$data}</span>
{else}
<a href="ordersList.php?page={$data}">{$data}</a>
{/if}
{/foreach}
{if $page < $pageCount}
<a href="ordersList.php?page={$nextPage}">>></a>
{else}
<span class="disabled">>></span>
{/if}
</div>
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftOrderList.html | HTML | asf20 | 2,728 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<title>Shopping Cart</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftViewCart.html"}
<!--end of left content-->
{include file="rightViewCart.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/viewCart.html | HTML | asf20 | 695 |
<div class="left_content">
<div class="title">
<span class="title_icon"><img src="{$HOME_URL}/images/service_icon_large.gif" alt="" title="" /></span>Payment & Shipping
</div>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><img src="{$HOME_URL}/images/pixel_trans.gif" border="0" alt="" width="100%" height="30"></td>
</tr>
<tr>
<td>
<span>
<span style="font-family:Tahoma"><strong>Payment Information</strong><br>
<p>To make purchasing from 123gohelmets,com as easy as possible we offer a wide range of payment options.</p>
<h3>Credit or Debit card payments</h3>
<p>We accept payments via most major credit / debit
cards via our secure online ordering system on our website or over the
telephone by calling 626-236-0432. <br></p>
<h3>Paypal</h3>
<p>
We accept PayPal payments.</p>
<h3>Google Checkout</h3>
<p>We now accept payments through the Google Checkout gateway. <br></p><br><strong><font color="red">Note:</font></strong>Payment by Money Order, Cashier Check or E-check will be held until cleared.<br><br>
Please mail them to the address below:<br><br><a href="http://123gohelmets.com/" target="_blank">123gohelmets.com</a><br>3100 Big Dalton Ave<br>#170-280<br>Baldwin Pk, Ca 91706<br><br><br><strong>Shipping Information</strong><br>
<br><strong>For shipping within United States:</strong><br>
<br>We provide Flat Shipping and Handling Rate: Just US<span> </span><font color="#ff0000"><b>$9.95</b></font><span> </span>within US 48 States<span> </span><br>
<br><strong><span style="text-decoration:underline;color:rgb(255, 0, 0);font-size:12px"> Alaska, Hawaii, Puerto Rico Add Extra $10 Ship Via USPS Parcel Post </span></strong></span></span>
</td>
</tr>
<tr>
<td><img src="{$HOME_URL}/images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
</tr>
</table>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftShippingAndPayment.html | HTML | asf20 | 2,186 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftAbout.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/about.html | HTML | asf20 | 826 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
<script language="javascript"><!--
var form = "";
var submitted = false;
var error = false;
var error_message = "";
function check_input(field_name, field_size, message) {
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var field_value = form.elements[field_name].value;
if (field_value.length < field_size) {
error_message = error_message + "* " + message + "\n";
error = true;
}
}
}
function check_radio(field_name, message) {
var isChecked = false;
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var radio = form.elements[field_name];
for (var i=0; i<radio.length; i++) {
if (radio[i].checked == true) {
isChecked = true;
break;
}
}
if (isChecked == false) {
error_message = error_message + "* " + message + "\n";
error = true;
}
}
}
function check_select(field_name, field_default, message) {
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var field_value = form.elements[field_name].value;
if (field_value == field_default) {
error_message = error_message + "* " + message + "\n";
error = true;
}
}
}
function check_password(field_name_1, field_name_2, field_size, message_1, message_2) {
if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
var password = form.elements[field_name_1].value;
var confirmation = form.elements[field_name_2].value;
if (password.length < field_size) {
error_message = error_message + "* " + message_1 + "\n";
error = true;
} else if (password != confirmation) {
error_message = error_message + "* " + message_2 + "\n";
error = true;
}
}
}
function check_password_new(field_name_1, field_name_2, field_name_3, field_size, message_1, message_2, message_3) {
if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
var password_current = form.elements[field_name_1].value;
var password_new = form.elements[field_name_2].value;
var password_confirmation = form.elements[field_name_3].value;
if (password_current.length < field_size) {
error_message = error_message + "* " + message_1 + "\n";
error = true;
} else if (password_new.length < field_size) {
error_message = error_message + "* " + message_2 + "\n";
error = true;
} else if (password_new != password_confirmation) {
error_message = error_message + "* " + message_3 + "\n";
error = true;
}
}
}
function check_form(form_name) {
if (submitted == true) {
alert("This form has already been submitted. Please press Ok and wait for this process to be completed.");
return false;
}
error = false;
form = form_name;
error_message = "Errors have occured during the process of your form.\n\nPlease make the following corrections:\n\n";
check_input("firstname", 2, "Your First Name must contain a minimum of 2 characters.");
check_input("lastname", 2, "Your Last Name must contain a minimum of 2 characters.");
check_input("email_address", 6, "Your E-Mail Address must contain a minimum of 6 characters.");
check_input("street_address", 5, "Your Street Address must contain a minimum of 5 characters.");
check_input("postcode", 4, "Your Post Code must contain a minimum of 4 characters.");
check_input("city", 3, "Your City must contain a minimum of 3 characters.");
check_input("state", 2, "Your State must contain a minimum of 2 characters.");
check_select("country", "", "You must select a country from the Countries pull down menu.");
check_input("telephone", 3, "Your Telephone Number must contain a minimum of 3 characters.");
check_password("password", "confirmation", 5, "Your Password must contain a minimum of 5 characters.", "The Password Confirmation must match your Password.");
check_password_new("password_current", "password_new", "password_confirmation", 5, "Your Password must contain a minimum of 5 characters.", "Your new Password must contain a minimum of 5 characters.", "The Password Confirmation must match your new Password.");
if (error == true) {
alert(error_message);
return false;
} else {
submitted = true;
return true;
}
}
//--></script>
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftRegister.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/register.html | HTML | asf20 | 5,394 |
<div class="left_content">
{if $promoProducts|@count > 0}
<div class="title">
<span class="title_icon"><img src="{$HOME_URL}/images/service_icon_large.gif" alt="" title="" /></span>Promotion products
</div>
<div class="new_products">
{section name=info loop=$promoProducts}
<div class="new_prod_box">
<div class="new_prod_bg">
<span class="new_icon"><img src="{$HOME_URL}/images/promo_text_icon.gif" alt="{$promoProducts[info].name}" title="{$promoProducts[info].name}" /> </span>
<a href="{$HOME_URL}/p/{$promoProducts[info].id}/{$objStrings->getCharNum({$promoProducts[info].name})}.html">
<img src="{$HOME_URL}/admin/pic/thumbnail.php?width=90&height=90&fileName={$promoProducts[info].imageid}.{$promoProducts[info].imageExt}" alt="{$promoProducts[info].name}" title="{$promoProducts[info].name}" class="thumb" border="0" />
</a>
</div>
<div class="product-title-grid">
<a href="{$HOME_URL}/p/{$promoProducts[info].id}/{$objStrings->getCharNum({$promoProducts[info].name})}.html" class="product-title">{$promoProducts[info].name}</a>
<br>
<span class="nprice-g">${$promoProducts[info].price / 100}</span>
</div>
</div>
{/section}
</div>
{/if}
<div class="title_home">
<span class="title_icon"><img src="{$HOME_URL}/images/service_icon_large.gif" alt="" title="" /></span>Featured products
</div>
<div class="new_products">
{section name=info loop=$featured}
<div class="new_prod_box">
<div class="new_prod_bg">
<a href="{$HOME_URL}/p/{$featured[info].id}/{$objStrings->getCharNum({$featured[info].name})}.html">
<img src="{$HOME_URL}/admin/pic/thumbnail.php?width=90&height=90&fileName={$featured[info].imageid}.{$featured[info].imageExt}" alt="{$featured[info].name}" title="{$featured[info].name}" class="thumb" border="0" />
</a>
</div>
<div class="product-title-grid">
<a href="{$HOME_URL}/p/{$featured[info].id}/{$objStrings->getCharNum({$featured[info].name})}.html" class="product-title">{$featured[info].name}</a>
<br>
{if $featured[info].finalPrice > 0}
<span class="nprice-g">${$featured[info].finalPrice / 100}</span>
<span class="oprice-g">${$featured[info].price / 100}</span>
{else}
<span class="nprice-g">${$featured[info].price / 100}</span>
{/if}
</div>
</div>
{/section}
</div>
<div class="title_home">
<span class="title_icon"><img src="{$HOME_URL}/images/service_icon_large.gif" alt="" title="" /> </span>New products
</div>
<div class="new_products">
{section name=info loop=$products}
<div class="new_prod_box">
<div class="new_prod_bg">
<span class="new_icon"><img src="{$HOME_URL}/images/new_icon.gif" alt="{$products[info].name}" title="{$products[info].name}" /> </span>
<a href="{$HOME_URL}/p/{$products[info].id}/{$objStrings->getCharNum({$products[info].name})}.html">
<img src="{$HOME_URL}/admin/pic/thumbnail.php?width=90&height=90&fileName={$products[info].imageid}.{$products[info].imageExt}" alt="{$products[info].name}" title="{$products[info].name}" class="thumb" border="0" />
</a>
</div>
<div class="product-title-grid">
<a href="{$HOME_URL}/p/{$products[info].id}/{$objStrings->getCharNum({$products[info].name})}.html" class="product-title">{$products[info].name}</a>
<br>
{if $products[info].finalPrice > 0}
<span class="nprice-g">${$products[info].finalPrice / 100}</span>
<span class="oprice-g">${$products[info].price / 100}</span>
{else}
<span class="nprice-g">${$products[info].price / 100}</span>
{/if}
</div>
</div>
{/section}
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftHome.html | HTML | asf20 | 3,804 |
<div class="left_content">
{if $categoryName != ''}
<div class="crumb_nav"> <a href="{$HOME_URL}">home</a> >> {$categoryName} </div>
{/if}
<div class="title">
<span class="title_icon"><img src="{$HOME_URL}/images/service_icon_large.gif" alt="" title="" /> </span>Product Lists
</div>
<div class="new_products">
{section name=info loop=$products}
<div class="new_prod_box">
<a href="{$HOME_URL}/p/{$products[info].id}/{$objStrings->getCharNum({$products[info].name})}.html">{$products[info].name|truncate:22:"..."}</a>
<div class="new_prod_bg">
{if $products[info].finalPrice > 0}
<span class="new_icon"><img src="{$HOME_URL}/images/promo_icon.gif" alt="{$products[info].name}" title="{$products[info].name}" /> </span>
{else}
<span class="new_icon"><img src="{$HOME_URL}/images/new_icon.gif" alt="{$products[info].name}" title="{$products[info].name}" /> </span>
{/if}
<a href="{$HOME_URL}/p/{$products[info].id}/{$objStrings->getCharNum({$products[info].name})}.html">
<img src="{$HOME_URL}/admin/pic/thumbnail.php?width=90&height=90&fileName={$products[info].imageid}.{$products[info].imageExt}" alt="{$products[info].name}" title="{$products[info].name}" class="thumb" border="0" />
</a>
</div>
</div>
{/section}
</div>
<div class="pagination">
{if $page > 1}
<a href="{$HOME_URL}/searches.php?keyword={$keywordEncode}&page={$prePage}"><<</a>
{else}
<span class="disabled"><<</span>
{/if}
{foreach item=data from=$pageList}
{if $page == $data}
<span class="current">{$data}</span>
{else}
<a href="{$HOME_URL}/searches.php?keyword={$keywordEncode}&page={$data}">{$data}</a>
{/if}
{/foreach}
{if $page < $pageCount}
<a href="{$HOME_URL}/searches.php?keyword={$keywordEncode}&page={$nextPage}">>></a>
{else}
<span class="disabled">>></span>
{/if}
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftSearches.html | HTML | asf20 | 1,990 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<title>{$product.name} - </title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
<link rel="stylesheet" href="{$HOME_URL}/css/lightbox.css" type="text/css" media="screen" />
<link href="{$HOME_URL}/css/stars.css" rel="stylesheet" type="text/css" />
<script src="{$HOME_URL}/js/prototype.js" type="text/javascript"></script>
<script src="{$HOME_URL}/js/scriptaculous.js?load=effects" type="text/javascript"></script>
<script src="{$HOME_URL}/js/lightbox.js" type="text/javascript"></script>
<script type="text/javascript" src="{$HOME_URL}/js/java.js"></script>
<SCRIPT LANGUAGE = "JavaScript1.1" type=text/javascript>
function checkAttribute(item_name)
{
var objs = document.getElementsByName(item_name);
if(objs.length <= 0)
return true;
for(var i = 0; i < objs.length; i++){
if(objs[i].value == 0){
alert("To buy, " + objs[i].options[objs[i].selectedIndex].text);
return false;
}
}
return true;
}
</SCRIPT>
<script type="text/javascript" src="{$HOME_URL}/js/highslide/highslide-with-gallery.js"></script>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/js/highslide/highslide.css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/js/highslide/highslide-ie6.css" />
<![endif]-->
<!--
2) Optionally override the settings defined at the top
of the highslide.js file. The parameter hs.graphicsDir is important!
-->
<script type="text/javascript">
hs.graphicsDir = '{$HOME_URL}/js/highslide/graphics/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.fadeInOut = true;
hs.outlineType = 'rounded-white';
hs.headingEval = 'this.a.title';
hs.numberPosition = 'heading';
hs.useBox = true;
hs.width = 500;
hs.height = 400;
hs.showCredits = false;
//hs.dimmingOpacity = 0.8;
// Add the slideshow providing the controlbar and the thumbstrip
hs.addSlideshow({
//slideshowGroup: 'group1',
interval: 5000,
repeat: false,
useControls: true,
fixedControls: 'fit',
overlayOptions: {
position: 'top right',
offsetX: 200,
offsetY: -65
},
thumbstrip: {
position: 'rightpanel',
mode: 'float',
relativeTo: 'expander',
width: '210px'
}
});
// Make all images animate to the one visible thumbnail
var miniGalleryOptions1 = {
thumbnailId: 'thumb1'
}
</script>
<style type="text/css">
.light_box{
position:absolute;
height:340px;
width:260px;
margin:-250px 0px 0px -250px;
top: 50%;
left: 50%;
text-align: left;
background-color: #FFF;
border: 1px solid #000000;
display:none;
z-index:100;
overflow:hidden;
padding:10px;
}
.light_box_bg{
z-index:1;
background:#000000;
display:none;
position:absolute;
width:100%;
height:100%;
_height:2000px;
filter:alpha(opacity=70);
-moz-opacity:0.6;
opacity:0.6;
}
</style>
<script language="javascript">
//var $=document.getElementById;
function showlightbox(ShowUrl)
{
document.getElementById('l_box').style.display='block';
document.getElementById('l_box_bg').style.display='block';
if(ShowUrl!='')
{
document.getElementById('lb_cont').src=ShowUrl;
}
}
function closelightbox()
{
document.getElementById('l_box').style.display='none';
document.getElementById('l_box_bg').style.display='none';
document.getElementById('lb_cont').src='about:blank';
}
</script>
</head>
<body onunload="closelightbox()">
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftProductDetails.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
<script type="text/javascript">
var tabber1 = new Yetii({
id: 'demo'
});
</script>
<!--lightbox-->
<div class="light_box_bg" id="l_box_bg"></div>
<div class="light_box" id="l_box">
<a href="javascript:void(0)" onclick="closelightbox()"><span class="review_close">Close</span></a>
<iframe id="lb_cont" width="100%" frameborder="0" scrolling="no" src="about:blank" height="100%" ></iframe>
</div>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/productDetails.html | HTML | asf20 | 4,476 |
<div class="left_content">
<div class="title"><span class="title_icon"><img src="{$HOME_URL}/images/bullet1.gif" alt="" title="" /></span>Address Book</div>
<div class="address_list_box">
<div class="address_form">
<div class="form_subtitle">Edit address</div>
<div class="form_row">
<strong class="red">{$error_message}</strong>
</div>
<form name="addAddress" action="" method="post" onSubmit="return check_form(addAddress);">
<div class="form_row">
<label class="contact"><strong>First Name:</strong></label>
<input type="text" name="firstname" value="{$firstname}" class="contact_input" maxlength="32" /> <span class="red">*</span>
</div>
<div class="form_row">
<label class="contact"><strong>Last Name:</strong></label>
<input type="text" name="lastname" value="{$lastname}" class="contact_input" maxlength="32" /> <span class="red">*</span>
</div>
<div class="form_row">
<label class="contact"><strong>Street:</strong></label>
<input type="text" name="street" value="{$street}" class="contact_input" maxlength="64" /> <span class="red">*</span>
</div>
<div class="form_row">
<label class="contact"><strong>Zip Code:</strong></label>
<input type="text" name="postcode" value="{$postcode}" class="contact_input" maxlength="9" /> <span class="red">*</span>
</div>
<div class="form_row">
<label class="contact"><strong>City:</strong></label>
<input type="text" name="city" value="{$city}" class="contact_input" maxlength="32" /> <span class="red">*</span>
</div>
<div class="form_row">
<label class="contact"><strong>State/Province:</strong></label>
{if $hasZone == 'yes'}
<select name=zoneid style="height:22px; margin-top:0px;">
{html_options options=$arrZones selected=$zoneid}
</select> <span class="red">*</span>
{else}
<input type="text" name="state" value="{$state}" maxlength="32"> <span class="red">*</span>
{/if}
</div>
<div class="form_row">
<label class="contact"><strong>Country:</strong></label>
<select name="countryId" style="height:22px; margin-top:0px;" onChange="return submit();">
{html_options options=$arrCountries selected=$countryId}
</select>
</div>
<div class="form_row">
<input type="hidden" name="action" value="init">
<input type="hidden" name="addressid" value="{$addressid}">
<a href="{$HOME_URL}/addressBookList.php" class="continue">< Back</a>
<a href="javascript:addAddress.elements['action'].value='Submit'; addAddress.submit()" class="checkout" onclick="return check_form(addAddress);">Submit ></a>
</div>
</form>
</div>
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftAddressBookEdit.html | HTML | asf20 | 3,172 |
<div class="right_content">
<div class="cart">
<div class="title">
<span class="title_icon"><img src="{$HOME_URL}/images/cart.gif" alt="" title="" /> </span>My cart
</div>
<div class="home_cart_content">
{$objCart->getProductCount()} x items | <span class="nprice-g-c">TOTAL: ${$objCart->getAmount() / 100}</span>
</div>
<div class="currency"> <a href="javascript:void(0);">GBP</a> <a href="javascript:void(0);">EUR</a> <a href="javascript:void(0);" class="selected">USD</a> </div>
<!-- <a href="{$HOME_URL}/viewCart.php" class="view_cart">View Shopping Cart</a> -->
</div>
<div class="title">
<span class="title_icon"><img src="{$HOME_URL}/images/btn2.jpg" alt="About Our Shop" title="About Our Shop" /> </span>About Our Shop
</div>
<div class="about">
<p>
<img src="{$HOME_URL}/images/about.jpg" alt="" title="" class="right" />
Welcome to 123gohelmets.com. We offer a wide range of high quality motorcycle and atv helmets.
We keep our prices competitive and reasonable with the highest quality you deserve from us.
</p>
</div>
<div class="right_box">
<div class="title">
<span class="title_icon"><img src="{$HOME_URL}/images/btn1.jpg" alt="" title="" /> </span>Promotions
</div>
{section name=info loop=$specProducts}
<div class="new_prod_box">
<div class="new_prod_bg">
<span class="new_icon"><img src="{$HOME_URL}/images/special_icon.gif" alt="{$specProducts[info].name}" title="{$specProducts[info].name}" /> </span>
<a href="{$HOME_URL}/p/{$specProducts[info].id}/{$objStrings->getCharNum({$specProducts[info].name})}.html">
<img src="{$HOME_URL}/admin/pic/thumbnail.php?width=90&height=90&fileName={$specProducts[info].imageid}.{$specProducts[info].imageExt}" alt="{$specProducts[info].name}" title="{$specProducts[info].name}" class="thumb" border="0" />
</a>
</div>
<div class="product-title-grid">
<a href="{$HOME_URL}/p/{$specProducts[info].id}/{$objStrings->getCharNum({$specProducts[info].name})}.html" class="product-title">{$specProducts[info].name}</a>
<br>
{if $specProducts[info].finalPrice > 0}
<span class="nprice-g">${$specProducts[info].finalPrice / 100}</span>
<span class="oprice-g">${$specProducts[info].price / 100}</span>
{else}
<span class="nprice-g">${$specProducts[info].price / 100}</span>
{/if}
</div>
</div>
{/section}
</div>
<div class="right_box_right">
<div class="title">
<span class="title_icon"><img src="{$HOME_URL}/images/service_icon_large.gif" alt="Categories" title="Categories" /> </span>Categories
</div>
<ul class="list">
{foreach item=data key=key from=$topCategory}
<span class="category-title">{$data}</span>
{foreach item=leaf key=subid from=$categorys[$key]}
<li><a href="{$HOME_URL}/c/{$subid}/1/{$objStrings->getCharNum({$leaf})}.html">{$leaf|truncate:100:"..."}</a>
</li>
{/foreach}
{/foreach}
</ul>
</div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/rightHome.html | HTML | asf20 | 3,008 |
<div class="left_content">
<div class="title">
<span class="title_icon"><img src="{$HOME_URL}/images/service_icon_large.gif" alt="" title="" /></span>Contact us
</div>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td class="main">
<br>
<font style="font-size: 12px;"><strong>Contact Us By Phone:</strong><br><br>
If you have questions and would like to speak to a customer service representative just give us a call at 626-905-4201 Monday -
Friday from 8:30 a.m. - 5:30 p.m. Pacific Time .
<br><br>
If you have questions about your order or shipment, please have your order number and/or tracking number handy for quicker service.
<br><br>
<strong>Contact Us Online:</strong><br><br>
<a href="mailto:123gohelmets@mail.com"><font color="#0000FF">
123gohelmets@mail.com</font></a>
</font><br><br><br>
</td>
</tr>
<!-- </table></td>
</tr> -->
<tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftContact.html | HTML | asf20 | 1,353 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
<script language="javascript"><!--
var form = "";
var submitted = false;
var error = false;
var error_message = "";
function check_input(field_name, field_size, message) {
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var field_value = form.elements[field_name].value;
if (field_value.length < field_size) {
error_message = error_message + "* " + message + "\n";
error = true;
}
}
}
function check_radio(field_name, message) {
var isChecked = false;
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var radio = form.elements[field_name];
for (var i=0; i<radio.length; i++) {
if (radio[i].checked == true) {
isChecked = true;
break;
}
}
if (isChecked == false) {
error_message = error_message + "* " + message + "\n";
error = true;
}
}
}
function check_select(field_name, field_default, message) {
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var field_value = form.elements[field_name].value;
if (field_value == field_default) {
error_message = error_message + "* " + message + "\n";
error = true;
}
}
}
function check_password(field_name_1, field_name_2, field_size, message_1, message_2) {
if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
var password = form.elements[field_name_1].value;
var confirmation = form.elements[field_name_2].value;
if (password.length < field_size) {
error_message = error_message + "* " + message_1 + "\n";
error = true;
} else if (password != confirmation) {
error_message = error_message + "* " + message_2 + "\n";
error = true;
}
}
}
function check_password_new(field_name_1, field_name_2, field_name_3, field_size, message_1, message_2, message_3) {
if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
var password_current = form.elements[field_name_1].value;
var password_new = form.elements[field_name_2].value;
var password_confirmation = form.elements[field_name_3].value;
if (password_current.length < field_size) {
error_message = error_message + "* " + message_1 + "\n";
error = true;
} else if (password_new.length < field_size) {
error_message = error_message + "* " + message_2 + "\n";
error = true;
} else if (password_new != password_confirmation) {
error_message = error_message + "* " + message_3 + "\n";
error = true;
}
}
}
function check_form(form_name) {
if (submitted == true) {
alert("This form has already been submitted. Please press Ok and wait for this process to be completed.");
return false;
}
error = false;
form = form_name;
error_message = "Errors have occured during the process of your form.\n\nPlease make the following corrections:\n\n";
check_input("firstname", 2, "Your First Name must contain a minimum of 2 characters.");
check_input("lastname", 2, "Your Last Name must contain a minimum of 2 characters.");
check_input("email_address", 6, "Your E-Mail Address must contain a minimum of 6 characters.");
check_input("street_address", 5, "Your Street Address must contain a minimum of 5 characters.");
check_input("postcode", 4, "Your Post Code must contain a minimum of 4 characters.");
check_input("city", 3, "Your City must contain a minimum of 3 characters.");
check_input("state", 2, "Your State must contain a minimum of 2 characters.");
check_select("country", "", "You must select a country from the Countries pull down menu.");
check_input("telephone", 3, "Your Telephone Number must contain a minimum of 3 characters.");
check_password("password", "confirmation", 5, "Your Password must contain a minimum of 5 characters.", "The Password Confirmation must match your Password.");
check_password_new("password_current", "password_new", "password_confirmation", 5, "Your Password must contain a minimum of 5 characters.", "Your new Password must contain a minimum of 5 characters.", "The Password Confirmation must match your new Password.");
if (error == true) {
alert(error_message);
return false;
} else {
submitted = true;
return true;
}
}
//--></script>
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftChangePassword.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/changePassword.html | HTML | asf20 | 5,400 |
<div class="left_content">
<div class="crumb_nav"> <a href="{$HOME_URL}">home</a> >> Order by Best Seller</div>
<div class="title">
<span class="title_icon"><img src="{$HOME_URL}/images/btn.jpg" alt="" title="" /> </span>Best Sellers
</div>
<div class="new_products">
{section name=info loop=$products}
<div class="new_prod_box">
<div class="new_prod_bg">
{if $products[info].finalPrice > 0}
<span class="new_icon"><img src="{$HOME_URL}/images/special_icon.gif" alt="{$products[info].name}" title="{$products[info].name}" /> </span>
{else if $products[info].status == "new"}
<span class="new_icon"><img src="{$HOME_URL}/images/new_icon.gif" alt="{$products[info].name}" title="{$products[info].name}" /> </span>
{/if}
<a href="{$HOME_URL}/p/{$products[info].id}/{$objStrings->getCharNum({$products[info].name})}.html">
<img src="{$HOME_URL}/admin/pic/thumbnail.php?width=100&height=100&fileName={$products[info].imageid}.{$products[info].imageExt}" alt="{$products[info].name}" title="{$products[info].name}" class="thumb" border="0" />
</a>
</div>
<div class="product-title-grid">
<a href="{$HOME_URL}/p/{$products[info].id}/{$objStrings->getCharNum({$products[info].name})}.html" class="product-title">{$products[info].name}</a>
<br>
{if $products[info].finalPrice > 0}
<span class="nprice-g">${$products[info].finalPrice / 100}</span>
<span class="oprice-g">${$products[info].price / 100}</span>
{else}
<span class="nprice-g">${$products[info].price / 100}</span>
{/if}
</div>
</div>
{/section}
</div>
<div class="pagination">
{if $page > 1}
<a href="{$HOME_URL}/b/0/{$prePage}/bestSellers.html"><<</a>
{else}
<span class="disabled"><<</span>
{/if}
{foreach item=data from=$pageList}
{if $page == $data}
<span class="current">{$data}</span>
{else}
<a href="{$HOME_URL}/b/0/{$data}/bestSellers.html">{$data}</a>
{/if}
{/foreach}
{if $page < $pageCount}
<a href="{$HOME_URL}/b/0/{$nextPage}/bestSellers.html">>></a>
{else}
<span class="disabled">>></span>
{/if}
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftBestSellers.html | HTML | asf20 | 2,258 |
<div class="footer">
<div class="left_footer">
<script type="text/javascript">
document.write('<scr');
document.write('ipt type="text/javascript" data-ppmnid="97707715816796" src="//ad.where.com/jin/spotlight/ads?pubid=0c24d0df24&format=js&v=2.4&placementtype=468x60&ppmnid=97707715816796&rand=' + Math.round(Math.random() * 100000000000000) + '">');
document.write('</scr' + 'ipt>');
</script>
</div>
<div class="right_footer">
<a href="{$HOME_URL_HTTP}">home</a>
<a href="{$HOME_URL_HTTP}/shippingAndPayment.html">Shipping and Payment</a>
<a href="{$HOME_URL_HTTP}/warranty.html"> Warranty and Return</a>
<a href="{$HOME_URL_HTTP}/privacy.html">privacy policy</a>
</div>
</div>
<div class="footer">
</div> | 123gohelmetsv2 | trunk/templates_en-US/footer.html | HTML | asf20 | 754 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftBestSellers.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/bestSellers.html | HTML | asf20 | 832 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftOrderList.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/ordersList.html | HTML | asf20 | 832 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftAddressBookList.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/addressBookList.html | HTML | asf20 | 838 |
<!-- <div class="right_checkout_content">-->
<div class="right_checkout_box">
<div class="car_title"><span class="title_icon"><img src="images/service_icon_large.gif" alt="" title="" /></span>Quick Checkout Finish</div>
<div class="feat_prod_box_details">
<table border="0" cellspacing="1" cellpadding="2" class="quick_check_out_table">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td><img src="{$HOME_URL}/images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td>
<td colspan="2">
<!-- body_text //-->
<table border="0" width="800" cellspacing="0" cellpadding="2" align="center">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="640" class="pageHeading" align="left"><br>
{$myStore.values|nl2br}
</td>
<td width="160" class="pageHeading" align="left"><!-- <img src="../images/logo_smarter.gif" border="0" alt="{$HOME_URL}" title=" {$HOME_URL} "> --></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td colspan="2"><img src="{$HOME_URL}/images/pixel_black.gif" border="0" alt="" width="100%" height="1"></td>
</tr>
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td> </td>
</tr>
<tr>
<td class="checkout_finish_title" align="left"><b>SHIP TO:</b></td>
</tr>
<tr>
<td class="checkout_finish" align="left">
{$oDeliveryAddress->getFirstName()} {$oDeliveryAddress->getLastName()} <br>{$oDeliveryAddress->getStreet()} <br>{$oDeliveryAddress->getCity()}
, {$oDeliveryAddress->getState()} {$oDeliveryAddress->getZipcode()}<br> {$oDeliveryAddress->getCountry()}
</td>
</tr>
<tr>
<td><img src="../images/pixel_trans.gif" border="0" alt="" width="1" height="5"></td>
</tr>
<tr>
<td class="main"></td>
</tr>
</table></td>
<td valign="top"></td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="../images/pixel_trans.gif" border="0" alt="" width="1" height="10"></td>
</tr>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="checkout_finish_title"><b>Order Number:</b></td>
<td class="checkout_finish">{$ordersid}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="checkout_finish_title"><b>Payment Method:</b></td>
<td class="checkout_finish">
{if $paymentMethod == 'DirectPayment'}
Paid on {$smarty.now|date_format:"%b-%d-%Y"} via Credit Card
{else if $paymentMethod == 'ExpressCheckout'}
Paid on {$smarty.now|date_format:"%b-%d-%Y"} via PayPal
{else if $paymentMethod == 'moneyOrder'}
Money Order
{else}
Thank you, your order has been placed.
{/if}
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="checkout_finish_title"><b>TransactionID:</b></td>
<td class="checkout_finish">
{if $paymentMethod == 'moneyOrder'}
<font color="#FF0000">Your order will not ship until we receive payment.</font>
{else}
{$tran_ID}
{/if}
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="../images/pixel_trans.gif" border="0" alt="" width="1" height="10"></td>
</tr>
<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr bgcolor="#E4E4E4">
<td width="50%" class="checkout_finish_title" height="30">Products</td>
<td width="8%" class="checkout_finish_title">Model</td>
<td width="10%" class="checkout_finish_title">Price</td>
<td width="12%" class="checkout_finish_title">Final Price</td>
<td width="10%" class="checkout_finish_title">Quantity</td>
<td width="10%" align="left" class="checkout_finish_title">Total</td>
</tr>
{foreach key=prodIndex item=objProduct from=$objCart->getProductList()}
<tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#E9EDED';" onMouseOut="this.style.backgroundColor='#FFFFFF'">
<td><strong><font style="font-size:16px">{$objProduct->getQuantity()} X </font></strong>
<font style="font-size:12px">{$objProduct->getName()}<nobr>
{foreach item=objProductAttri from=$objProduct->getAttributeList()}
<br><small><i>- {$objProductAttri->getKey()} : {$objProductAttri->getValue()}
{if $objProductAttri->getPrice() != 0}
($+{$objProductAttri->getPrice() / 100})
{/if}
</i></small>
{/foreach}
</nobr>
</font>
</td>
<td > {$objProduct->getModel}</td>
<td> ${$objProduct->getPrice() / 100}</td>
<td> ${$objProduct->getFinalPrice() / 100}</td>
<td> {$objProduct->getQuantity()}</td>
<td align="left"> ${$objProduct->getFinalPrice() / 100 * $objProduct->getQuantity()}</td>
</tr>
{/foreach}
<tr>
<td align="right" colspan="8">
</td>
</tr>
<tr height="20">
<td colspan="5" align="right" class="checkout_finish_title"><b>Shipping & Handling(Standard Shipping)</b>:</td>
<td align="left"> ${$shippingTotal|string_format: "%.2f"}</td>
</tr>
<tr height="20">
<td colspan="5" align="right" class="checkout_finish_title"><b>Subtotal</b>:</td>
<td align="left"> ${$subTotal|string_format: "%.2f"}</td>
</tr>
<tr height="20">
<td colspan="5" align="right" class="checkout_finish_title"><b>Sales Tax</b>:</td>
<td align="left"> ${$taxTotal|string_format: "%.2f"}</td>
</tr>
<tr height="20">
<td colspan="5" align="right" class="checkout_finish_title"><b>Total</b>:</td>
<td align="left"> ${$allTotal|string_format: "%.2f"}</td>
</tr>
<tr>
<td align="right" colspan="8">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- body_text_eof //-->
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><img src="{$HOME_URL}/images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td>
<td class="main" colspan="3"></td>
<td class="main"><font style="font-size: 13px;">
Thank you, your order has been placed.<br>
</font>
</td>
<td width="10"><img src="{$HOME_URL}/images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td>
</tr>
</table>
</td>
<td><img src="{$HOME_URL}/images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td>
</tr>
</table></td>
</tr>
</table>
</div>
</div>
| 123gohelmetsv2 | trunk/templates_en-US/rightCheckoutFinish.html | HTML | asf20 | 8,020 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="google-site-verification" content="" />
<meta name="description" content="50% off Motorcycle helmets and Motorcycle helmet - Welcome to a great place to buy motorcycle helmets and accessories from 123gohelmets">
<meta name="keywords" content="DOT and Novelty motorcycle helmets,motorcycle helmet,Novelty helmets,German helmets,D.O.T. helmets, half helmets">
<meta http-equiv="Content-Language" content="EN">
<meta name="distribution" content="Global">
<meta name="revisit-after" content="1 days">
<meta name="copyright" content="(C) 2008-2011 123gohelmets.com All Rights Reserved">
<meta name="robots" content="FOLLOW,INDEX">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-21288110-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script> | 123gohelmetsv2 | trunk/templates_en-US/includeMeta.html | HTML | asf20 | 1,219 |
<div class="left_content">
<div class="title"><span class="title_icon"><img src="{$HOME_URL}/images/bullet1.gif" alt="" title="" /></span>Change Password</div>
<div class="feat_prod_box_details">
<div class="contact_form">
<div class="form_subtitle">change your password</div>
<div class="form_row">
<strong class="red">{$error_message}</strong>
</div>
<form name="account_password" action="" method="post">
<div class="form_row">
<label class="contact"><strong>Current Password:</strong></label>
<input type="password" name="password_current" maxlength="12" class="contact_input" />
</div>
<div class="form_row">
<label class="contact"><strong>New Password:</strong></label>
<input type="password" name="password_new" maxlength="12" class="contact_input" />
</div>
<div class="form_row">
<label class="contact"><strong>Password Confirmation:</strong></label>
<input type="password" name="password_confirmation" maxlength="12" class="contact_input" />
</div>
<div class="form_row">
<a href="{$HOME_URL}/myaccount.php" class="continue">< Back</a>
<a href="javascript:account_password.submit()" class="checkout" onclick="return check_form(account_password);">Submit ></a>
</div>
</form>
</div>
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftChangePassword.html | HTML | asf20 | 1,593 |
<div class="right_checkout_content">
<div class="car_title"><span class="title_icon"><img src="images/service_icon_large.gif" alt="" title="" /></span>GUEST CHECKOUT</div>
<div class="right_box_preCheckout">
<form name="fm" action="" method="post">
<table class="email_table">
<tr><td colspan="3"><span class="nprice-g-c">{$error_message}</span></td></tr>
<tr><td colspan="3" class="email_checkout">Enter your email address and proceed to checkout without registering by clicking the button below</td></tr>
<tr>
<td align="right" height="50" width="100">
<strong>E-mail:</strong>
</td>
<td>
<input type="text" name="email" id="email" maxlength="60" class="guest_email" />
</td>
<td align="left">
<input type="submit" class="coupon" value="Next" onclick="return checkEmail();" />
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</form>
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/rightPreCheckout.html | HTML | asf20 | 1,170 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Shopping Cart</title>
<link rel="stylesheet" type="text/css" href="./css/style.css" />
<script language="javascript" src="./admin/js/Validation.js" type="text/JavaScript"></script>
<SCRIPT language=JavaScript>
function displayCreditCard(){
var flag = document.getElementById("credit_card_1");
flag.style.display = "";
flag = document.getElementById("credit_card_2");
flag.style.display = "";
}
function displayPaypal(){
var flag = document.getElementById("paypal");
flag.style.display = "";
}
function hiddeOtherPaymentMethod(){
var flag = document.getElementById("credit_card_1");
flag.style.display = "none";
flag = document.getElementById("credit_card_2");
flag.style.display = "none";
flag = document.getElementById("paypal");
flag.style.display = "none";
}
function checkForm(){
var theform = window.document.fm;
var state = document.getElementById("state");
if (validDefault.isEmpty("firstname"," First Name")){
return false;
}else if (validDefault.isEmpty("lastname"," Last Name")){
return false;
}else if (validDefault.isEmpty("phoneNumber"," Phone Number")){
return false;
}else if (validDefault.isEmpty("street"," Street Address")){
return false;
}else if (validDefault.isEmpty("city"," City")){
return false;
}else if (state != undefined && validDefault.isEmpty("state"," State")){
return false;
}else if (validDefault.isEmpty("zipcode"," Zipcode")){
return false;
}else{
return true;
}
}
function checkedPaymet(radioName){
var obj;
obj=document.getElementsByName(radioName);
if(obj!=null){
var i;
for(i=0;i<obj.length;i++){
if(obj[i].checked){
return true;
}
}
}
return false;
}
function checkSubmit(){
if(checkedPaymet("paymentMethod"))
return true;
else{
alert("Payment method is required.");
return false;
}
}
</SCRIPT>
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
<!--end of left content{include file="leftLogin.html"}-->
{include file="rightCheckout.html"}
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/checkout.html | HTML | asf20 | 2,588 |
<div class="left_content">
<div class="title">
<span class="title_icon"><img src="{$HOME_URL}/images/service_icon_large.gif" alt="" title="" /></span>Warranty & Return
</div>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><img src="{$HOME_URL}/images/pixel_trans.gif" border="0" alt="" width="100%" height="8"></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td class="main">
<div class=WordSection1>
<p class=MsoNormal align=center style='text-align:center'><b style='mso-bidi-font-weight:
normal'><u><span lang=EN-US>Warranty and Return<o:p></o:p></span></u></b></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal align=center style='margin-left:18.0pt;text-align:center'><span
lang=EN-US>We want you to be happy with your purchase from 123gohelmets.com.</span></p>
<p class=MsoNormal align=center style='margin-left:18.0pt;text-align:center'><span
lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal align=center style='margin-left:18.0pt;text-align:center'><span
lang=EN-US style='font-size:14.0pt;color:blue'>All requests for returns or
exchanges must be made within 30 days of Original Receipt.<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:18.0pt'><span lang=EN-US
style='font-size:14.0pt;color:blue'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-left:18.0pt'><span lang=EN-US
style='color:red'>Customers are responsible for all shipping charges incurred
to have product shipped back to our warehouse. Please make sure you keep a
tracking number for your records. <o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:18.0pt'><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US>Returns:<o:p></o:p></span></b></p>
<p class=MsoNormal style='margin-left:18.0pt'><span lang=EN-US><o:p> </o:p></span></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='mso-list:l4 level1 lfo6;tab-stops:list 36.0pt'><span
lang=EN-US style='mso-bidi-font-weight:bold'>You may exchange or return any
product for a full refund, less shipping charges paid to have the order
shipped or returned.</span></li>
</ul>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='mso-list:l4 level1 lfo6;tab-stops:list 36.0pt'><span
lang=EN-US>You must return products in new or unused condition with all
original materials, accessories, dust bags, hand tags, manual, etc. and
packing slip included with the shipment. We asked that you please do not
remove the clear plastic film on the helmets and visors. Otherwise, it
will not be accepted back for return or refund.</span></li>
</ul>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='mso-list:l4 level1 lfo6;tab-stops:list 36.0pt'><span
class=defaulttext><span lang=EN-US>Items purchased as part of a combo or bundle
pack may not be returned individually.<o:p></o:p></span></span></li>
</ul>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='mso-list:l4 level1 lfo6;tab-stops:list 36.0pt'><span
class=defaulttext><span lang=EN-US>We do not refund original shipping cost
paid to have your order shipped to you. This is a service that is paid to
FedEx, UPS or USPS to have your order delivered. <o:p></o:p></span></span></li>
</ul>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='mso-list:l4 level1 lfo6;tab-stops:list 36.0pt'><span
class=defaulttext><span lang=EN-US>Refunds will be processed 7-10 business
days, after we have received your return by our RMA department. We will
inspect it and credit the approved refund amount (less shipping) to the original
payment method used to place the order. Please allow one to two billing
cycles for your credit to appear on your statement.</span></span><strong><span
lang=EN-US style='font-weight:normal'><o:p></o:p></span></strong></li>
</ul>
<p class=MsoNormal><strong><span lang=EN-US style='font-weight:normal;
mso-bidi-font-weight:bold'><o:p> </o:p></span></strong></p>
<p class=MsoNormal><span class=defaulttext><b><span lang=EN-US>Late Returns:</span></b></span><span
lang=EN-US><br style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]></span></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='mso-list:l1 level1 lfo5;tab-stops:list 36.0pt'><span
class=defaulttext><span lang=EN-US>Items received after the 30-day return grace
period will not be processed. Any late return package we received will be
returned to you at your own expense. </span></span><strong><span
lang=EN-US style='font-weight:normal;mso-bidi-font-weight:bold'><o:p></o:p></span></strong></li>
</ul>
<p class=MsoNormal><strong><span lang=EN-US style='font-weight:normal;
mso-bidi-font-weight:bold'><o:p> </o:p></span></strong></p>
<p class=MsoNormal><strong><span lang=EN-US>Exchanges: </span></strong><strong><span
lang=EN-US style='font-weight:normal;mso-bidi-font-weight:bold'><o:p></o:p></span></strong></p>
<p class=MsoNormal><strong><span lang=EN-US><o:p> </o:p></span></strong></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='mso-list:l1 level1 lfo5;tab-stops:list 36.0pt'><span
class=defaulttext><span lang=EN-US>All exchange orders will be processed
within 5-7 business days after we received the original product returned
by our RMA department.<o:p></o:p></span></span></li>
</ul>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='mso-list:l1 level1 lfo5;tab-stops:list 36.0pt'><span
class=defaulttext><span lang=EN-US>If you exchange for an item or size
that is of higher price or lower price, your order will be adjusted
accordingly to what you are exchanging for. <o:p></o:p></span></span></li>
</ul>
<p class=MsoNormal><span class=defaulttext><span lang=EN-US><o:p> </o:p></span></span></p>
<p class=MsoNormal><a name=Damaged><span class=defaulttext><b style='mso-bidi-font-weight:
normal'><span lang=EN-US>Damaged/Defective Merchandise Received</span></b></span></a><span
class=defaulttext><b style='mso-bidi-font-weight:normal'><span lang=EN-US>:<o:p></o:p></span></b></span></p>
<p class=MsoNormal><span class=defaulttext><b style='mso-bidi-font-weight:normal'><span
lang=EN-US><o:p> </o:p></span></b></span></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='mso-list:l6 level1 lfo8;tab-stops:list 36.0pt'><span
lang=EN-US>Please inspect your order as soon as it arrives. If you
received a product that was defective, or was damaged in transit, please
contact us so we can resolve the problem. Damage claims must be made
within 5 days of receipt of product. </span></li>
</ul>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='mso-list:l6 level1 lfo8;tab-stops:list 36.0pt'><span
class=defaulttext><span lang=EN-US>Please call or email us with pictures
of damage product. We will guide you through the return process.<o:p></o:p></span></span></li>
</ul>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-left:18.0pt'><span lang=EN-US><o:p> </o:p></span></p>
</div>
</td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="{$HOME_URL}/images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
</tr>
</table>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftWarranty.html | HTML | asf20 | 7,908 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftPrivacy.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/privacy.html | HTML | asf20 | 828 |
<div class="left_content">
<div class="title">
<span class="title_icon"><img src="{$HOME_URL}/images/service_icon_large.gif" alt="" title="" /></span>Size Chart
</div>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table border="0" width="500" cellspacing="0" cellpadding="0" align="center">
<tr><td class="main"><strong>How to Measure Your Head Size?</strong><br><br>
A small metal tape measure, or a cloth tape may be used to take your measurement. If possible,
have a helper do the measuring in order to get a more accurate measurement.
The circumference of the head should be measured at a point approximately one
inch above the eyebrows, or at whatever point gives the largest possible measurement.
Then send this measurement or your hat size along with your payment for a correct custom fit.
</td></tr>
<tr><td height="5"></td></tr>
<tr>
<td class="main">
<table width="440" cellpadding="0" cellspacing="0" border="1" bordercolor="#F9D4BF">
<tr>
<td width="110" align="center" bgcolor="#F68E56" class="main" height="25"><strong>Size</strong></td>
<td width="110" align="center" bgcolor="#F68E56" class="main" height="25"><strong>Centimeter</strong></td>
<td width="110" align="center" bgcolor="#F68E56" class="main" height="25"><strong>Inches</strong></td>
<td width="110" align="center" bgcolor="#F68E56" class="main" height="25"><strong>Hat Size</strong></td>
</tr>
<tr>
<td width="110" class="main" align="center">XS</td>
<td width="110" class="main" align="center">52 - 53</td>
<td width="110" class="main" align="center">20 1/4" - 20 7/8"</td>
<td width="110" class="main" align="center">6 1/2 - 6 5/8</td>
</tr>
<tr>
<td width="110" class="main" align="center">SM</td>
<td width="110" class="main" align="center">54 - 55</td>
<td width="110" class="main" align="center">21" - 21 5/8"</td>
<td width="110" class="main" align="center">6 3/4 - 6 7/8</td>
</tr>
<tr>
<td width="110" class="main" align="center">MD</td>
<td width="110" class="main" align="center">56 - 57</td>
<td width="110" class="main" align="center">21 3/4"- 22 3/8"</td>
<td width="110" class="main" align="center">7 - 7 1/8</td>
</tr>
<tr>
<td width="110" class="main" align="center">LG</td>
<td width="110" class="main" align="center">58 - 59</td>
<td width="110" class="main" align="center">22 1/2" - 23 1/8"</td>
<td width="110" class="main" align="center">7 1/4 - 7 3/8</td>
</tr>
<tr>
<td width="110" class="main" align="center">XL</td>
<td width="110" class="main" align="center">60 - 61</td>
<td width="110" class="main" align="center">23 1/4" - 24"</td>
<td width="110" class="main" align="center">7 1/2 - 7 3/4</td>
</tr>
<tr>
<td width="110" class="main" align="center">XXL</td>
<td width="110" class="main" align="center">62 - 63</td>
<td width="110" class="main" align="center">24 1/8" - 24 7/8"</td>
<td width="110" class="main" align="center">7 7/8 - 8</td>
</tr>
</table>
</td>
</tr>
<tr><td height="15"></td></tr>
<tr><td class="main"><strong>Youth Helmets Size Chart</strong></td></tr>
<tr><td height="5"></td></tr>
<tr>
<td class="main">
<table width="360" cellpadding="0" cellspacing="0" border="1" bordercolor="#F9D4BF">
<tr>
<td width="120" align="center" bgcolor="#F68E56" class="main" height="25"><strong>Size</strong></td>
<td width="120" align="center" bgcolor="#F68E56" class="main" height="25"><strong>Inches</strong></td>
<td width="120" align="center" bgcolor="#F68E56" class="main" height="25"><strong>Centimeter</strong></td>
</tr>
<tr>
<td width="120" class="main" align="center">Y-SM</td>
<td width="120" class="main" align="center">18 7/8 - 19"</td>
<td width="120" class="main" align="center"> 48-49cm</td>
</tr>
<tr>
<td width="120" class="main" align="center">Y-MD</td>
<td width="120" class="main" align="center"> 19 1/4 - 19 3/4"</td>
<td width="120" class="main" align="center">50-51cm</td>
</tr>
<tr>
<td width="120" class="main" align="center">Y-LG</td>
<td width="120" class="main" align="center"> 20 7/8”</td>
<td width="120" class="main" align="center"> 52-53cm</td>
</tr>
<tr>
<td width="120" class="main" align="center"> Y-XL</td>
<td width="120" class="main" align="center"> 21”</td>
<td width="120" class="main" align="center">53-54cm</td>
</tr>
</table>
</td>
</tr>
<tr><td height="15"></td></tr>
<tr><td><img src="{$HOME_URL}/images/gloves.jpg" width="150" height="170"></td></tr>
<tr><td height="10"></td></tr>
<tr><td class="main"><strong>General Glove Size Chart</strong><br><br>
Using your right hand, place a tape measure under your palm and measure from the knuckle
of your forefinger to the knuckle of your pinkie finger. Note the measurement and
compare it to the chart below</td></tr>
<tr><td height="10"></td></tr>
<tr><td class="main"><strong>Glove Fit Chart</strong></td></tr>
<tr>
<td class="main">
<table width="360" cellpadding="0" cellspacing="0" border="1" bordercolor="#F9D4BF">
<tr>
<td width="120" align="center" bgcolor="#F68E56" class="main" height="25"><strong>Measurement</strong></td>
<td width="120" align="center" bgcolor="#F68E56" class="main" height="25"><strong>Alpha Size</strong></td>
<td width="120" align="center" bgcolor="#F68E56" class="main" height="25"><strong>Numeric Size</strong></td>
</tr>
<tr>
<td width="120" class="main" align="center">2 5/8 - 3 1/8"</td>
<td width="120" class="main" align="center">Small</td>
<td width="120" class="main" align="center">8</td>
</tr>
<tr>
<td width="120" class="main" align="center">3 1/8 - 3 5/8"</td>
<td width="120" class="main" align="center">Medium</td>
<td width="120" class="main" align="center">8 1/2</td>
</tr>
<tr>
<td width="120" class="main" align="center">3 5/8 - 4 1/8"</td>
<td width="120" class="main" align="center">Large</td>
<td width="120" class="main" align="center">9</td>
</tr>
<tr>
<td width="120" class="main" align="center">4 1/8 - 4 5/8"</td>
<td width="120" class="main" align="center">X-Large</td>
<td width="120" class="main" align="center">9 1/2</td>
</tr>
</table>
</table></td>
</tr>
<tr><td height="20"></td></tr>
<tr>
<td class="main">
<font color="#FF0000"><b>Note:</b></font> Sizing information is provided by the manufacturer and does not guarantee a perfect fit.
Please use this chart as a general guide only.</td></tr>
</table>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftSizeChart.html | HTML | asf20 | 7,471 |
<div class="left_content">
<div class="title"><span class="title_icon"><img src="{$HOME_URL}/images/bullet1.gif" alt="" title="" /></span>Change Password</div>
<div class="feat_prod_box_details">
<div class="contact_form">
<div class="form_subtitle">Change account infomation</div>
<div class="form_row">
<strong class="red">{$error_message}</strong>
</div>
<form name="account_edit" action="" method="post">
<div class="form_row">
<label class="contact"><strong>First Name:</strong></label>
<input type="text" name="firstname" value="{$firstname}" maxlength="12" class="contact_input" /> <span class="red">*</span>
</div>
<div class="form_row">
<label class="contact"><strong>Last Name:</strong></label>
<input type="text" name="lastname" value="{$lastname}" maxlength="12" class="contact_input" /> <span class="red">*</span>
</div>
<div class="form_row">
<label class="contact"><strong>Email Address:</strong></label>
<input type="text" name="email" value="{$email}" maxlength="12" class="contact_input" /> <span class="red">*</span>
</div>
<div class="form_row">
<label class="contact"><strong>Telephone:</strong></label>
<input type="text" name="telephone" value="{$telephone}" maxlength="12" class="contact_input" /> <span class="red">*</span>
</div>
<div class="form_row">
<label class="contact"><strong>Fax Number:</strong></label>
<input type="text" name="fax" value="{$fax}" maxlength="12" class="contact_input" />
</div>
<div class="form_row">
<a href="{$HOME_URL}/myaccount.php" class="continue">< back</a>
<a href="javascript:account_edit.submit();" class="checkout" onclick="return check_form(account_edit);">Submit ></a>
</div>
</form>
</div>
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftAccountEdit.html | HTML | asf20 | 2,175 |
<div class="left_content">
<div class="title">
<span class="title_icon"><img src="{$HOME_URL}/images/service_icon_large.gif" alt="" title="" /></span>About 123gohelmets.com
</div>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="10"></td>
<td class="main"><div class=WordSection1>
<p class=MsoNormal><span
lang=EN-US>
<i style='mso-bidi-font-style:normal'>Welcome to America’s Guaranteed <span
style='mso-bidi-font-style:italic'>Low Price Leader <span class=GramE>For
Motorcycle Helmets <span style='font-style:normal'><br>
<br>
123gohelmets.com</span></span></span></i> is located in beautiful and sunny
Southern California. We are an online retailer offering a wide variety of
high-quality, product selection of helmets and accessories at discount prices. We
offer the convenience of on-line shopping 24 hours a day, all at the lowest
possible prices. Our mission is to provide the best shopping experience
possible for you. </span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><strong><span lang=EN-US>Selection<o:p></o:p></span></strong></p>
<p class=MsoNormal><span lang=EN-US>We offer large in-stock selection of
helmets in different models, colors, and sizes. We understand it can be
frustrating to find helmets in the right size fit and color, so we make every
effort to offer each helmet in as many sizes, models, and color as the vendor
can make. Our buyers research the market and hand-pick all products to ensure
we have an excellent selection in a variety of price ranges. If we don't have
what you're looking for, just let us know and we'll do what we can to get it
for you! <br>
<br>
<strong>Low Prices<o:p></o:p></strong></span></p>
<p class=MsoNormal><span lang=EN-US>Through strategic relationships, the
expertise of our buyers, and exceptional promotions, 123gohelmets.com is able
to offer quality helmets at discount prices anywhere. We use our purchasing
power to negotiate special buys and exclusive offers directly from the factory to
save you money everyday. </span></p>
<p class=MsoNormal><span lang=EN-US><br>
<b style='mso-bidi-font-weight:normal'>Service</b></span></p>
<p class=MsoNormal><span lang=EN-US>We know how to appreciate and relate to our
customers on a personal, one-to-one basis. Should you have any questions or
comments about our products, please call or email us and talk to one of our
friendly, knowledgeable Customer Service Representative Staff. <span
style='mso-spacerun:yes'> </span>We guarantee each and every item leaving
our warehouse are carefully inspected and approved upon shipping.</span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US>Contact
Us:<span style='mso-tab-count:1'> </span></span></b><span
lang=EN-US><span style='mso-tab-count:1'> </span></span></p>
<p class=MsoNormal><span lang=EN-US>123gohelmets.com<span style='mso-tab-count:
3'>
</span><span
style='mso-spacerun:yes'>
</span>Phone: 626-905-4201</span></p>
<p class=MsoNormal><span lang=EN-US style='color:black'>123gohelmets@mail.com<span
style='mso-spacerun:yes'>
</span><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='color:black'>Monday-Friday 8am-5:30pm PST<span
style='mso-spacerun:yes'>
</span><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><strong><span lang=EN-US>Accreditation and Privacy:</span></strong><span
lang=EN-US> 123gohelmets.com is secured by <span class=SpellE>Comodo</span> and
is diligent about protecting your privacy and personal information. We are
certified and tested by Scan Alert to meet the highest security scanning
standards of the U.S. government, Visa, MasterCard, American Express, <span
class=GramE>Discover</span>.<br>
<br>
We appreciate your business and thank you for choosing 123gohelmets.com.<br>
<br>
We check back regularly, as we do get new products and models in occasionally. </span></p>
</div>
</td>
</tr>
</table>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftAbout.html | HTML | asf20 | 4,791 |
<!-- <div class="left_content"> -->
<div class="title"><span class="title_icon"><img src="images/service_icon_large.gif" alt="" title="" /></span>My cart</div>
<div class="feat_prod_box_details">
<table class="cart_table">
<tr class="cart_title">
<td>Item pic</td>
<td>Item name</td>
<td>Unit price</td>
<td>Quantity</td>
<td>Total</td>
<td>Action</td>
</tr>
{foreach key=prodIndex item=objProduct from=$objCart->getProductList()}
<form action="" method="post">
<tr>
<td>
<a href="{$HOME_URL}/p/{$objStrings->getCharNum({$objProduct->getName()})}/{$objProduct->getID()}.html">
<img src="{$HOME_URL}/admin/pic/thumbnail.php?width=40&height=40&fileName={$objProduct->getImageFileName()}" border="0" alt="{$objProduct->getName()}" title=" {$objProduct->getName()} class="cart_thumb" />
</a>
</td>
<td align="left">{$objProduct->getName()}
{foreach item=objProductAttri from=$objProduct->getAttributeList()}
<br><small><i>- {$objProductAttri->getKey()} : {$objProductAttri->getValue()}
{if $objProductAttri->getPrice() != 0}
($+{$objProductAttri->getPrice() / 100})
{/if}
</i></small>
{/foreach}
</td>
<td>
<span class="nprice-g-c">${$objProduct->getFinalPrice() / 100|string_format:"%.2f"}</span>
</td>
<td>
<input type="text" name="quantity" value="{$objProduct->getQuantity()}" size="2">
</td>
<td><span class="nprice-g-c">${$objProduct->getFinalPrice() / 100 * $objProduct->getQuantity()|string_format:"%.2f"}</span></td>
<td>
<input name="prodIndex" type="hidden" value="{$prodIndex}">
<input type="submit" name="submit" class="btn" value="Delete" /> <input type="submit" name="submit" class="btn" value="Update" />
</td>
</tr>
</form>
{/foreach}
{if $objCart->getSaveOff() > 0}
<tr>
<td colspan="5" class="cart_total"><span class="nprice-g-c">SAVE OFF:</span></td>
<td align="left"><span class="nprice-g-c"> <span class="nprice-g">-</span> ${$objCart->getSaveOff() / 100|string_format:"%.2f"}</span></td>
</tr>
{/if}
<tr>
<td colspan="5" class="cart_total" align="right"><span class="nprice-g">TOTAL:</span></td>
<td align="left"> <span class="nprice-g">${$objCart->getAmount()/100|string_format:"%.2f"}</span></td>
</tr>
</table>
<a href="{$HOME_URL}" class="continue">< continue</a>
<a href="{$HOME_URL}/preCheckout.php" class="checkout">checkout ></a>
</div>
<div class="clear"></div>
<div class="left_content">
<div class="car_title"><span class="title_icon"><img src="images/service_icon_large.gif" alt="" title="" /></span>Coupon Code</div>
<div class="feat_prod_box_details">
<form name="couponcode" action="" method="post">
<table class="coupon_table">
<tr><td colspan="3"><span class="nprice-g-c">{$error_message}</span></td></tr>
<tr>
<td align="right" height="50" width="120">
<strong>Coupon Code:</strong>
</td>
<td>
<input type="text" name="coupon" maxlength="30" class="view_cart_input" />
</td>
<td align="left">
<input type="submit" class="coupon" value="Apply" />
</td>
</tr>
<tr>
</tr>
</table>
</form>
</div>
<div class="car_title"><span class="title_icon"><img src="images/service_icon_large.gif" alt="" title="" /></span>Calculate Tax</div>
<div class="feat_prod_box_details">
<form name="couponcode" action="" method="post">
<table class="coupon_table" border="0">
<tr><td colspan="3"><span class="nprice-g-c">{$error_tax}</span></td></tr>
<tr>
<td align="right" height="50" width="120">
<strong>Zone:</strong>
</td>
<td>
<select name=zoneid style="height:22px; margin-top:0px;">
{html_options options=$arrZones selected=$zoneid}
</select>
</td>
<td align="left">
<input type="submit" class="coupon" value="Calculate" />
</td>
</tr>
<tr>
</tr>
</table>
</form>
</div>
<div class="clear"></div>
</div>
| 123gohelmetsv2 | trunk/templates_en-US/leftViewCart.html | HTML | asf20 | 4,892 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftSizeChart.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/sizeChart.html | HTML | asf20 | 830 |
<div class="left_content">
{if $categoryName != ''}
<div class="crumb_nav"> <a href="{$HOME_URL}">home</a> >> {$categoryName} </div>
{else}
<div class="crumb_nav"> <a href="{$HOME_URL}">home</a> >> All Categories </div>
{/if}
<div class="title">
<span class="title_icon"><img src="{$HOME_URL}/images/btn.jpg" alt="" title="" /> </span>Product Lists
</div>
<div class="new_products">
{section name=info loop=$products}
<div class="new_prod_box">
<div class="new_prod_bg">
{if $products[info].finalPrice > 0}
<span class="new_icon"><img src="{$HOME_URL}/images/special_icon.gif" alt="{$products[info].name}" title="{$products[info].name}" /> </span>
{else if $products[info].status == "new"}
<span class="new_icon"><img src="{$HOME_URL}/images/new_icon.gif" alt="{$products[info].name}" title="{$products[info].name}" /> </span>
{else if $products[info].promo_descript != ""}
<span class="new_icon"><img src="{$HOME_URL}/images/promo_text_icon.gif" alt="{$promoProducts[info].name}" title="{$promoProducts[info].name}" /> </span>
{/if}
<a href="{$HOME_URL}/p/{$products[info].id}/{$objStrings->getCharNum({$products[info].name})}.html">
<img src="{$HOME_URL}/admin/pic/thumbnail.php?width=100&height=100&fileName={$products[info].imageid}.{$products[info].imageExt}" alt="{$products[info].name}" title="{$products[info].name}" class="thumb" border="0" />
</a>
</div>
<div class="product-title-grid">
<a href="{$HOME_URL}/p/{$products[info].id}/{$objStrings->getCharNum({$products[info].name})}.html" class="product-title">{$products[info].name}</a>
<br>
{if $products[info].finalPrice > 0}
<span class="nprice-g">${$products[info].finalPrice / 100}</span>
<span class="oprice-g">${$products[info].price / 100}</span>
{else}
<span class="nprice-g">${$products[info].price / 100}</span>
{/if}
</div>
</div>
{/section}
</div>
<div class="pagination">
{if $page > 1}
<a href="{$HOME_URL}/c/{$categoryID}/{$prePage}/productList.html"><<</a>
{else}
<span class="disabled"><<</span>
{/if}
{foreach item=data from=$pageList}
{if $page == $data}
<span class="current">{$data}</span>
{else}
<a href="{$HOME_URL}/c/{$categoryID}/{$data}/productList.html">{$data}</a>
{/if}
{/foreach}
{if $page < $pageCount}
<a href="{$HOME_URL}/c/{$categoryID}/{$nextPage}/productList.html">>></a>
{else}
<span class="disabled">>></span>
{/if}
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftProductList.html | HTML | asf20 | 2,639 |
<div class="left_content">
<div class="crumb_nav"> <a href="{$HOME_URL}">home</a> >> Special gifts </div>
<div class="title">
<span class="title_icon"><img src="{$HOME_URL}/images/btn.jpg" alt="" title="" /> </span>Special gifts
</div>
<div class="new_products">
{section name=info loop=$products}
<div class="new_prod_box">
<div class="new_prod_bg">
{if $products[info].finalPrice > 0}
<span class="new_icon"><img src="{$HOME_URL}/images/special_icon.gif" alt="{$products[info].name}" title="{$products[info].name}" /> </span>
{else if $products[info].status == "new"}
<span class="new_icon"><img src="{$HOME_URL}/images/new_icon.gif" alt="{$products[info].name}" title="{$products[info].name}" /> </span>
{/if}
<a href="{$HOME_URL}/p/{$products[info].id}/{$objStrings->getCharNum({$products[info].name})}.html">
<img src="{$HOME_URL}/admin/pic/thumbnail.php?width=100&height=100&fileName={$products[info].imageid}.{$products[info].imageExt}" alt="{$products[info].name}" title="{$products[info].name}" class="thumb" border="0" />
</a>
</div>
<div class="product-title-grid">
<a href="{$HOME_URL}/p/{$products[info].id}/{$objStrings->getCharNum({$products[info].name})}.html" class="product-title">{$products[info].name}</a>
<br>
{if $products[info].finalPrice > 0}
<span class="nprice-g">${$products[info].finalPrice / 100}</span>
<span class="oprice-g">${$products[info].price / 100}</span>
{else}
<span class="nprice-g">${$products[info].price / 100}</span>
{/if}
</div>
</div>
{/section}
</div>
<div class="pagination">
{if $page > 1}
<a href="{$HOME_URL}/a/0/{$prePage}/productList.html"><<</a>
{else}
<span class="disabled"><<</span>
{/if}
{foreach item=data from=$pageList}
{if $page == $data}
<span class="current">{$data}</span>
{else}
<a href="{$HOME_URL}/a/0/{$data}/productList.html">{$data}</a>
{/if}
{/foreach}
{if $page < $pageCount}
<a href="{$HOME_URL}/a/0/{$nextPage}/productList.html">>></a>
{else}
<span class="disabled">>></span>
{/if}
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftSpecials.html | HTML | asf20 | 2,259 |
<div class="left_content">
<div class="title"><span class="title_icon"><img src="{$HOME_URL}/images/bullet1.gif" alt="" title="" /></span>Login</div>
<div class="feat_prod_box_details">
<div class="contact_form">
<div class="form_subtitle">login into your account</div>
<form name="login" action="./login.php" method="post">
<div class="form_row">
<label class="contact"><strong class="red">{$error_message}</strong></label>
</div>
<div class="form_row">
<label class="contact"><strong>E-Mail:</strong></label>
<input type="text" name="email" value="{$email}" class="contact_input" />
</div>
<div class="form_row">
<label class="contact"><strong>Password:</strong></label>
<input type="password" name="password" maxlength="40" class="contact_input" />
</div>
<div class="form_row">
<input type="submit" class="register" value="Login" class="contact_input" />
</div>
<div class="form_row">
<label class="password_forgotten"><a href="./passwordForgotten.php">Password forgotten? Click here.</a></label>
</div>
</form>
</div>
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftLogin.html | HTML | asf20 | 1,413 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<title>Shopping Cart</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
<!--start center content-->
{include file="centerForgotPassword.html"}
<!--end of center content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/passwordForgotten.html | HTML | asf20 | 665 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftWarranty.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/warranty.html | HTML | asf20 | 829 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftSpecials.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/specials.html | HTML | asf20 | 829 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="./css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftLogin.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/login.html | HTML | asf20 | 818 |
<div class="left_content">
<div class="title"><span class="title_icon"><img src="{$HOME_URL}/images/bullet1.gif" alt="" title="" /></span>Register</div>
<div class="feat_prod_box_details">
<p class="details"> <font color="#FF0000">
<small><b>NOTE:</b></font></small> If you already have an account with us, please login at the
<a href={$HOME_URL}/login.php><u>login page</u></a>.
</p>
<div class="contact_form">
<div class="form_subtitle">create new account</div>
<div class="form_row">
<strong class="red">{$error_message}</strong>
</div>
<form name="register" action="" method="post" onSubmit="return check_form(register);">
<div class="form_row">
<label class="contact"><strong>First Name:</strong></label>
<input type="text" name="firstname" value="{$firstname}" class="contact_input" />
</div>
<div class="form_row">
<label class="contact"><strong>Last Name:</strong></label>
<input type="text" name="lastname" value="{$lastname}" class="contact_input" />
</div>
<div class="form_row">
<label class="contact"><strong>E-Mail:</strong></label>
<input type="text" name="email_address" value="{$email_address}" class="contact_input" />
</div>
<div class="form_row">
<label class="contact"><strong>Street:</strong></label>
<input type="text" name="street_address" value="{$street_address}" class="contact_input" />
</div>
<div class="form_row">
<label class="contact"><strong>Zip Code:</strong></label>
<input type="text" name="postcode" value="{$postcode}" class="contact_input" />
</div>
<div class="form_row">
<label class="contact"><strong>City:</strong></label>
<input type="text" name="city" value="{$city}" class="contact_input" />
</div>
<div class="form_row">
<label class="contact"><strong>State/Province:</strong></label>
{if $hasZone == 'yes'}
<select name=zoneid style="height:22px; margin-top:0px;">
{html_options options=$arrZones selected=$zoneid}
</select>
{else}
<input type="text" name="state" value="{$state}">
{/if}
</div>
<div class="form_row">
<label class="contact"><strong>Country:</strong></label>
<select name="country" style="height:22px; margin-top:0px;" onChange="return submit();">
{html_options options=$arrCountries selected=$country}
</select>
</div>
<div class="form_row">
<label class="contact"><strong>Telephone:</strong></label>
<input type="text" name="telephone" value="{$telephone}" class="contact_input" />
</div>
<div class="form_row">
<label class="contact"><strong>Password:</strong></label>
<input type="password" name="password" maxlength="40" class="contact_input" />
</div>
<div class="form_row">
<label class="contact"><strong>Re-enter Password:</strong></label>
<input type="password" name="confirmation" maxlength="40" class="contact_input" />
</div>
<div class="form_row">
<input type="submit" class="register" value="register" class="contact_input" />
</div>
</form>
</div>
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftRegister.html | HTML | asf20 | 3,742 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet - 123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftProductList.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/productList.html | HTML | asf20 | 831 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
<script language="javascript"><!--
var form = "";
var submitted = false;
var error = false;
var error_message = "";
function check_input(field_name, field_size, message) {
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var field_value = form.elements[field_name].value;
if (field_value.length < field_size) {
error_message = error_message + "* " + message + "\n";
error = true;
}
}
}
function check_radio(field_name, message) {
var isChecked = false;
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var radio = form.elements[field_name];
for (var i=0; i<radio.length; i++) {
if (radio[i].checked == true) {
isChecked = true;
break;
}
}
if (isChecked == false) {
error_message = error_message + "* " + message + "\n";
error = true;
}
}
}
function check_select(field_name, field_default, message) {
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var field_value = form.elements[field_name].value;
if (field_value == field_default) {
error_message = error_message + "* " + message + "\n";
error = true;
}
}
}
function check_password(field_name_1, field_name_2, field_size, message_1, message_2) {
if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
var password = form.elements[field_name_1].value;
var confirmation = form.elements[field_name_2].value;
if (password.length < field_size) {
error_message = error_message + "* " + message_1 + "\n";
error = true;
} else if (password != confirmation) {
error_message = error_message + "* " + message_2 + "\n";
error = true;
}
}
}
function check_password_new(field_name_1, field_name_2, field_name_3, field_size, message_1, message_2, message_3) {
if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
var password_current = form.elements[field_name_1].value;
var password_new = form.elements[field_name_2].value;
var password_confirmation = form.elements[field_name_3].value;
if (password_current.length < field_size) {
error_message = error_message + "* " + message_1 + "\n";
error = true;
} else if (password_new.length < field_size) {
error_message = error_message + "* " + message_2 + "\n";
error = true;
} else if (password_new != password_confirmation) {
error_message = error_message + "* " + message_3 + "\n";
error = true;
}
}
}
function check_form(form_name) {
if (submitted == true) {
alert("This form has already been submitted. Please press Ok and wait for this process to be completed.");
return false;
}
error = false;
form = form_name;
error_message = "Errors have occured during the process of your form.\n\nPlease make the following corrections:\n\n";
check_input("firstname", 2, "Your First Name must contain a minimum of 2 characters.");
check_input("lastname", 2, "Your Last Name must contain a minimum of 2 characters.");
check_input("street", 5, "Your Street Address must contain a minimum of 5 characters.");
check_input("postcode", 4, "Your Post Code must contain a minimum of 4 characters.");
check_input("city", 3, "Your City must contain a minimum of 3 characters.");
check_input("state", 2, "Your State must contain a minimum of 2 characters.");
check_select("countryId", "", "You must select a country from the Countries pull down menu.");
if (error == true) {
alert(error_message);
return false;
} else {
submitted = true;
return true;
}
}
//--></script>
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftAddressBookAdd.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/addressBookAdd.html | HTML | asf20 | 4,764 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<title>Shopping Cart</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
<script language="javascript" src="./admin/js/Validation.js" type="text/JavaScript"></script>
<SCRIPT language=JavaScript>
function checkEmail(){
if (!validDefault.isEmailEN("email","Email", "noempty")){
return false;
}else{
return true;
}
}
</script>
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftPreCheckout.html"}
<!--end of left content-->
{include file="rightPreCheckout.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/preCheckout.html | HTML | asf20 | 976 |
<div class="title"><span class="title_icon"><img src="images/service_icon_large.gif" alt="" title="" /></span>I've Forgotten My Password!</div>
<div class="feat_prod_box_details">
<form name="password_forgotten" action="" method="post">
<table class="cart_table" height="100">
<tr>
<td colspan="3">{$error_message} </td>
</tr>
<tr>
<td colspan="3">
If you've forgotten your password, enter your e-mail address below and we'll send you an e-mail message containing your new password.
</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3">
<span class="nprice-g"><b>E-Mail Address:</b> <input type="text" name="email" value="{$email}" size="50"></span>
<input type="submit" class="forgetPasswordNext" value="Next" />
</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
</table>
</form>
</div>
<div class="clear"></div>
| 123gohelmetsv2 | trunk/templates_en-US/centerForgotPassword.html | HTML | asf20 | 1,048 |
<div class="left_content">
<div class="title"><span class="title_icon"><img src="{$HOME_URL}/images/bullet1.gif" alt="" title="" /></span>Address Book</div>
<div class="address_list_box">
<div class="address_form">
<div class="form_subtitle">My address book</div>
<table border="0" width="100%">
{foreach item=data from=$addresses}
<tr height="50">
<td><img src="{$HOME_URL}/images/left_menu_bullet.gif" /></td>
<td>
{$data.firstname} {$data.lastname} {$data.street} <br>
{$data.city} {$data.state}, {$data.postcode} {$data.countryname}
</td><td width="90" align="right">
<a href="addressBookList.php?action=del&addressid={$data.id}" class="action">Delete</a> |
<a href="addressBookEdit.php?addressid={$data.id}" class="action">Edit</a>
</td>
</tr>
{/foreach}
</table>
<div class="form_row">
<a href="{$HOME_URL}/myaccount.php" class="continue">< Back</a>
<a href="addressBookAdd.php" class="checkout">Add Address</a>
</div>
</div>
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftAddressBookList.html | HTML | asf20 | 1,206 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet - 123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftHome.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/index.html | HTML | asf20 | 826 |
<div class="left_content">
<div class="title"><span class="title_icon"><img src="{$HOME_URL}/images/bullet1.gif" alt="" title="" /></span>Address Book</div>
<div class="address_list_box">
<div class="address_form">
<div class="form_subtitle">Add new address</div>
<div class="form_row">
<strong class="red">{$error_message}</strong>
</div>
<form name="addAddress" action="" method="post" onSubmit="return check_form(addAddress);">
<div class="form_row">
<label class="contact"><strong>First Name:</strong></label>
<input type="text" name="firstname" value="{$firstname}" class="contact_input" maxlength="32" /> <span class="red">*</span>
</div>
<div class="form_row">
<label class="contact"><strong>Last Name:</strong></label>
<input type="text" name="lastname" value="{$lastname}" class="contact_input" maxlength="32" /> <span class="red">*</span>
</div>
<div class="form_row">
<label class="contact"><strong>Street:</strong></label>
<input type="text" name="street" value="{$street}" class="contact_input" maxlength="64" /> <span class="red">*</span>
</div>
<div class="form_row">
<label class="contact"><strong>Zip Code:</strong></label>
<input type="text" name="postcode" value="{$postcode}" class="contact_input" maxlength="9" /> <span class="red">*</span>
</div>
<div class="form_row">
<label class="contact"><strong>City:</strong></label>
<input type="text" name="city" value="{$city}" class="contact_input" maxlength="32" /> <span class="red">*</span>
</div>
<div class="form_row">
<label class="contact"><strong>State/Province:</strong></label>
{if $hasZone == 'yes'}
<select name=zoneid style="height:22px; margin-top:0px;">
{html_options options=$arrZones selected=$zoneid}
</select> <span class="red">*</span>
{else}
<input type="text" name="state" value="{$state}" maxlength="32"> <span class="red">*</span>
{/if}
</div>
<div class="form_row">
<label class="contact"><strong>Country:</strong></label>
<select name="countryId" style="height:22px; margin-top:0px;" onChange="return submit();">
{html_options options=$arrCountries selected=$countryId}
</select>
</div>
<div class="form_row">
<input type="hidden" name="action" value="init">
<a href="{$HOME_URL}/addressBookList.php" class="continue">< Back</a>
<a href="javascript:addAddress.elements['action'].value='Submit'; addAddress.submit()" class="checkout" onclick="return check_form(addAddress);">Submit ></a>
</div>
</form>
</div>
</div>
<div class="clear"></div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/leftAddressBookAdd.html | HTML | asf20 | 3,102 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="includeMeta.html"}
<meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" />
<title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title>
<link rel="stylesheet" type="text/css" href="./css/style.css" />
</head>
<body>
<div id="wrap">
{include file="header.html"}
<div class="center_content">
{include file="leftMyaccount.html"}
<!--end of left content-->
{include file="rightHome.html"}
<!--end of right content-->
<div class="clear"></div>
</div>
<!--end of center content-->
{include file="footer.html"}
</div>
</body>
</html>
| 123gohelmetsv2 | trunk/templates_en-US/myaccount.html | HTML | asf20 | 822 |
<div class="header">
<div class="logo">
<table width="100%" border="0" align="center" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<td align="left" width="180px">
<a href="{$HOME_URL_HTTP}">
<img src="{$HOME_URL}/images/logo.gif" alt="" title="" border="0" />
</a>
</td>
<td align="left" width="450px">
<img src="{$HOME_URL}/images/top_1.gif" width='450px' height='90px' alt="" title="" border="0" />
</td>
<td align="right" valign="top" width="270px">
<table width="262px" border="0">
<tbody>
<tr>
<td width="2px"></td>
<td align="right" bgcolor="#FFCC99" width="260">
<ul id="nav">
<li><a href="{$HOME_URL_HTTP}">Home</a>
</li>
<li>
{if $isLogin}
<a href="{$HOME_URL_HTTP}/logoff.php">Logout</a>
{else}
<a href="{$HOME_URL_HTTP}/login.php">Login</a>
{/if}
</li>
<li><a href="{$HOME_URL_HTTP}/register.php">Register</a>
</li>
</ul>
</td>
</tr>
<tr>
<td align="right" width="100%" colspan="3">
<form method="get" action="{$HOME_URL_HTTP}/searches.php">
<input type="text" size="20" name="keyword" id="keyword" value="{$keyword}" maxlength="50">
<input type="submit" value="Search Deals" class="submit">
</form>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div id="menu">
<ul>
<li><a href="{$HOME_URL_HTTP}/b/0/1/bestSellers.html"><span>Best Sellers</span><em></em>
</a>
</li>
<li><a href="{$HOME_URL_HTTP}/a/0/1/specials.html"><span>Specials</span><em></em> </a>
</li>
<li><a href="{$HOME_URL_HTTP}/c/0/1/productList.html"><span>Products</span><em></em> </a>
</li>
<li><a href="{$HOME_URL_HTTP}/sizeChart.html"><span>Size Chart</span><em></em>
</a>
</li>
<li><a href="{$HOME_URL_HTTP}/about.html"><span>About Us</span><em></em>
</a>
</li>
<li><a href="{$HOME_URL_HTTP}/contact.html"><span>Contact</span><em></em>
</a>
</li>
<li><a href="{$HOME_URL_HTTP}/myaccount.php"><span>My Account</span><em></em> </a>
</li>
<li><a href="{$HOME_URL_HTTP}/viewCart.php"><span>View Cart</span><em></em> </a>
</li>
<li><a href="{$HOME_URL_HTTP}/preCheckout.php"><span>Check Out</span><em></em> </a>
</li>
</ul>
</div>
</div> | 123gohelmetsv2 | trunk/templates_en-US/header.html | HTML | asf20 | 2,713 |