﻿// JScript File
/*
What It Does:  xp5_events.js page contains many functions related to moving and
               resizing the objects.

Referred By:   wizarda.asp, wizardy.asp
*/

var xselectedObj, xselectedObjIE
var xoffsetX, xoffsetY, xscrolloffX, xscrolloffY
var xmultiobj = new Array()
var masterobj
var xmulticount
objectmoved=false;
moverecorded=true;
objectresized=false;
resizerecorded=true;

allow_objectmovement=true	//this flag will be used by Edit design feature on the wizard

MINCROPWIDTH = 25
MINCROPHEIGHT = 25
CroppingInProgress = false

function moverelatedobject(yobject, x, y) {
}

function initMouseEvents() {
	xmulticount=0
	document.onmousemove = nmoveHandler
	document.onmouseup = nupHandler
}

function initObjectEvents() {
}

function InitResizeOnSelection(yindex, yevt) {
}

function movehotspots(yindex) {
}

function showhotspots() {
}

function hidehotspots() {
}

function initevents(yindex) {
}

function bgdownHandler() {
}

function inithotspotevents(yindex) {
}

TOPLEFT = 1
TOPCENTER = 2 //not programmed yet
TOPRIGHT = 3
MIDDLELEFT = 4  //not programmed yet
MIDDLERIGHT = 5  //not programmed yet
BOTTOMLEFT = 6
BOTTOMCENTER = 7 //not programmed yet
BOTTOMRIGHT = 8
NONE_SELECTED = 0

function GetHotspotNumber(yindex, ex, ey) {
}

function between(yvalue, yvalue1, yvalue2) {
}

xresizeon = false
origwidth = 0
origheight = 0

function downHandler(yindex, e) {
}

function ndownHandler(yevt) {
}   

altKeyPressed = false
ctrlKeyPressed = false
shiftKeyPressed = false
cposX=0
cposY=0
xaltflag=false
xctrlflag=false

startXPos=0
startYPos=0
endXPos = 0
endYPos = 0

function nmoveHandler(yevt) {
}

function AddToUndoList(x1, x2) {
}

snap_to_grid = false
function nupHandler(yevt)  {
}

function clearHelpDiv(yindex) {
}

xupflag = false
function nn6downHandler(yevt) {
}   

function ResizeTo(yobj, yobjIE, x, y, yactiontype, ypercent) {
}

function ResizeProportionally(x, y, yobj) {
}

function ChangeLabelWidthNS4(x, y, x1, y1, h1, w1, oh, ow, yindex) {
}

function ChangeLabelHeightNS4(x, y, x1, y1, h1, w1, oh, ow, yindex) {
}

function ResizeLabelNS4(yindex, x, y, yactiontype, yobj) {
}

function ChangeImageNS4(yindex, w1, h1, imgname) {
}

function ChangeImageWidthNS4(x, y, x1, y1, h1, w1, xobj, oh, ow, yindex) {
}

function ChangeImageHeightNS4(x, y, x1, y1, h1, w1, oh, ow, yindex) {
}

function ResizeImageNS4(yindex, x, y, yactiontype, yobj) {
}			

function ChangeImageWidth(x, y, x1, y1, h1, w1, xobj, oh, ow, yindex) {
}

function ChangeImageHeight(x, y, x1, y1, h1, w1, xobj, oh, ow, yindex) {
}

function ResizeImageIE(yindex, x, y, yactiontype, yobj) {
}

function ChangeLabelWidth(x, y, x1, y1, h1, w1, xobj, oh, ow, yindex, xobj1) {
}

function ChangeLabelHeight(x, y, x1, y1, h1, w1, xobj, oh, ow, yindex, xobj1) {
}

function ResizeLabelIE(yindex, x, y, yactiontype, yobj) {
}

function ResizeRectangleIE(yindex, x, y, yactiontype, yobj) {
}

function IsImage(yindex) {
	if (div_contents[yindex].indexOf("image") >= 0) return true;
	else return false;
}

function IsLabel(yindex) {
	if (div_contents[yindex].indexOf("label") >= 0) return true;
	else return false;
}

function IsRectangle(yindex) {
	if (div_contents[yindex].indexOf("rectangle") >= 0) return true;
	else return false;
}

function IsPerforation(yindex){
	if (div_text[yindex].indexOf("Perforation")>= 0) return true;
	else return false;

}

function drawborder(yobjname, ybordersize, yborderstyle, ybordercolor, yindex) {
}

function removeborder(yobjname, yindex) {
}

function nkeyDown(yevt) {
}

function hidePHDivs() {
}

function displayPHDivs() {
}

function HideIfVisible() {
}

function drawNSborder(yindex) {
}

function removeNSborder(yindex) {
}

function initPTwithdefault() {
	return;
}

function CallFromDownHandler_AfterBegin(yindex) {

}

function CallFromDownHandler_BeforeEnd(yindex) {
}

function SetToDefaultField(yindex) {
}

function downHandler_afterchange(yindex) {
}

function SetInitEvents() {
    if ((typeof(flag_Move_Resize) == "undefined") || (typeof(flag_Edit_Design) == "undefined")) {
        return;
    }
	if (flag_Move_Resize || flag_Edit_Design) {
		GetOffsets()
		window.onresize = GetOffsets
		window.onscroll = GetOffsets
		//initMouseEvents(); 
		//edit_design()
	}
}

function CroppingLimitReached(yflag) {
}
