﻿
stepcarousel.setup({
    galleryid: 'mygallery', //id of carousel DIV
    beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
    panelclass: 'panel', //class of panel DIVs each holding content
    autostep: { enable: false, moveby: 5, pause: 3000 },
    panelbehavior: { speed: 500, wraparound: false, persist: true },
    defaultbuttons: { enable: true, moveby:5, leftnav: ['images/left.gif', 7, 200], rightnav: ['images/right.gif', -27, 200] },
    statusvars: ['statusA', 'statusB',  'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
    contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']


})

stepcarousel.setup({
    galleryid: 'mfcgallery', //id of carousel DIV
    beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
    panelclass: 'panel', //class of panel DIVs each holding content
    autostep: { enable: false, moveby: 5, pause: 3000 },
    panelbehavior: { speed: 500, wraparound: false, persist: true },
    defaultbuttons: { enable: true, moveby: 5, leftnav: ['images/left.gif', 7, 203], rightnav: ['images/right.gif', -27, 203] },
    statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
    contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']


})

stepcarousel.setup({
    galleryid: 'visitedgallery', //id of carousel DIV
    beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
    panelclass: 'panel', //class of panel DIVs each holding content
    autostep: { enable: false, moveby: 5, pause: 3000 },
    panelbehavior: { speed: 500, wraparound: false, persist: true },
    defaultbuttons: { enable: true, moveby: 5, leftnav: ['images/left.gif', 7, 200], rightnav: ['images/right.gif', -27, 200] },
    statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
    contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']


})

// initialise plugins


// ***********************

function Load() {

}
// **************************************
function Detail(ProductID) {

    window.location = "productDetail.aspx?ProductID='" + ProductID  + "'"
    return false;

}
// **************************************
//function Gallery(imgStr) {

//    if (imgStr != "") {

//        var imgarr = new Array();
//        var imgarr2 = new Array();
//        var temp = new Array();
//        imgarr = imgStr.split('$');
//        var len = imgarr.length;
//        var i = 0;
//        var j = 0;
//        for (i = 0; i < len; i++) {

//            temp = imgarr[i].split(',');

//            for (j = 0; j < 4; j++) {
//                if (j == 0) {
//                    imgarr2[i] = new Array(2) // 2 Dimontional array.
//                }
//                imgarr2[i][j] = temp[j]

//            }
//        }


//        var mygallery = new simpleGallery({
//            wrapperid: "simplegallery1", //ID of main gallery container,
//            dimensions: [250, 200], //width/height of gallery in pixels. Should reflect dimensions of the images exactly

//            imagearray: imgarr2,
//            autoplay: [true, 2500, 2], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
//            persist: false, //remember last viewed slide and recall within same session?
//            fadeduration: 500, //transition duration (milliseconds)
//            oninit: function() { //event that fires when gallery has initialized/ ready to run
//                //Keyword "this": references current gallery instance (ie: try this.navigate("play/pause"))
//            },
//            onslide: function(curslide, i) { //event that fires after each slide is shown
//            }
//        })

//    }
//}
// **************************************

//function Search() {

//    var CatID = document.getElementById(ctrlPrefix + "Sel_Category").value
//    
//    if (checkBlank(document.getElementById(ctrlPrefix + "txtSearch").value)) 
//        alert("متن جستجو را وارد نمایید")
//    else
//        window.location = "searchResult.aspx?Item=" + document.getElementById(ctrlPrefix + "txtSearch").value + "&CatID=" + CatID

//    return false;

//}
//// **************************************
function News() {

    document.getElementById(ctrlPrefix + "txtSubscribe").value = ""
    alert('آدرس پست الکترونیکی با موفقیت ثبت شد')

    //window.location="Default.aspx"

}

// ****************************************

//    var delayb4scroll = 1000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
//    var marqueespeed = 1 //Specify marquee scroll speed (larger is faster 1-10)
//    var pauseit = 1 //Pause marquee onMousever (0=no. 1=yes)?

//    ////NO NEED TO EDIT BELOW THIS LINE////////////

//    var copyspeed = marqueespeed
//    var pausespeed = (pauseit == 0) ? copyspeed : 0
//    var actualheight = ''

//    function scrollmarquee() 
//    {
//        if (parseInt(cross_marquee.style.top) > (actualheight * (-1) + 8))
//            cross_marquee.style.top = parseInt(cross_marquee.style.top) - copyspeed + "px"
//        else
//            cross_marquee.style.top = parseInt(marqueeheight) + 8 + "px"
//    }

//    function initializemarquee() {
//        cross_marquee = document.getElementById("vmarquee")
//        cross_marquee.style.top = 0
//        marqueeheight = document.getElementById("marqueecontainer").offsetHeight
//        actualheight = cross_marquee.offsetHeight
//        if (window.opera || navigator.userAgent.indexOf("Netscape/7") != -1) { //if Opera or Netscape 7x, add scrollbars to scroll and exit
//            cross_marquee.style.height = marqueeheight + "px"
//            cross_marquee.style.overflow = "scroll"
//            return
//        }
//        setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
//    }

//    if (window.addEventListener)
//        window.addEventListener("load", initializemarquee, false)
//    else if (window.attachEvent)
//        window.attachEvent("onload", initializemarquee)
//    else if (document.getElementById)
//        window.onload = initializemarquee


//    function f1() {
//        alert('hello')
//        window.location = "Image_Effect.aspx"
//        return false;

//    }



